Zopping
API reference

Customers

Register and manage shoppers, their addresses, contact points and tags — the building blocks for a storefront or app. A customer can have multiple emails, phones and addresses, each with a default. Login itself is issued by the auth service (see Authentication).

Base URLhttps://zopping.com

Customers

The shopper record. Create with at least a name, phone/email and organizationId; you may nest an address to create one in the same call. Keep your own id in clientId.

Fields
FieldTypeDescription
idintegerread-only
organizationIdstringrequired
namestringrequired
lastNamestring
phonestringPrimary phone.
emailstringPrimary email.
passwordstringOptional; set to allow login.
clientIdstringkeyYour external customer id.
addressobjectOptional nested address to create.
statusstringread-only
totalOrdersintegerread-only
defaultAddressobjectread-only
GET/api/customer-service/customer

List customers

Parameters
ParameterTypeDescription
organizationIdrequiredstring· query
pageinteger· query
limitinteger· queryDefault 20.
phonestring· queryFilter by phone.
emailstring· queryFilter by email.
clientIdstring· queryFilter by your id(s).
Request
curl "https://zopping.com/api/customer-service/customer?organizationId=<org-id>&phone=9876543210" \
  -H "Authorization: Bearer $ZOPPING_TOKEN"
Response
{
  "data": {
    "customer": [
      {
        "id": 7781,
        "name": "Asha",
        "phone": "9876543210",
        "status": "ENABLED",
        "totalOrders": 12
      }
    ],
    "count": 1,
    "offset": 0,
    "limit": 20
  }
}
POST/api/customer-service/customer

Create a customer

Request body
{
  "organizationId": "<org-id>",
  "name": "Asha",
  "phone": "9876543210",
  "email": "asha@example.com",
  "clientId": "CRM-7781",
  "address": {
    "address": "12 MG Road",
    "city": "Bengaluru",
    "pincode": "560001"
  }
}
GET/api/customer-service/customer/{id}

Get a customer

Parameters
ParameterTypeDescription
idrequiredinteger· path
PUT/api/customer-service/customer/{id}

Update a customer

Guest

Create a lightweight guest customer for express checkout; it converts to a registered customer on first login.

POST/api/customer-service/guest

Create a guest

Request body
{
  "organizationId": "<org-id>",
  "name": "Guest",
  "phone": "9876543210",
  "email": "guest@example.com",
  "password": "••••••"
}

Addresses

Delivery addresses for a customer, with optional geo-coordinates used by fulfilment to resolve a delivery zone.

Fields
FieldTypeDescription
idintegerread-only
customerIdintegerrequired
addressstringrequired
citystringrequired
pincodestring
landmarkstring
latitudenumber
longitudenumber
statestring
clientIdstringkey
GET/api/customer-service/address

List addresses

Parameters
ParameterTypeDescription
organizationIdrequiredstring· query
customerIdrequiredinteger· query
POST/api/customer-service/address

Add an address

Request body
{
  "organizationId": "<org-id>",
  "customerId": 7781,
  "address": "12 MG Road",
  "city": "Bengaluru",
  "pincode": "560001",
  "latitude": 12.9758,
  "longitude": 77.6096
}
PUT/api/customer-service/address/{id}

Update an address

Parameters
ParameterTypeDescription
idrequiredinteger· path
DELETE/api/customer-service/address/{id}

Delete an address

Parameters
ParameterTypeDescription
idrequiredinteger· path

Emails & phones

A customer can hold multiple emails and phones. Add, update status, or remove them. The wire field for a phone number is phone.

POST/api/customer-service/email

Add an email

Request body
{
  "organizationId": "<org-id>",
  "customerId": 7781,
  "email": "asha2@example.com"
}
DELETE/api/customer-service/email/{id}

Remove an email

Parameters
ParameterTypeDescription
idrequiredinteger· path
POST/api/customer-service/phone

Add a phone

Request body
{
  "organizationId": "<org-id>",
  "customerId": 7781,
  "phone": "9988776655"
}
DELETE/api/customer-service/phone/{id}

Remove a phone

Parameters
ParameterTypeDescription
idrequiredinteger· path

Passwords

Let customers change their password, or kick off a reset by email/phone username.

POST/api/customer-service/change-password

Change password

Request body
{
  "customerId": 7781,
  "oldPassword": "••••",
  "newPassword": "••••••"
}
POST/api/customer-service/reset-password

Request a password reset

Request body
{
  "organizationId": "<org-id>",
  "username": "asha@example.com"
}