Skip to content
Sections · Shared models

API reference

Shared models

Small references every resource uses, the list and error formats, and objects several resources share. An object only one resource returns is on that resource's page.

The error object

  • codestring

    Stable and machine-readable; branch on this, never on message. See the error table in the guide.

  • messagestring

    What went wrong, in English or Arabic per Accept-Language. Never branch on it; use code.

  • required_scopestring

    With missing_scope, scope_not_granted and module_unavailable.

  • detailsobject

    Extra figures for some 409 codes.

Example
{
  "code": "missing_scope",
  "message": "The name field is required.",
  "required_scope": "Example required scope",
  "details": null
}

The list meta object

  • page_sizeinteger

    Records per page.

  • has_moreboolean

    Whether another page follows.

  • next_page_cursorstringnullable

    Send as page_cursor to read the next page; null on the last page.

Example
{
  "page_size": 50,
  "has_more": false,
  "next_page_cursor": "Example next page cursor"
}

The named ref object

  • idstring (id)

    The record's id.

  • namestring

    The record's name.

Example
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "name": "Main branch"
}

The currency ref object

  • codestring

    ISO 4217; the sign for a currency without one.

  • namestring

    The currency's name.

  • signstring

    The currency's sign, printed after amounts.

Example
{
  "code": "IQD",
  "name": "Iraqi Dinar",
  "sign": "IQD"
}

The customer identity object

  • idstring (id)

    Unique identifier of the customer.

  • codestring

    Customer code, e.g. CUS-000001.

  • namestring

    The customer's name.

  • statusenum

    Where the customer is in its life cycle.

    Possible values:activeinactive

  • is_trashedboolean

    Whether the customer is in Trash.

Example
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "code": "CUS-000001",
  "name": "Acme Trading",
  "status": "active",
  "is_trashed": false
}

The vendor ref object

  • idstring (id)

    Unique identifier of the vendor.

  • codestring

    Vendor code, e.g. VND-000001.

  • namestring

    The vendor's name.

Example
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "code": "VND-000001",
  "name": "Gulf Packaging"
}

The product ref object

  • idstring (id)

    Unique identifier of the product.

  • skustringnullable

    Stock-keeping unit, unique in the workspace.

  • barcodestringnullable

    The primary barcode.

  • namestring

    The product's name.

Example
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "sku": "TEA-500",
  "barcode": "6260000000017",
  "name": "Black tea 500 g"
}

The document ref object

  • idstring (id)

    The document's id.

  • numberstringnullable

    Display code; null while a draft.

  • statusstring

    The document's status.

Example
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "number": "INV-2026-00007",
  "status": "Example status"
}

The tax rate ref object

  • idstring (id)

    Unique identifier of the tax rate.

  • codestringnullable

    The tax rate's short code, if it has one.

  • rate_percentstring (decimal)

    The rate, in percent.

  • typeenum

    exclusive adds tax on top of the price; inclusive means the price already contains it.

    Possible values:exclusiveinclusive

Example
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "code": "VAT15",
  "rate_percent": "15.0000",
  "type": "exclusive"
}

The country ref object

  • codestring

    ISO 3166-1 alpha-2.

  • namestring

    The country's name.

Example
{
  "code": "IQ",
  "name": "Iraq"
}

The city ref object

  • codestringnullable

    The city's code in Reevio, if it has one.

  • namestring

    The city's name.

Example
{
  "code": "BGW",
  "name": "Baghdad"
}

The payment destination object

  • typeenum

    A bank_account or a treasury_location (a drawer, vault or collector wallet).

    Possible values:treasury_locationbank_account

  • idstring (id)

    Id of the bank account or treasury location.

  • namestring

    Name of the bank account or treasury location.

Example
{
  "type": "treasury_location",
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "name": "Main vault"
}

The sales line object

  • line_numberinteger

    Position on the document, from 1.

  • productobjectnullable

    The product.

    Fields: id, sku, barcode, name · details

  • descriptionstring

    The line's text as printed; the product name unless changed.

  • unitstringnullable

    The unit the line is sold in.

  • quantitystring (decimal)

    Quantity, in the line's unit.

  • pricestring (decimal)

    Price before any discount.

  • discounted_pricestring (decimal)nullable

    What the customer pays per unit; null when the line is not discounted.

  • subtotalstring (decimal)

    Quantity × the price paid: before exclusive tax, with inclusive tax inside it.

  • tax_rateobjectnullable

    The tax rate applied, if any.

    Fields: id, code, rate_percent, type · details

  • tax_amountstring (decimal)

    Tax on the line.

  • line_totalstring (decimal)

    The line's total including tax.

  • notesstringnullable

    Notes on the sales line.

Example
{
  "line_number": 1,
  "product": {
    "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
    "sku": "TEA-500",
    "barcode": "6260000000017",
    "name": "Black tea 500 g"
  },
  "description": "Example description.",
  "unit": "box",
  "quantity": "2.0000",
  "price": "10000.00",
  "discounted_price": "10000.00",
  "subtotal": "10000.00",
  "tax_rate": {
    "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
    "code": "VAT15",
    "rate_percent": "15.0000",
    "type": "exclusive"
  },
  "tax_amount": "10000.00",
  "line_total": "10000.00",
  "notes": "Deliver before noon."
}