Skip to content
العربية

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

NameInTypeDescription
limitqueryintegerPage size, 50 by default.
cursorquerystringnext_cursor from the page before.
updated_sincequerydate-timeOnly rows changed at or after this moment. A time without an offset is read as Riyadh time.

Responses

  • 200OKdataarray 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

FieldTypeDescription
phonerequiredstringA Saudi mobile number in any common format.
first_namerequiredstring
last_namestring
first_name_arstring
last_name_arstring
emailemail
genderstring
One of:MF
birthdayBirthdayInput

Responses

  • 200The phone already belongs to one of the business's customers.dataCustomer
  • 201AddeddataCustomer
  • 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

NameInTypeDescription
customer_idrequiredpathstringThe customer's id.

Responses

  • 200OKdataCustomer
  • 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

NameInTypeDescription
customer_idrequiredpathstringThe customer's id.

Request body

FieldTypeDescription
phonestring
first_namestring
last_namestring
first_name_arstring
last_name_arstring
emailemail
genderstring
One of:MF
birthdayBirthdayInputor null

Responses

  • 200ChangeddataCustomer
  • 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