Skip to content
QaydTech Beta launch

Invoices and notes

Credit note (return)

post https://your-business.qaydtech.com/api/v1/invoices/{id}/credit-notes

A credit note on an issued invoice, never more than it may still take back. Returns stock by default, and is issued at once with issue: true.

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

The user the key acts as also needs: Sales returns

Request

Path parameters

  • id integer required

    The record’s number.

    Example: 42

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

  • reason string required

    The reason for the note.

    Example: مرتجع جزئي

  • issue_date date optional

    Issue date; today when not sent.

    Example: 2026-11-10

  • reference string optional

    Your reference, such as your store’s order number, up to 60 characters. Searchable later.

    Example: RET-1001

  • notes string optional

    Notes, up to 500 characters.

  • issue boolean optional

    true to issue at once; otherwise saved as a draft.

    Example: true

  • lines array[] required

    The lines, 1 to 500.

  • item_id integer optional

    The item number: the line takes its name, price, tax and sales account.

    Example: 7

  • unit_id integer optional

    The selling unit when the item has more than one.

  • description string optional

    Description, required when no item is given. Up to 255 characters.

    Example: استشارة

  • quantity number required

    Quantity, above zero, up to 3 decimals.

    Example: 2

  • unit_price number optional

    Unit price in riyals; required when the item has no sale price.

    Example: 100.00

  • discount_percent number optional

    Line discount as a percentage, 0 to 100.

    Example: 0

  • discount_amount number optional

    Line discount as an amount (instead of a percentage).

  • tax string optional

    Tax code from GET /taxes. Defaults to the item’s tax or the business’s usual one.

    Example: standard

  • account_id integer optional

    Revenue account. Defaults to the item’s or the sales account.

  • returns_stock boolean optional

    false if the goods do not go back into stock.

    Example: true

Responses

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