Skip to content
QaydTech Beta launch

Customers

Add a customer

post https://your-business.qaydtech.com/api/v1/customers

Adds an individual or a business. A business is given a tax invoice, so it is added with its full national address (city, district, street, building number and postal code), or the authority accepts its invoices with remarks. A VAT number is never repeated.

Permission: customers.write Supports Idempotency-Key to prevent duplicates.

Request

Headers

  • Authorization string required

    Bearer followed by the API key.

    Example: Bearer qayd_…

  • Accept-Language string optional

    en for English error messages. Arabic by default.

    Example: en

  • Content-Type string required

    application/json with every request that has a body.

    Example: application/json

  • Idempotency-Key string optional

    A unique value so a request sent again creates nothing twice.

    Example: order-10045

Request body application/json

  • type string required

    The type: individual or business for a customer; product or service for an item; asset, liability, equity, revenue or expense for an account.

    Example: business

  • name string required

    The name in Arabic, 2 to 150 characters.

    Example: شركة النخبة للتجارة

  • name_en string optional

    The name in English.

    Example: Al Nokhba Trading Co.

  • vat_number string optional

    VAT number: 15 digits starting and ending with 3.

    Example: 310123456700003

  • commercial_registration string optional

    Commercial registration: 10 digits.

    Example: 1010123456

  • contact_name string optional

    The contact person.

    Example: سارة العتيبي

  • phone string optional

    Mobile or phone.

    Example: 0551234567

  • email string optional

    Email.

    Example: [email protected]

  • address object optional

    The national address. Required in full for a business customer when added.

  • city_id integer optional

    The city number from GET /cities; the region follows from it.

    Example: 3

  • district string optional

    District.

    Example: العليا

  • street string optional

    Street.

    Example: طريق الملك فهد

  • building_number string optional

    Building number: 4 digits.

    Example: 1234

  • postal_code string optional

    Postal code: 5 digits.

    Example: 12345

  • additional_number string optional

    Additional number: 4 digits.

    Example: 5678

  • short_address string optional

    Short address: 4 letters then 4 digits.

    Example: RRRD2929

  • payment_term_days integer optional

    Payment term in days, 0 to 365.

    Example: 30

  • credit_limit number optional

    Credit limit in riyals.

    Example: 50000.00

  • messages_opt_out boolean optional

    true if the customer asked for no automatic messages.

    Example: false

  • is_active boolean optional

    false to stop it (a customer, an item, a webhook address); true to resume it.

    Example: true

  • notes string optional

    Notes, up to 500 characters.

Responses

  • 201 Created
  • 422 Refused
  • Errors · 401 · 403 · 429