Preferences are custom fields created under the preferences category which helps in capturing specific interests of a customer. Example: favorite color, favorite brand. This API allows you to set or update preferences of a customer.
Request Body Parameters
Parameter (Parameters marked with * are mandatory) | Datatype | Description |
---|---|---|
root* | object | Root object containing customer data. |
| array | Array of customer objects. At least one customer object is required. |
| string | Customer's mobile number. |
string | Customer's email address. | |
| string | External identifier for the customer (optional). |
| string | Unique user ID for the customer (optional). |
| object | Store details object. |
-- code* | string | Store code to which the customer belongs. |
-- id* | string | Store ID. Unique identifier for the store associated with the customer. Pass the internal store ID configured in your system. |
| object | Object containing custom field data (optional). |
-- field | array | Array of custom field objects. Each defines additional attribute information. |
--- name* | string | Name of the custom field. |
--- value* | string | Value for the custom field. Write string values directly (e.g., |
API Specific Error Code
Error Code | Description | Reason |
---|---|---|
999999 | Unexpected server error. | Returned when an unhandled or unknown error occurs during request processing. Used as a fallback for unexpected failures. |
400 | Bad request. | Triggered when required fields are missing or request body is malformed. |
401 | Unauthorized. | Authentication failed or missing authorization header. |
403 | Forbidden. | User does not have permission to perform this operation. |
404 | Customer not found. | Passed identifier (e.g., mobile, email) does not match any customer record. |
409 | Conflict. | Duplicate or conflicting data detected in the request. |
422 | Unprocessable entity. | Input is semantically incorrect (e.g., invalid email format, unsupported store code). |
500 | Internal server error. | Server encountered an error while processing the request. |