Add/Update Customer Preferences

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Example request

curl --location 'https://eu.api.capillarytech.com/v1.1/customer/preferences?format=json' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data-raw '{
    "root": {
        "customer": [
            {
                "mobile": "7744876415",
                "email": "[email protected]",
                
                
                "store": {
                    "code": "doc123",
                    "id": "75152715"
                } 
               
            }
        ]
    }
}'

Request Body Parameters

FieldTypeRequiredDescription
rootobjectYesRoot object containing customer data.
  • customer
arrayYesArray of customer objects. At least one customer object is required.
  • mobile
stringConditionalCustomer's mobile number. Conditionally required Customer's mobile number. At least one identifier among mobile, email, external_id, or user_id should be provided.
  • email
stringConditionalCustomer's email address.
  • external_id
stringConditionalExternal identifier for the customer (optional).
  • user_id
stringConditionalUnique user ID for the customer (optional).
  • store
objectOptionalStore details object.
-- codestringOptionalStore code to which the customer belongs.
-- idstringOptionalStore ID. Unique identifier for the store associated with the customer. Pass the internal store ID configured in your system.
  • custom_fields
objectOptionalObject containing custom field data (optional).
-- fieldarrayOptionalArray of custom field objects. Each defines additional attribute information.
--- namestringYesName of the custom field. (if custom_fields.field provided) Preference/attribute name (e.g., "Favorite Brand").
--- valuestringYesValue 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\"]"). (if custom_fields.field provided) Preference/attribute value can be a simple string or a serialized list (e.g., ["puma"]).

Example response

{
    "response": {
        "status": {
            "success": "false",
            "code": 500,
            "message": "All requests have failed due to errors"
        },
        "customer": [
            {
                "mobile": "917744876415",
                "email": "[email protected]",
                "external_id": "",
                "store": {
                    "status": "SUCCESS",
                    "id": "75152715",
                    "code": "doc123",
                    "name": "DocStore"
                },
                "custom_fields": {
                    "field": []
                },
                "item_status": {
                    "success": "false",
                    "code": 999999,
                    "message": "",
                    "warnings": {}
                }
            }
        ]
    }
}

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.
Query Params
string
enum
Allowed:
Body Params
json
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json