Add/Update Customer Preferences

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.

  • customer*

array

Array of customer objects. At least one customer object is required.

  • mobile*

string

Customer's mobile number.

  • email

string

Customer's email address.

  • external_id

string

External identifier for the customer (optional).

  • user_id

string

Unique user ID for the customer (optional).

  • store

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.

  • custom_fields

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., "Blue") or pass JSON array as a string if multiple values are needed (e.g., "[\"puma\", \"nike\"]").


API Specific Error Code

Error CodeDescriptionReason
999999Unexpected server error.Returned when an unhandled or unknown error occurs during request processing. Used as a fallback for unexpected failures.
400Bad request.Triggered when required fields are missing or request body is malformed.
401Unauthorized.Authentication failed or missing authorization header.
403Forbidden.User does not have permission to perform this operation.
404Customer not found.Passed identifier (e.g., mobile, email) does not match any customer record.
409Conflict.Duplicate or conflicting data detected in the request.
422Unprocessable entity.Input is semantically incorrect (e.g., invalid email format, unsupported store code).
500Internal server error.Server encountered an error while processing the request.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!