Generated from the published OpenAPI document (version 1.4.0). https://fatoora.tw.sa/api/v1
/customers
List customers
Requires scope
customers:read
Parameters
| Field | Type | Description |
|---|---|---|
limit
|
integer · query | Page size. |
cursor
|
string · query | meta.pagination.next_cursor of the previous page. |
q
|
string · query | Searches names, e-mail, phone and VAT number. |
type
|
string: individual, business · query | |
status
|
string: active, inactive · query | |
vat_number
|
string · query | |
updated_since
|
string (date-time) · query |
Responses
- 200 A page of customers.
-
default
An error.
error.codesays which.
/customers
Create a customer
Requires scope
customers:write
Needs the person behind the key to be allowed to manage customers. Counts against the plan's customer allowance.
Parameters
| Field | Type | Description |
|---|---|---|
Idempotency-Key
|
string · header | 8 to 255 visible ASCII characters, unique per operation you mean to perform. |
Request body application/json
| Field | Type | Description |
|---|---|---|
name
required
|
string | |
name_ar
|
string | null | |
name_en
|
string | null | |
type
|
string | null: individual, business, null | Defaults to business. |
status
|
string | null: active, inactive, null | |
email
|
string | null (email) | Unique within the company. |
phone
|
string | null | |
mobile
|
string | null | |
vat_number
|
string | null | A Saudi buyer's VAT number: 15 digits, first and last 3. Unique within the company. |
cr_number
|
string | null | |
id_scheme
|
string | null | |
id_number
|
string | null | |
contact_person
|
string | null | |
address_line1
|
string | null | |
address_line2
|
string | null | |
building_number
|
string | null | 4 digits for a Saudi address. |
additional_number
|
string | null | 4 digits for a Saudi address. |
district
|
string | null | |
city
|
string | null | |
postal_code
|
string | null | |
country
|
string | null | ISO 3166-1 alpha-2; defaults to SA. |
national_address
|
string | null | |
payment_terms
|
integer | null | |
credit_limit
|
number | null | |
preferred_locale
|
string | null: ar, en, null | |
notes
|
string | null |
Responses
- 201 The customer was created.
-
default
An error.
error.codesays which.
/customers/{customer}
Get a customer
Requires scope
customers:read
Parameters
| Field | Type | Description |
|---|---|---|
customer
required
|
integer · path |
Responses
- 200 The customer.
-
default
An error.
error.codesays which.
/customers/{customer}
Update a customer
Requires scope
customers:write
Changes only the fields sent; a field left out keeps its value.
Parameters
| Field | Type | Description |
|---|---|---|
customer
required
|
integer · path | |
Idempotency-Key
|
string · header | 8 to 255 visible ASCII characters, unique per operation you mean to perform. |
Request body application/json
| Field | Type | Description |
|---|---|---|
name
|
string |
Responses
- 200 The updated customer.
-
default
An error.
error.codesays which.
Ready to build?
API access is part of the Business and Enterprise plans. Create a key in Settings → API keys and make your first call in minutes.