Skip to content

Customer profiles and accounts ​

Read or update customer details and addresses, merge duplicate accounts, and deactivate accounts. Customer identity normally comes from the Authorization token.

Access labels such as Origin + Brand key + Customer are defined in Headers and access. Each endpoint ends in a Try it console; set the host and keys once in its Settings tab or on the overview.

Get user address ​

MethodURL pathRequired access
GET/api/v1/user/addressOrigin + Brand key + Customer

Request fields: no body, query, or path fields are read by this controller. Context comes from the headers/middleware above.

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/address" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: An array of saved address records, including addressId and address fields.

Source: app/v1/controller/address_controller.js:138 → getUserAddress; routes: routes/v1/address_route.js:65; service: _getUserAddress (app/v1/service/address_service.js:62).

Update user address ​

MethodURL pathRequired access
PUT/api/v1/user/address/update/:addressIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.address1stringoptionalWhitespace trimmed
body.payload.address2stringoptionalWhitespace trimmed
body.payload.citystringoptionalWhitespace trimmed
body.payload.countystringoptionalWhitespace trimmed
body.payload.statestringoptionalWhitespace trimmed
body.payload.short_statestringoptionalWhitespace trimmed
body.payload.zipstringoptionalWhitespace trimmed
body.payload.countrystringoptionalWhitespace trimmed; Country code from country_iso_codes, for example US or CA
body.payload.addressStringstringoptionalWhitespace trimmed
body.payload.what3wordsstringoptionalWhitespace trimmed
body.payload.deliveryChargesnumberoptional—
body.payload.namestringoptionalWhitespace trimmed
body.payload.typestringoptionalWhitespace trimmed; Default ("shipping")
body.payload.isPrimarybooleanoptional—
body.payload.latLngobjectoptional—
body.payload.latLng.latnumberyes—
body.payload.latLng.lngnumberyes—
path.addressIdnumberyes—

Example:

bash
curl -X PUT "$BASE_URL/api/v1/user/address/update/1" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"type":"example"}}'

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, addressId.

Source: app/v1/controller/address_controller.js:69 → updateUserAddress; routes: routes/v1/address_route.js:75; service: _updateUserAddress (app/v1/service/address_service.js:28).

Add user address ​

MethodURL pathRequired access
POST/api/v1/user/address/addOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.address1stringyesWhitespace trimmed
body.payload.address2stringoptionalWhitespace trimmed
body.payload.citystringyesWhitespace trimmed
body.payload.countystringoptionalWhitespace trimmed
body.payload.statestringyesWhitespace trimmed
body.payload.short_statestringoptionalWhitespace trimmed
body.payload.zipstringyesWhitespace trimmed
body.payload.countrystringyesWhitespace trimmed; Country code from country_iso_codes, for example US or CA
body.payload.addressStringstringyesWhitespace trimmed
body.payload.what3wordsstringoptionalWhitespace trimmed
body.payload.deliveryChargesnumberoptional—
body.payload.isPrimarybooleanoptionalDefault (true)
body.payload.namestringoptionalWhitespace trimmed
body.payload.typestringoptionalWhitespace trimmed; Default ("shipping")
body.payload.latLngobjectoptional—
body.payload.latLng.latnumberyes—
body.payload.latLng.lngnumberyes—

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/address/add" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"address1":"123 Example Street","city":"New York","state":"New York","zip":"10001","country":"US","addressString":"123 Example Street, New York, NY 10001, US"}}'

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, addressId.

Source: app/v1/controller/address_controller.js:13 → addUserAddress; routes: routes/v1/address_route.js:54; service: _addUserAddress (app/v1/service/address_service.js:5).

Delete address by ID ​

MethodURL pathRequired access
DELETE/api/v1/user/address/delete/:addressIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
path.addressIdnumberyes—

The address service refuses to delete a primary address. Select another primary address before removing it.

Example:

bash
curl -X DELETE "$BASE_URL/api/v1/user/address/delete/1" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, userId.

Source: app/v1/controller/address_controller.js:152 → deleteAddressById; routes: routes/v1/address_route.js:86; service: _deleteAddressById (app/v1/service/address_service.js:85).

Get customer details ​

MethodURL pathRequired access
GET/api/v1/user/detailOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
query.hubIdnumberoptional—

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/detail" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: Customer profile data, with loyalty and integration details when available.

Source: app/v1/controller/customer_controller.js:298 → getCustomerDetails; routes: routes/v1/customer_route.js:571; service: _detailCustomer (app/v1/service/customer_service.js:408).

Update details ​

MethodURL pathRequired access
PUT/api/v1/user/details/updateOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.firstNamestringoptionalWhitespace trimmed
body.payload.lastNamestringoptionalWhitespace trimmed
body.payload.fullNamestringoptionalWhitespace trimmed
body.payload.emailstringoptionalEmail address; Whitespace trimmed; Converted to lowercase; Custom validation in controller
body.payload.passwordstringoptionalWhitespace trimmed; Minimum (8)
body.payload.dateOfBirthdateoptionalISO date
body.payload.phoneNumberstringoptionalreplace(/\D/g , ""); Whitespace trimmed
body.payload.phone_prefixstringconditionalRequired when phoneNumber is supplied; otherwise optional
body.payload.tagsstringoptionalWhitespace trimmed
body.payload.user_profilestringoptionalWhitespace trimmed
body.payload.user_descriptionstringoptionalWhitespace trimmed
body.payload.usernamestringoptionalWhitespace trimmed
body.payload.open_to_tradebooleanoptional—
body.payload.show_collections_for_tradebooleanoptional—
body.payload.genderstringoptionalWhitespace trimmed
body.payload.geocodestringoptionalWhitespace trimmed; pattern(/^[A-Z]{1,4} [A-Z0-9][A-Z0-9 -]{1,9}, [A-Z]{2}$/)

Example:

bash
curl -X PUT "$BASE_URL/api/v1/user/details/update" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"email":"alex@example.com"}}'

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, userId, token.

Source: app/v1/controller/customer_controller.js:325 → updateDetails; routes: routes/v1/customer_route.js:591; service: _updateCustomer (app/v1/service/customer_service.js:611).

Send OTP for user merge operation ​

MethodURL pathRequired access
POST/api/v1/user/merge-user/send-otpOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyesAt least one of ("email" , "phoneNumber")
body.payload.phoneNumberstringoptionalreplace(/\D/g , ""); Whitespace trimmed
body.payload.phone_prefixstringconditionalRequired when phoneNumber is supplied; otherwise optional
body.payload.emailstringoptionalEmail address; Whitespace trimmed; Converted to lowercase; Custom validation in controller

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/merge-user/send-otp" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"email":"alex@example.com"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/customer_controller.js:1132 → sendOtpForUserMergeOperation; routes: routes/v1/customer_route.js:394; service: _sendOtpForUserMergeOperation (app/v1/service/customer_service.js:2366).

Validate OTP for user merge operation ​

MethodURL pathRequired access
POST/api/v1/user/merge-user/validate-otpOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyesAt least one of ("email" , "phoneNumber")
body.payload.emailstringoptionalEmail address; Whitespace trimmed; Converted to lowercase; Custom validation in controller
body.payload.phoneNumberstringoptionalreplace(/\D/g , ""); Whitespace trimmed
body.payload.phone_prefixstringconditionalRequired when phoneNumber is supplied; otherwise optional
body.payload.otpstringoptionalWhitespace trimmed

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/merge-user/validate-otp" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"email":"alex@example.com"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/customer_controller.js:1185 → validateOTPForUserMergeOperation; routes: routes/v1/customer_route.js:404; service: _validateOTPForUserMergeOperation (app/v1/service/customer_service.js:2446).

Merge duplicate users ​

MethodURL pathRequired access
POST/api/v1/user/merge-userOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyesAt least one of ("email" , "phoneNumber")
body.payload.firstNamestringoptionalWhitespace trimmed
body.payload.lastNamestringoptionalWhitespace trimmed
body.payload.phoneNumberstringoptionalreplace(/\D/g , ""); Whitespace trimmed
body.payload.phone_prefixstringconditionalRequired when phoneNumber is supplied; otherwise optional
body.payload.emailstringoptionalEmail address; Whitespace trimmed; Converted to lowercase; Custom validation in controller
body.payload.usernamestringoptionalWhitespace trimmed
body.payload.dateOfBirthdateoptionalISO date
body.payload.genderstringoptionalWhitespace trimmed
body.payload.user_profilestringoptionalWhitespace trimmed
body.payload.user_descriptionstringoptionalWhitespace trimmed

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/merge-user" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"email":"alex@example.com"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/customer_controller.js:1244 → mergeDuplicateUsers; routes: routes/v1/customer_route.js:414; service: _mergeDuplicateUsers (app/v1/service/customer_service.js:2569).

Create integration customer ​

MethodURL pathRequired access
POST/api/v1/user/register/integrationOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
query.hubIdnumberoptional—

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/register/integration" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/customer_controller.js:857 → createIntegrationCustomer; routes: routes/v1/customer_route.js:184; service: _createIntegrationCustomer (app/v1/service/customer_service.js:1531).

Start account deactivation ​

Send the OTP used to confirm account deactivation.

MethodURL pathRequired access
GET/api/v1/user/deactivateOrigin + Brand key + Customer

Request fields: no body, query, or path fields are read by this controller. Context comes from the headers/middleware above.

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/deactivate" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/customer_controller.js:1082 → deactivateUser; routes: routes/v1/customer_route.js:608; service: _deactivateUser (app/v1/service/customer_service.js:2105).

Confirm account deactivation ​

Confirm deactivation using the OTP. This changes account access.

MethodURL pathRequired access
POST/api/v1/user/deactivate/confirmationOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.otpstringyesWhitespace trimmed

Example:

bash
curl -X POST "$BASE_URL/api/v1/user/deactivate/confirmation" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-raw '{"payload":{"otp":"123456"}}'

Response: JSON with success: true and result containing the operation’s service data.

Source: app/v1/controller/customer_controller.js:1098 → deactivateUserConfirmation; routes: routes/v1/customer_route.js:615; service: _deactivateUserConfirmation (app/v1/service/customer_service.js:2160).

Get all brand customers ​

Search or page through customers belonging to the current brand.

MethodURL pathRequired access
GET/api/v1/user/brand/customersOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
query.limitnumberoptional—
query.offsetnumberoptional—
query.searchstringoptionalWhitespace trimmed

Pagination is added only when limit and offset are both truthy; offset=0 does not enable that branch.

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/brand/customers?limit=10&offset=0" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: count, rows.

Source: app/v1/controller/customer_controller.js:1425 → getAllBrandCustomers; routes: routes/v1/customer_route.js:374; service: _getAllBrandCustomers (app/v1/service/customer_service.js:3291).

Check username availability ​

MethodURL pathRequired access
GET/api/v1/user/available/usernameOrigin + Customer + Brand key

Request fields:

FieldTypeRequiredRules / meaning
query.usernamestringyesWhitespace trimmed

Example:

bash
curl -X GET "$BASE_URL/api/v1/user/available/username?username=alex_taylor" \
  -H "Origin: $ORIGIN" \
  -H "api-key: $API_KEY" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"

Response: JSON with success: true and result containing the operation’s service data. Result fields/details: available (boolean).

Source: app/v1/controller/customer_controller.js:1580 → check_username_availability; routes: routes/v1/customer_route.js:654; service: _check_username_availability (app/v1/service/customer_service.js:3884).

Batch platform, Shopify app and API documentation