Skip to content
QaydTech Beta launch

Items

Update an item

patch https://your-business.qaydtech.com/api/v1/items/{id}

Changes only what is sent. Units or barcodes, when sent, replace the ones it had. An item’s own unit never changes once its stock has moved.

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

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

  • type string optional

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

    Example: product

  • code string optional

    The item code: Latin letters and digits up to 30, made up when not sent. In stock levels: the item with this code.

    Example: PRD-001

  • name string optional

    The name in Arabic, 2 to 150 characters.

    Example: قهوة عربية 500غ

  • name_en string optional

    The name in English.

    Example: Arabic coffee 500g

  • description string optional

    Description, up to 500 characters.

  • unit_id integer optional

    Its own unit from GET /units. Defaults to “piece” for a product and “service” for a service.

    Example: 1

  • category_id integer optional

    The category from GET /item-categories.

    Example: 3

  • sale_price number optional

    Sale price in riyals.

    Example: 45.00

  • purchase_price number optional

    Purchase price in riyals.

    Example: 30.00

  • tax string optional

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

    Example: standard

  • barcode string optional

    The first barcode: Latin letters, digits and hyphens, 4 to 40. Made up for a product when the business’s settings say so.

    Example: 6281000000024

  • barcodes array[] optional

    Further barcodes of the same item, up to 10.

  • units array[] optional

    Other selling units (a box, say), each holding so many of its own unit.

  • unit_id integer required

    The unit from GET /units, other than its own.

    Example: 2

  • factor number required

    How many of its own unit it holds, such as 12 for a box.

    Example: 12

  • sale_price number optional

    This unit’s sale price.

    Example: 500.00

  • barcode string optional

    This unit’s barcode.

    Example: 6281000000031

  • reorder_level number optional

    Reorder level: warned when stock reaches it.

    Example: 10

  • is_active boolean optional

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

    Example: true

  • image string optional

    A link to the picture, which we download and keep (https, up to 1 MB, PNG/JPG/WebP). Empty takes the picture away. Read it back from GET /items/{id}/image.

    Example: https://cdn.example.sa/products/coffee.jpg

Responses

  • 200 OK
  • Errors · 401 · 403 · 429