Customers
Customers
GEThttps://api.razza.sa/v1/customers
The business's customer list. Refused when the app has restrict_customer_list.
Any app, under the customer rules
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Page size, 50 by default. |
cursor | query | string | next_cursor from the page before. |
updated_since | query | date-time | Only rows changed at or after this moment. A time without an offset is read as Riyadh time. |
Responses
- 200OK
dataarray ofCustomernext_cursorstringor null - 400A parameter or the body is not valid.
Error - 401No access token, or it is not valid.
Error - 403The business is inactive, not on Qimma, paused for an unpaid razza invoice, or the app lacks the permission or has a restriction that stops it.
Error - 429Over the app's rate limit. Wait Retry-After seconds.
Error
Add a customer
POSThttps://api.razza.sa/v1/customers
Adds a customer by phone number. When the number already belongs to one of the business's customers, that customer comes back with 200 and only blank details are filled in. Needs an app with neither restrict_customer_list nor restrict_customer_contact.
Any app, under the customer rules
Request body
| Field | Type | Description |
|---|---|---|
phonerequired | string | A Saudi mobile number in any common format. |
first_namerequired | string | |
last_name | string | |
first_name_ar | string | |
last_name_ar | string | |
email | email | |
gender | stringOne of: MF | |
birthday | BirthdayInput |
Responses
- 200The phone already belongs to one of the business's customers.
dataCustomer - 201Added
dataCustomer - 400A parameter or the body is not valid.
Error - 401No access token, or it is not valid.
Error - 403The business is inactive, not on Qimma, paused for an unpaid razza invoice, or the app lacks the permission or has a restriction that stops it.
Error - 422razza refused it. reasons lists the portal's error codes.
Error - 429Over the app's rate limit. Wait Retry-After seconds.
Error
A customer
GEThttps://api.razza.sa/v1/customers/{customer_id}
One customer.
Any app, under the customer rules
Parameters
| Name | In | Type | Description |
|---|---|---|---|
customer_idrequired | path | string | The customer's id. |
Responses
- 200OK
dataCustomer - 400A parameter or the body is not valid.
Error - 401No access token, or it is not valid.
Error - 403The business is inactive, not on Qimma, paused for an unpaid razza invoice, or the app lacks the permission or has a restriction that stops it.
Error - 404Not found in this business.
Error - 429Over the app's rate limit. Wait Retry-After seconds.
Error
Change a customer
PATCHhttps://api.razza.sa/v1/customers/{customer_id}
Changes a customer's details. Send only what changes; birthday null removes it. A customer who signed up to razza manages their own details, so a change to them is refused with CUSTOMER_MANAGES_OWN_DETAILS.
Any app, under the customer rules
Parameters
| Name | In | Type | Description |
|---|---|---|---|
customer_idrequired | path | string | The customer's id. |
Request body
| Field | Type | Description |
|---|---|---|
phone | string | |
first_name | string | |
last_name | string | |
first_name_ar | string | |
last_name_ar | string | |
email | email | |
gender | stringOne of: MF | |
birthday | BirthdayInputor null |
Responses
- 200Changed
dataCustomer - 400A parameter or the body is not valid.
Error - 401No access token, or it is not valid.
Error - 403The business is inactive, not on Qimma, paused for an unpaid razza invoice, or the app lacks the permission or has a restriction that stops it.
Error - 404Not found in this business.
Error - 422razza refused it. reasons lists the portal's error codes.
Error - 429Over the app's rate limit. Wait Retry-After seconds.
Error