Swiftazu

Customers

Create customer

Add a customer to your account.

POST/v1/customers
Bearer tokenReturns JSONSuccess 201

The mobile number identifies the customer and must be unique in your account; a second customer with the same number is refused with conflict. Add at least one address before you create an order for them.

Request

Headers

FieldTypeDescription
AuthorizationrequiredstringThe access token from Get token, as "Bearer <token>".
Content-TyperequiredstringAlways application/json when a body is sent.

Request body

FieldTypeDescription
fullNamerequiredstringThe customer's full name, 2 to 200 characters.
mobilerequiredstringMobile number in international format, for example +971501234567. Must be unique in your account.
emailoptionalstringEmail address.
alternateNumberoptionalstringA second phone number.
customerReferenceoptionalstringYour own id for this customer.
notesoptionalstringNotes for your own use.
Example request
curl -X POST "https://api.swiftazu.com/v1/customers" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fullName": "Layla Hassan",
  "mobile": "+971558250908",
  "email": "layla.hassan@example.com",
  "customerReference": "CUST-1042"
}'

Response

Example response · 201
{
  "id": "8778df1e-9b74-420d-b826-d17cdad86d36"
}

Errors

HTTPCodeMeaning
409conflictThe change clashes with existing data. message says how.

Every call can also return the shared errors listed on the Overview page. Overview