
Frequently Asked Questions
Why can't the mobile number be updated using this API?
- To maintain data integrity and security, the mobile number can only be updated from the Swan Portal. This ensures that mobile number changes are properly verified.
What customer details can be updated using this API?
- Businesses can update various customer demographic details such as:
First name
Last name
Email address
Date of birth
Gender
Nationality
Language preferences
Notification preferences (SMS, email, push notifications, WhatsApp)
Address and location details
What authentication method is used for the loyalty APIs?
- The loyalty APIs use OAuth2.0 for securing API requests.
Where to get all the valid coupons assigned to a customer
- Valid coupons for a customer, details are available in the get customer API
How do I authenticate with the Swan Integration API?
- Authentication is required for all API requests. Authentication credentials must be included in the headers of each request.
What should I do if I encounter an error while using the API?
Errors are returned as JSON objects with appropriate HTTP status codes. Common status codes include:
200: OK - The request was successful.
400: Bad Request - The request was invalid.
401: Unauthorized - Authentication failed.
403: Forbidden - The request is not allowed.
404: Not Found - The requested resource does not exist.
5xx: Server Error - An error occurred on the server.
How can I get an authentication token?
Use the "Get Auth Token" endpoint to retrieve an authentication token for the client.
How do I handle a "Customer already Exists" error?
If you receive a "Customer already Exists for this mobile Number" error, ensure the mobile number you are trying to register is unique and not already associated with an existing customer.
How can I contact support for the Swan Integration API?
- For assistance or inquiries, you can contact support at support@swan.cx.