المطورون

مرجع الواجهة البرمجية: العملاء

مولَّد من مستند OpenAPI المنشور (الإصدار 1.4.0). https://fatoora.tw.sa/api/v1

GET /customers

List customers

الصلاحية المطلوبة customers:read

المعاملات

الحقل النوع الوصف
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

الردود

  • 200 A page of customers.
  • default An error. error.code says which.
POST /customers

Create a customer

الصلاحية المطلوبة customers:write

Needs the person behind the key to be allowed to manage customers. Counts against the plan's customer allowance.

المعاملات

الحقل النوع الوصف
Idempotency-Key string · header 8 to 255 visible ASCII characters, unique per operation you mean to perform.

محتوى الطلب application/json

الحقل النوع الوصف
name مطلوب 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

الردود

  • 201 The customer was created.
  • default An error. error.code says which.
GET /customers/{customer}

Get a customer

الصلاحية المطلوبة customers:read

المعاملات

الحقل النوع الوصف
customer مطلوب integer · path

الردود

  • 200 The customer.
  • default An error. error.code says which.
PATCH /customers/{customer}

Update a customer

الصلاحية المطلوبة customers:write

Changes only the fields sent; a field left out keeps its value.

المعاملات

الحقل النوع الوصف
customer مطلوب integer · path
Idempotency-Key string · header 8 to 255 visible ASCII characters, unique per operation you mean to perform.

محتوى الطلب application/json

الحقل النوع الوصف
name string

الردود

  • 200 The updated customer.
  • default An error. error.code says which.

العودة إلى مرجع الواجهة البرمجية

جاهز للبدء؟

الوصول إلى الواجهة البرمجية ضمن باقات: الأعمال والمؤسسات. أنشئ مفتاحًا من الإعدادات ← مفاتيح API وأرسل أول طلب خلال دقائق.