Branivo API reference

Orders, catalog, payments and stock for shops.

Version
v1 (build e0b86800a573) · How versions work
Operations
7 operations

Download the OpenAPI document OpenAPI 3.1, JSON. The same file this page is built from.

Before you start

Tokens

Create a token in the app's API Tokens screen. Who may create one depends on the business's roles. Start here

API address

The API address for this product isn't published here yet. Ask support for it. The samples read it from API_BASE; the OpenAPI document uses https://api.example.com as a stand-in.

Testing

There is no public test environment for this product yet. Ask support how to test your integration safely. Testing safely

Import into Postman

Postman imports OpenAPI 3.1 directly: in Postman choose Import, then give it the file you downloaded (or this link). Set the collection's baseUrl variable to your API address and add your token as a Bearer token.

Rate limits

  • 300 requests per minute per token, and 200 requests per minute per client address.
  • Over a limit → 429 RATE_LIMITED with retry-after (seconds) and data.retry_after_seconds.
  • Every answer carries x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset and x-ratelimit-policy.
  • The server also limits every client address to 300 requests per 1 minute; repeated breaches ban the address for the window (403 with data.code RATE_LIMITED).

How to handle limits

Scopes

Each operation names the scope its token needs; any one listed is enough. A token never does more than its owner may do now. How scopes work

Scope presets

When you create a token, a preset adds several scopes at once. Changing a preset's scopes later changes every token that holds it.

PresetScopeIncludes
Orders — readpreset:orders_readbr_order:view
Orders — addpreset:orders_createbr_order:create
Products and stock — readpreset:products_readbr_product:view
Customers — readpreset:customers_readbr_customer:view

Scopes in use

ScopeUsed by
br_customer:viewList Customers, Get one Customers record
br_order:createNew order
br_order:viewList Orders, Get one Orders record
br_product:viewList Products, Get one Products record

Customers

List Customers#

GET/page/br_customers/records

The records of “Customers” in the screen's own order unless sorted, from the token's business only. A role column limit leaves out the columns its owner can't see (filters and sort on them are ignored).

Columns worked out per request (not typed here): phone_display, tags_display, address_display, addresses_display.

No free-text search here: filter a text column instead (contains, any case).

Scope: br_customer:view (its owner must hold it too).

Needs the business feature branivo_customers on; off → 404 FEATURE_DISABLED.

Scope: br_customer:view

Parameters

  • pageinteger

    Page number, from 1.

    • minimum 1
    • default: 1

    in the query

  • per_pageinteger

    Records per page (at most 100).

    • minimum 1
    • maximum 100
    • default: 20

    in the query

  • sortstring

    One field to sort by; prefix - for descending. Default: the page's own order (else newest first). Ties are broken by id, so pages never overlap.

    Columns: name, phone_display, tags_display, address_display, email, gstin, status, addresses_display, walk_in.

    • pattern: ^-?[a-zA-Z_][a-zA-Z0-9_]*$

    in the query

  • fieldsarray of string

    Read only these fields: the others come back as null (the id always comes).

    in the query

  • namestring

    Name: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • emailstring

    Email: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • gstinstring

    Gstin: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • statusstring

    Status: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: active, archived, anonymised.

    in the query

  • walk_instring

    Walk-in customer: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

Answers

  • 200A page of records.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    • pageintegerrequired

      • minimum 1
    • per_pageintegerrequired

      • minimum 1
    • recordsarray of BrCustomersrequired

    • totalintegerrequired

      Records matching, on every page.

      • minimum 0
    Example
    {
      "page": 1,
      "per_page": 1,
      "records": [
        {
          "_id": "64b000000000000000000001",
          "addresses": [
            {}
          ],
          "anonymised_at": "2026-01-15T09:30:00.000Z",
          "createdAt": "2026-01-15T09:30:00.000Z",
          "created_by": "64b000000000000000000001",
          "email": "text",
          "gstin": "text",
          "name": "text",
          "name_key": "text",
          "phone": "text",
          "status": "active",
          "tag_keys": [
            "text"
          ],
          "tags": [
            "text"
          ],
          "tenant_id": "64b000000000000000000001",
          "updatedAt": "2026-01-15T09:30:00.000Z",
          "updated_by": "64b000000000000000000001",
          "walk_in": true
        }
      ],
      "total": 1
    }
  • 400The request is malformed (query, header or body). see BadRequest

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription has ended (locked). see PaymentRequiredRead

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl "$API_BASE/page/br_customers/records?page=1&per_page=20" \
  -H "Authorization: Bearer $API_TOKEN"

Node.js

const response = await fetch(`${process.env.API_BASE}/page/br_customers/records?page=1&per_page=20`, {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
  },
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/br_customers/records?page=1&per_page=20",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/page/br_customers/records?page=1&per_page=20');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Get one Customers record#

GET/page/br_customers/records/{id}

One record of the token's business, by id; the stored record as kept (it may carry more fields than the list).

Scope: br_customer:view (its owner must hold it too).

Needs the business feature branivo_customers on; off → 404 FEATURE_DISABLED.

Scope: br_customer:view

Parameters

  • idstringrequired

    The record id.

    • pattern: ^[0-9a-fA-F]{24}$

    in the path

Answers

  • 200The record.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    Example
    {
      "record": {
        "_id": "64b000000000000000000001",
        "addresses": [
          {}
        ],
        "anonymised_at": "2026-01-15T09:30:00.000Z",
        "createdAt": "2026-01-15T09:30:00.000Z",
        "created_by": "64b000000000000000000001",
        "email": "text",
        "gstin": "text",
        "name": "text",
        "name_key": "text",
        "phone": "text",
        "status": "active",
        "tag_keys": [
          "text"
        ],
        "tags": [
          "text"
        ],
        "tenant_id": "64b000000000000000000001",
        "updatedAt": "2026-01-15T09:30:00.000Z",
        "updated_by": "64b000000000000000000001",
        "walk_in": true
      }
    }
  • 400The request is malformed (query, header or body). see BadRequest

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription has ended (locked). see PaymentRequiredRead

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl "$API_BASE/page/br_customers/records/64b000000000000000000001" \
  -H "Authorization: Bearer $API_TOKEN"

Node.js

const response = await fetch(`${process.env.API_BASE}/page/br_customers/records/64b000000000000000000001`, {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
  },
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/br_customers/records/64b000000000000000000001",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/page/br_customers/records/64b000000000000000000001');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Orders

New order#

POST/action/br_order_add/run

Runs “New order” as the token's owner, in the token's business.

Scope: br_order:create (this action only creates records). The owner must hold it too.

Field limits (length, range, pattern, choices) are the ones the app's forms apply; send values within them.

Needs the business feature branivo_orders on; off → 404 FEATURE_DISABLED.

Scope: br_order:create

Request bodyrequired

object

  • customeranyrequired

    Customer. Search by name or phone, or type a new customer's name. A value from br_customers (lookup).

  • linesarray of objectrequired

    Items. Pick a product, or type a new product's name with its price and GST.

    • [ ]object

      • amountany

        Amount (₹)

      • amount_gstany

        With GST

      • discountany

        Discount (₹)

      • gst_rateany

        GST

      • list_price_paiseany

        list_price_paise

      • pidany

        pid

      • priceany

        Price (₹)

      • productany

        Product

      • qtyany

        Qty

      • tax_includedany

        tax_included

      May hold more fields than listed.

  • address_citystring

    City.

    • at most 60 characters
  • address_line1string

    Address line 1. Leave empty to use the customer's saved address.

    • at most 120 characters
  • address_line2string

    Address line 2.

    • at most 120 characters
  • address_pinstring

    PIN.

    • at most 6 characters
  • address_stateone of the values below

    State. Shown as: ` = Not set; 35 = Andaman and Nicobar Islands; 37 = Andhra Pradesh; 12 = Arunachal Pradesh; 18 = Assam; 10 = Bihar; 04 = Chandigarh; 22 = Chhattisgarh; 26 = Dadra and Nagar Haveli and Daman and Diu; 07 = Delhi; 30 = Goa; 24 = Gujarat; 06 = Haryana; 02 = Himachal Pradesh; 01 = Jammu and Kashmir; 20 = Jharkhand; 29 = Karnataka; 32 = Kerala; 38 = Ladakh; 31 = Lakshadweep; 23 = Madhya Pradesh; 27 = Maharashtra; 14 = Manipur; 17 = Meghalaya; 15 = Mizoram; 13 = Nagaland; 21 = Odisha; 97 = Other Territory; 34 = Puducherry; 03 = Punjab; 08 = Rajasthan; 11 = Sikkim; 33 = Tamil Nadu; 36 = Telangana; 16 = Tripura; 09 = Uttar Pradesh; 05 = Uttarakhand; 19` = West Bengal.

    One of: , 35, 37, 12, 18, 10, 04, 22, 26, 07, 30, 24, 06, 02, 01, 20, 29, 32, 38, 31, 23, 27, 14, 17, 15, 13, 21, 97, 34, 03, 08, 11, 33, 36, 16, 09, 05, 19

  • branch_idany

    branch_id.

  • channelone of the values below

    Channel. Shown as: whatsapp = WhatsApp; instagram = Instagram; facebook = Facebook; website = Website; offline = Shop / offline; other = Other.

    One of: whatsapp, instagram, facebook, website, offline, other

  • couponstring

    Discount code. A coupon code the customer gave you (optional). The discount is spread over the items before GST. Used only when coupons_on is yes.

    • at most 20 characters
  • coupons_onany

    coupons_on.

  • customer_phonestring

    Phone. Needed for a new customer.

    • at most 20 characters
  • notesstring

    Notes.

    • at most 1000 characters
  • payment_modeone of the values below

    Payment mode. Shown as: ` = Not set; cod = Cash on delivery; cash = Cash; upi = UPI; bank = Bank transfer; card` = Card.

    One of: , cod, cash, upi, bank, card

  • shippingnumber

    Shipping charge (₹). What the customer pays for delivery, GST included.

    • minimum 0

May hold more fields than listed.

Example
{
  "address_city": "text",
  "address_line1": "text",
  "address_line2": "text",
  "address_pin": "text",
  "address_state": "",
  "channel": "whatsapp",
  "coupon": "text",
  "customer_phone": "text",
  "lines": [
    {}
  ],
  "notes": "text",
  "payment_mode": "",
  "shipping": 0
}

Answers

  • 200The run finished.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    • recordsarray of BrOrdersrequired

      The records the run wrote, as stored.

    • successconstantrequired

      Always: true

    • metaobject

      Extra outputs of the run (only when the run produced some).

    Example
    {
      "records": [
        {
          "_id": "64b000000000000000000001",
          "awb": "text",
          "branch_id": "64b000000000000000000001",
          "cash_given_paise": 1,
          "change_paise": 1,
          "channel": "text",
          "coupon_code": "text",
          "coupon_discount_paise": 1,
          "coupon_id": "64b000000000000000000001",
          "courier": "text",
          "createdAt": "2026-01-15T09:30:00.000Z",
          "created_by": "64b000000000000000000001",
          "customer_gstin": "text",
          "customer_id": "64b000000000000000000001",
          "customer_name": "text",
          "customer_phone": "text",
          "display_number": "text",
          "invoice_cancelled_at": "2026-01-15T09:30:00.000Z",
          "invoice_id": "64b000000000000000000001",
          "invoice_number": "text",
          "invoice_sync_due_at": "2026-01-15T09:30:00.000Z",
          "item_count": 1,
          "lines": [
            {}
          ],
          "notes": "text",
          "number": 1,
          "paid_paise": 1,
          "payment_mode": "text",
          "payment_status": "unpaid",
          "receipt": "text",
          "refund_due_paise": 1,
          "refund_owed": true,
          "refunded_paise": 1,
          "returned_paise": 1,
          "round_off_paise": 1,
          "sale_key": "text",
          "shift_id": "64b000000000000000000001",
          "ship_pin": "text",
          "shipped_at": "2026-01-15T09:30:00.000Z",
          "shipping_paise": 1,
          "shipping_returned": true,
          "source": "text",
          "status": "new",
          "stock_committed": true,
          "supply": "intra_state",
          "tax_kind": "text",
          "tax_paise": 1,
          "taxable_paise": 1,
          "tenant_id": "64b000000000000000000001",
          "total_paise": 1,
          "tracking_url": "text",
          "updatedAt": "2026-01-15T09:30:00.000Z",
          "updated_by": "64b000000000000000000001",
          "version": 1
        }
      ],
      "success": true
    }
  • 400The action refused the input: `errors` names each field and what is wrong. see ValidationFailed

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription allows no changes now (grace period: read-only; ended: locked). see PaymentRequiredWrite

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl -X POST "$API_BASE/action/br_order_add/run" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "address_city": "text",
  "address_line1": "text",
  "address_line2": "text",
  "address_pin": "text",
  "address_state": "",
  "channel": "whatsapp",
  "coupon": "text",
  "customer_phone": "text",
  "lines": [
    {}
  ],
  "notes": "text",
  "payment_mode": "",
  "shipping": 0
}'

Node.js

const response = await fetch(`${process.env.API_BASE}/action/br_order_add/run`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "address_city": "text",
    "address_line1": "text",
    "address_line2": "text",
    "address_pin": "text",
    "address_state": "",
    "channel": "whatsapp",
    "coupon": "text",
    "customer_phone": "text",
    "lines": [
      {}
    ],
    "notes": "text",
    "payment_mode": "",
    "shipping": 0
  }),
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.post(
    f"{os.environ['API_BASE']}/action/br_order_add/run",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    json={
      "address_city": "text",
      "address_line1": "text",
      "address_line2": "text",
      "address_pin": "text",
      "address_state": "",
      "channel": "whatsapp",
      "coupon": "text",
      "customer_phone": "text",
      "lines": [
        {}
      ],
      "notes": "text",
      "payment_mode": "",
      "shipping": 0
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/action/br_order_add/run');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
$headers[] = 'Content-Type: application/json';
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => json_encode([
      'address_city' => 'text',
      'address_line1' => 'text',
      'address_line2' => 'text',
      'address_pin' => 'text',
      'address_state' => '',
      'channel' => 'whatsapp',
      'coupon' => 'text',
      'customer_phone' => 'text',
      'lines' => [
        []
      ],
      'notes' => 'text',
      'payment_mode' => '',
      'shipping' => 0
    ]),
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

List Orders#

GET/page/br_orders/records

The records of “Orders” in the screen's own order unless sorted, from the token's business only. A role column limit leaves out the columns its owner can't see (filters and sort on them are ignored).

Columns worked out per request (not typed here): phone_display, items_display, total_amount, address_display, taxable_amount, tax_amount, shipping_amount, round_off_amount, paid_amount, due_amount, returned_amount, refunded_amount, refund_due_amount, coupon_display.

No free-text search here: filter a text column instead (contains, any case).

Scope: br_order:view (its owner must hold it too).

Needs the business feature branivo_orders on; off → 404 FEATURE_DISABLED.

Scope: br_order:view

Parameters

  • pageinteger

    Page number, from 1.

    • minimum 1
    • default: 1

    in the query

  • per_pageinteger

    Records per page (at most 100).

    • minimum 1
    • maximum 100
    • default: 20

    in the query

  • sortstring

    One field to sort by; prefix - for descending. Default: the page's own order (else newest first). Ties are broken by id, so pages never overlap.

    Columns: display_number, createdAt, customer_name, phone_display, items_display, total_amount, status, payment_status, channel, item_count, address_display, ship_pin, payment_mode, courier, awb, tracking_url, receipt, customer_gstin, taxable_amount, tax_amount, shipping_amount, round_off_amount, paid_amount, due_amount, returned_amount, refunded_amount, refund_due_amount, notes, invoice_number, coupon_display, next_statuses, source, branch_id, movable, editable, version, invoice_id, has_invoice, invoiceable, payable, invoice_cancellable, refundable, returnable, refund_owed.

    • pattern: ^-?[a-zA-Z_][a-zA-Z0-9_]*$

    in the query

  • fieldsarray of string

    Read only these fields: the others come back as null (the id always comes).

    in the query

  • display_numberstring

    Display Number: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • createdAtstring

    Date: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • customer_namestring

    Customer Name: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • statusstring

    Status: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: new, accepted, processing, packed, ready_for_shipment, shipped, out_for_delivery, delivered, rejected, cancelled, rto, return_requested, returned, refunded.

    in the query

  • payment_statusstring

    Payment: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: unpaid, partial, paid, refunded.

    in the query

  • channelstring

    Channel: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: whatsapp, instagram, facebook, website, offline, other.

    in the query

  • item_countnumber

    Item Count: equal to this number. Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • ship_pinstring

    Ship Pin: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • payment_modestring

    Payment mode: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: cod, cash, upi, bank, card.

    in the query

  • courierstring

    Courier: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • awbstring

    Awb: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • tracking_urlstring

    Tracking Url: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • receiptstring

    Receipt: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • customer_gstinstring

    Customer Gstin: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • notesstring

    Notes: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • invoice_numberstring

    Invoice Number: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • sourcestring

    source: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • branch_idstring

    branch_id: this record id exactly. Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • versionstring

    version: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • invoice_idstring

    invoice_id: this record id exactly. Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • refund_owedstring

    refund_owed: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

Answers

  • 200A page of records.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    • pageintegerrequired

      • minimum 1
    • per_pageintegerrequired

      • minimum 1
    • recordsarray of BrOrdersrequired

    • totalintegerrequired

      Records matching, on every page.

      • minimum 0
    Example
    {
      "page": 1,
      "per_page": 1,
      "records": [
        {
          "_id": "64b000000000000000000001",
          "awb": "text",
          "branch_id": "64b000000000000000000001",
          "cash_given_paise": 1,
          "change_paise": 1,
          "channel": "text",
          "coupon_code": "text",
          "coupon_discount_paise": 1,
          "coupon_id": "64b000000000000000000001",
          "courier": "text",
          "createdAt": "2026-01-15T09:30:00.000Z",
          "created_by": "64b000000000000000000001",
          "customer_gstin": "text",
          "customer_id": "64b000000000000000000001",
          "customer_name": "text",
          "customer_phone": "text",
          "display_number": "text",
          "invoice_cancelled_at": "2026-01-15T09:30:00.000Z",
          "invoice_id": "64b000000000000000000001",
          "invoice_number": "text",
          "invoice_sync_due_at": "2026-01-15T09:30:00.000Z",
          "item_count": 1,
          "lines": [
            {}
          ],
          "notes": "text",
          "number": 1,
          "paid_paise": 1,
          "payment_mode": "text",
          "payment_status": "unpaid",
          "receipt": "text",
          "refund_due_paise": 1,
          "refund_owed": true,
          "refunded_paise": 1,
          "returned_paise": 1,
          "round_off_paise": 1,
          "sale_key": "text",
          "shift_id": "64b000000000000000000001",
          "ship_pin": "text",
          "shipped_at": "2026-01-15T09:30:00.000Z",
          "shipping_paise": 1,
          "shipping_returned": true,
          "source": "text",
          "status": "new",
          "stock_committed": true,
          "supply": "intra_state",
          "tax_kind": "text",
          "tax_paise": 1,
          "taxable_paise": 1,
          "tenant_id": "64b000000000000000000001",
          "total_paise": 1,
          "tracking_url": "text",
          "updatedAt": "2026-01-15T09:30:00.000Z",
          "updated_by": "64b000000000000000000001",
          "version": 1
        }
      ],
      "total": 1
    }
  • 400The request is malformed (query, header or body). see BadRequest

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription has ended (locked). see PaymentRequiredRead

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl "$API_BASE/page/br_orders/records?page=1&per_page=20" \
  -H "Authorization: Bearer $API_TOKEN"

Node.js

const response = await fetch(`${process.env.API_BASE}/page/br_orders/records?page=1&per_page=20`, {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
  },
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/br_orders/records?page=1&per_page=20",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/page/br_orders/records?page=1&per_page=20');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Get one Orders record#

GET/page/br_orders/records/{id}

One record of the token's business, by id; the stored record as kept (it may carry more fields than the list).

Scope: br_order:view (its owner must hold it too).

Needs the business feature branivo_orders on; off → 404 FEATURE_DISABLED.

Scope: br_order:view

Parameters

  • idstringrequired

    The record id.

    • pattern: ^[0-9a-fA-F]{24}$

    in the path

Answers

  • 200The record.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    Example
    {
      "record": {
        "_id": "64b000000000000000000001",
        "awb": "text",
        "branch_id": "64b000000000000000000001",
        "cash_given_paise": 1,
        "change_paise": 1,
        "channel": "text",
        "coupon_code": "text",
        "coupon_discount_paise": 1,
        "coupon_id": "64b000000000000000000001",
        "courier": "text",
        "createdAt": "2026-01-15T09:30:00.000Z",
        "created_by": "64b000000000000000000001",
        "customer_gstin": "text",
        "customer_id": "64b000000000000000000001",
        "customer_name": "text",
        "customer_phone": "text",
        "display_number": "text",
        "invoice_cancelled_at": "2026-01-15T09:30:00.000Z",
        "invoice_id": "64b000000000000000000001",
        "invoice_number": "text",
        "invoice_sync_due_at": "2026-01-15T09:30:00.000Z",
        "item_count": 1,
        "lines": [
          {}
        ],
        "notes": "text",
        "number": 1,
        "paid_paise": 1,
        "payment_mode": "text",
        "payment_status": "unpaid",
        "receipt": "text",
        "refund_due_paise": 1,
        "refund_owed": true,
        "refunded_paise": 1,
        "returned_paise": 1,
        "round_off_paise": 1,
        "sale_key": "text",
        "shift_id": "64b000000000000000000001",
        "ship_pin": "text",
        "shipped_at": "2026-01-15T09:30:00.000Z",
        "shipping_paise": 1,
        "shipping_returned": true,
        "source": "text",
        "status": "new",
        "stock_committed": true,
        "supply": "intra_state",
        "tax_kind": "text",
        "tax_paise": 1,
        "taxable_paise": 1,
        "tenant_id": "64b000000000000000000001",
        "total_paise": 1,
        "tracking_url": "text",
        "updatedAt": "2026-01-15T09:30:00.000Z",
        "updated_by": "64b000000000000000000001",
        "version": 1
      }
    }
  • 400The request is malformed (query, header or body). see BadRequest

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription has ended (locked). see PaymentRequiredRead

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl "$API_BASE/page/br_orders/records/64b000000000000000000001" \
  -H "Authorization: Bearer $API_TOKEN"

Node.js

const response = await fetch(`${process.env.API_BASE}/page/br_orders/records/64b000000000000000000001`, {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
  },
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/br_orders/records/64b000000000000000000001",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/page/br_orders/records/64b000000000000000000001');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Products

List Products#

GET/page/br_products/records

The records of “Products” in the screen's own order unless sorted, from the token's business only. A role column limit leaves out the columns its owner can't see (filters and sort on them are ignored).

Columns worked out per request (not typed here): price_amount, on_hand, cost_amount, low_stock.

No free-text search here: filter a text column instead (contains, any case).

Scope: br_product:view (its owner must hold it too).

Needs the business feature branivo_catalog on; off → 404 FEATURE_DISABLED.

Scope: br_product:view

Parameters

  • pageinteger

    Page number, from 1.

    • minimum 1
    • default: 1

    in the query

  • per_pageinteger

    Records per page (at most 100).

    • minimum 1
    • maximum 100
    • default: 20

    in the query

  • sortstring

    One field to sort by; prefix - for descending. Default: the page's own order (else newest first). Ties are broken by id, so pages never overlap.

    Columns: image, name, sku, category_name, unit, price_amount, gst_rate_bps, on_hand, stock_state, hsn_sac, barcode, cost_amount, low_stock, tax_inclusive, in_store, status, description, images.

    • pattern: ^-?[a-zA-Z_][a-zA-Z0-9_]*$

    in the query

  • fieldsarray of string

    Read only these fields: the others come back as null (the id always comes).

    in the query

  • imagestring

    Image: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • namestring

    Name: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • skustring

    SKU: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • category_namestring

    Category: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • unitstring

    Unit: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: pcs, kg, g, l, ml, m, box, pack, dozen, pair, set.

    in the query

  • gst_rate_bpsnumber

    GST rate: equal to this number. Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • stock_statestring

    Stock: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: ok, low, out, below_zero.

    in the query

  • hsn_sacstring

    HSN / SAC: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • barcodestring

    Barcode: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • tax_inclusivestring

    Tax Inclusive: true or false.

    One of: true, false

    in the query

  • in_storestring

    In Store: true or false.

    One of: true, false

    in the query

  • statusstring

    Status: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them. Values: active, archived.

    in the query

  • descriptionstring

    Description: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

  • imagesstring

    Images: contains this text (any case). Several values (a JSON list such as ["a","b"], or the parameter repeated) match a record equal to any of them.

    in the query

Answers

  • 200A page of records.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    • pageintegerrequired

      • minimum 1
    • per_pageintegerrequired

      • minimum 1
    • recordsarray of BrProductsrequired

    • totalintegerrequired

      Records matching, on every page.

      • minimum 0
    Example
    {
      "page": 1,
      "per_page": 1,
      "records": [
        {
          "_id": "64b000000000000000000001",
          "barcode": "text",
          "category_id": "64b000000000000000000001",
          "category_name": "text",
          "cost_paise": 1,
          "createdAt": "2026-01-15T09:30:00.000Z",
          "created_by": "64b000000000000000000001",
          "description": "text",
          "group_id": "64b000000000000000000001",
          "gst_rate_bps": 1,
          "hsn_sac": "text",
          "image": "text",
          "images": [
            "text"
          ],
          "in_store": true,
          "low_stock_milli": 1,
          "name": "text",
          "name_key": "text",
          "on_hand_milli": 1,
          "option_values": [
            {}
          ],
          "price_paise": 1,
          "quick_added": true,
          "reorder_branch_ids": [
            "64b000000000000000000001"
          ],
          "sku": "text",
          "sku_key": "text",
          "status": "active",
          "stock_state": "ok",
          "tax_inclusive": true,
          "tenant_id": "64b000000000000000000001",
          "unit": "text",
          "updatedAt": "2026-01-15T09:30:00.000Z",
          "updated_by": "64b000000000000000000001",
          "variant_key": "text"
        }
      ],
      "total": 1
    }
  • 400The request is malformed (query, header or body). see BadRequest

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription has ended (locked). see PaymentRequiredRead

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl "$API_BASE/page/br_products/records?page=1&per_page=20" \
  -H "Authorization: Bearer $API_TOKEN"

Node.js

const response = await fetch(`${process.env.API_BASE}/page/br_products/records?page=1&per_page=20`, {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
  },
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/br_products/records?page=1&per_page=20",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/page/br_products/records?page=1&per_page=20');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Get one Products record#

GET/page/br_products/records/{id}

One record of the token's business, by id; the stored record as kept (it may carry more fields than the list).

Scope: br_product:view (its owner must hold it too).

Needs the business feature branivo_catalog on; off → 404 FEATURE_DISABLED.

Scope: br_product:view

Parameters

  • idstringrequired

    The record id.

    • pattern: ^[0-9a-fA-F]{24}$

    in the path

Answers

  • 200The record.

    Headers: x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

    object

    Example
    {
      "record": {
        "_id": "64b000000000000000000001",
        "barcode": "text",
        "category_id": "64b000000000000000000001",
        "category_name": "text",
        "cost_paise": 1,
        "createdAt": "2026-01-15T09:30:00.000Z",
        "created_by": "64b000000000000000000001",
        "description": "text",
        "group_id": "64b000000000000000000001",
        "gst_rate_bps": 1,
        "hsn_sac": "text",
        "image": "text",
        "images": [
          "text"
        ],
        "in_store": true,
        "low_stock_milli": 1,
        "name": "text",
        "name_key": "text",
        "on_hand_milli": 1,
        "option_values": [
          {}
        ],
        "price_paise": 1,
        "quick_added": true,
        "reorder_branch_ids": [
          "64b000000000000000000001"
        ],
        "sku": "text",
        "sku_key": "text",
        "status": "active",
        "stock_state": "ok",
        "tax_inclusive": true,
        "tenant_id": "64b000000000000000000001",
        "unit": "text",
        "updatedAt": "2026-01-15T09:30:00.000Z",
        "updated_by": "64b000000000000000000001",
        "variant_key": "text"
      }
    }
  • 400The request is malformed (query, header or body). see BadRequest

  • 401The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens. see Unauthorized

  • 402The business's subscription has ended (locked). see PaymentRequiredRead

  • 403Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now. see Forbidden

  • 404Not found, or the feature behind it is off for this business. see NotFound

  • 429Over a rate limit. Wait `retry-after` seconds (also in `data.retry_after_seconds`) and try again. see TooManyRequests

  • 500Something failed on the server. The message is always generic; retry later. see ServerError

Code samples

curl

curl "$API_BASE/page/br_products/records/64b000000000000000000001" \
  -H "Authorization: Bearer $API_TOKEN"

Node.js

const response = await fetch(`${process.env.API_BASE}/page/br_products/records/64b000000000000000000001`, {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
  },
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.data?.code ?? ""} ${answer.message}`);

Python

import os
import requests

response = requests.get(
    f"{os.environ['API_BASE']}/page/br_products/records/64b000000000000000000001",
    headers={
        "Authorization": f"Bearer {os.environ['API_TOKEN']}",
    },
    timeout=30,
)
answer = response.json()
response.raise_for_status()

PHP

<?php
$ch = curl_init(getenv('API_BASE') . '/page/br_products/records/64b000000000000000000001');
$headers = ['Authorization: Bearer ' . getenv('API_TOKEN')];
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Error answers

Every error has the same shape (the Error schema). Branch on data.code, show message. How to handle errors

BadRequest

The request is malformed (query, header or body).

Example: A record id that isn't a valid id
{
  "className": "bad-request",
  "code": 400,
  "data": {},
  "errors": {
    "id": "Invalid record id."
  },
  "message": "Invalid record id.",
  "name": "BadRequest"
}
Example: A query value outside the documented schema
{
  "className": "bad-request",
  "code": 400,
  "errors": {},
  "message": "Invalid request.",
  "name": "BadRequest"
}

Conflict

Same Idempotency-Key: the first request is still running, or its result wasn't kept.

Example: Still running
{
  "className": "conflict",
  "code": 409,
  "data": {
    "code": "IDEMPOTENCY_IN_PROGRESS"
  },
  "errors": {},
  "message": "A request with this Idempotency-Key is still being processed. Try again shortly.",
  "name": "Conflict"
}
Example: Done, result not kept
{
  "className": "conflict",
  "code": 409,
  "data": {
    "code": "IDEMPOTENCY_RESULT_UNAVAILABLE"
  },
  "errors": {},
  "message": "This request was already completed, but its result can't be shown again. Refresh to see it.",
  "name": "Conflict"
}

Forbidden

Not allowed: the token's scopes don't cover this operation, or its owner doesn't hold the permission now.

Example: The token's owner doesn't hold the permission
{
  "className": "forbidden",
  "code": 403,
  "data": {
    "code": "ACCESS_DENIED"
  },
  "errors": {},
  "message": "You don't have permission to do this.",
  "name": "Forbidden"
}
Example: Too many refused requests from this address: banned for the window
{
  "className": "forbidden",
  "code": 403,
  "data": {
    "code": "RATE_LIMITED",
    "retry_after_seconds": 30
  },
  "errors": {},
  "message": "Rate limit exceeded, retry in 1 minute",
  "name": "Forbidden"
}
Example: Refused by the screen's own rule
{
  "message": "Access denied"
}
Example: Token scopes don't cover the permission
{
  "className": "forbidden",
  "code": 403,
  "data": {
    "code": "API_TOKEN_SCOPE_DENIED"
  },
  "errors": {},
  "message": "This API token isn't allowed to do this.",
  "name": "Forbidden"
}

NotFound

Not found, or the feature behind it is off for this business.

Example: Feature off for this business
{
  "className": "not-found",
  "code": 404,
  "data": {
    "code": "FEATURE_DISABLED"
  },
  "errors": {},
  "message": "Not found",
  "name": "NotFound"
}
Example: No such record
{
  "message": "Record not found"
}

PaymentRequiredPlanLimit

The subscription allows no changes now, or the plan's limit for this kind of record is reached.

Example: Subscription expired
{
  "className": "payment-required",
  "code": 402,
  "data": {
    "code": "SUBSCRIPTION_EXPIRED"
  },
  "errors": {},
  "message": "This workspace is locked.",
  "name": "PaymentRequired"
}
Example: Plan limit reached
{
  "className": "payment-required",
  "code": 402,
  "data": {
    "code": "PLAN_LIMIT_REACHED",
    "key": "records",
    "limit": 100,
    "used": 100
  },
  "errors": {},
  "message": "Your plan's limit has been reached. Upgrade to add more.",
  "name": "PaymentRequired"
}
Example: Subscription in grace (read-only)
{
  "className": "payment-required",
  "code": 402,
  "data": {
    "code": "SUBSCRIPTION_READ_ONLY"
  },
  "errors": {},
  "message": "This workspace is read-only.",
  "name": "PaymentRequired"
}

PaymentRequiredRead

The business's subscription has ended (locked).

Example: Subscription expired
{
  "className": "payment-required",
  "code": 402,
  "data": {
    "code": "SUBSCRIPTION_EXPIRED"
  },
  "errors": {},
  "message": "This workspace is locked.",
  "name": "PaymentRequired"
}

PaymentRequiredWrite

The business's subscription allows no changes now (grace period: read-only; ended: locked).

Example: Subscription expired
{
  "className": "payment-required",
  "code": 402,
  "data": {
    "code": "SUBSCRIPTION_EXPIRED"
  },
  "errors": {},
  "message": "This workspace is locked.",
  "name": "PaymentRequired"
}
Example: Subscription in grace (read-only)
{
  "className": "payment-required",
  "code": 402,
  "data": {
    "code": "SUBSCRIPTION_READ_ONLY"
  },
  "errors": {},
  "message": "This workspace is read-only.",
  "name": "PaymentRequired"
}

ServerError

Something failed on the server. The message is always generic; retry later.

Example: Unexpected failure
{
  "className": "internal-server-error",
  "code": 500,
  "errors": {},
  "message": "Something went wrong. Please try again.",
  "name": "InternalServerError"
}

TooManyRequests

Over a rate limit. Wait retry-after seconds (also in data.retry_after_seconds) and try again.

Headers: retry-after, x-ratelimit-limit, x-ratelimit-policy, x-ratelimit-remaining, x-ratelimit-reset

Example: Per-token limit reached
{
  "className": "too-many-requests",
  "code": 429,
  "data": {
    "code": "RATE_LIMITED",
    "retry_after_seconds": 30
  },
  "errors": {},
  "message": "RATE_LIMITED",
  "name": "TooManyRequests"
}

Unauthorized

The API token can't be used: unknown, revoked, disabled or expired, its owner is no longer active, or this route isn't open to API tokens.

Example: Token unknown, revoked, expired or owner inactive
{
  "className": "unauthorized",
  "code": 401,
  "data": {
    "code": "API_TOKEN_OWNER_INACTIVE"
  },
  "errors": {},
  "message": "This API token is no longer valid.",
  "name": "Unauthorized"
}
Example: This route isn't open to API tokens
{
  "className": "unauthorized",
  "code": 401,
  "data": {
    "code": "API_TOKEN_SCOPE_DENIED"
  },
  "errors": {},
  "message": "This API token isn't allowed to do this.",
  "name": "Unauthorized"
}

Unprocessable

This Idempotency-Key was already used with a different body.

Example: Key reused with another body
{
  "className": "unprocessable",
  "code": 422,
  "data": {
    "code": "IDEMPOTENCY_KEY_REUSED"
  },
  "errors": {},
  "message": "This Idempotency-Key was already used for a different request.",
  "name": "Unprocessable"
}

ValidationFailed

The action refused the input: errors names each field and what is wrong.

Example: Field errors
{
  "className": "bad-request",
  "code": 400,
  "data": {},
  "errors": {
    "name": "Name is required."
  },
  "message": "Please fix the highlighted fields",
  "name": "BadRequest"
}
Example: A malformed Idempotency-Key (actions that use it)
{
  "className": "bad-request",
  "code": 400,
  "data": {
    "code": "IDEMPOTENCY_KEY_INVALID"
  },
  "errors": {},
  "message": "The Idempotency-Key must be 1–128 letters, digits, '.', '_', ':' or '-'.",
  "name": "BadRequest"
}

Schemas

BrCustomers

Used by: List Customers, Get one Customers record

object

  • _idstringrequired

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • addressesarray of object or null

  • anonymised_atstring or null

    • format: date-time
  • billing_addressany

  • created_bystring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • createdAtstring or null

    • format: date-time
  • emailstring or null

  • gstinstring or null

  • namestring or null

  • name_keystring or null

  • phonestring or null

  • statusstring or null

    One of: active, archived, anonymised, null

  • tag_keysarray of string or null

  • tagsarray of string or null

  • tenant_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • updated_bystring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • updatedAtstring or null

    • format: date-time
  • walk_inboolean or null

May hold more fields than listed.

BrOrders

Used by: New order, List Orders, Get one Orders record

object

  • _idstringrequired

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • addressany

  • awbstring or null

  • branch_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • cash_given_paisenumber or null

  • change_paisenumber or null

  • channelstring or null

  • coupon_codestring or null

  • coupon_discount_paisenumber or null

  • coupon_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • courierstring or null

  • created_bystring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • createdAtstring or null

    • format: date-time
  • customer_gstinstring or null

  • customer_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • customer_namestring or null

  • customer_phonestring or null

  • display_numberstring or null

  • invoice_cancelled_atstring or null

    • format: date-time
  • invoice_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • invoice_numberstring or null

  • invoice_sync_due_atstring or null

    • format: date-time
  • item_countnumber or null

  • linesarray of object or null

  • notesstring or null

  • numbernumber or null

  • paid_paisenumber or null

  • payment_modestring or null

  • payment_statusstring or null

    One of: unpaid, partial, paid, refunded, null

  • receiptstring or null

  • refund_due_paisenumber or null

  • refund_owedboolean or null

  • refunded_paisenumber or null

  • returned_paisenumber or null

  • round_off_paisenumber or null

  • sale_keystring or null

  • shift_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • ship_pinstring or null

  • shipped_atstring or null

    • format: date-time
  • shipping_paisenumber or null

  • shipping_returnedboolean or null

  • sourcestring or null

  • statusstring or null

    One of: new, accepted, processing, packed, ready_for_shipment, shipped, out_for_delivery, delivered, rejected, cancelled, rto, return_requested, returned, refunded, null

  • stock_committedboolean or null

  • supplystring or null

    One of: intra_state, inter_state, null

  • tax_kindstring or null

  • tax_paisenumber or null

  • taxable_paisenumber or null

  • tenant_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • total_paisenumber or null

  • tracking_urlstring or null

  • updated_bystring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • updatedAtstring or null

    • format: date-time
  • versionnumber or null

May hold more fields than listed.

BrProducts

Used by: List Products, Get one Products record

object

  • _idstringrequired

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • barcodestring or null

  • category_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • category_namestring or null

  • cost_paisenumber or null

  • created_bystring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • createdAtstring or null

    • format: date-time
  • descriptionstring or null

  • group_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • gst_rate_bpsnumber or null

  • hsn_sacstring or null

  • imagestring or null

  • imagesarray of string or null

  • in_storeboolean or null

  • low_stock_millinumber or null

  • namestring or null

  • name_keystring or null

  • on_hand_millinumber or null

  • option_valuesarray of object or null

  • price_paisenumber or null

  • quick_addedboolean or null

  • reorder_branch_idsarray of string or null

    • [ ]string

      A record id.

      • pattern: ^[0-9a-fA-F]{24}$
  • skustring or null

  • sku_keystring or null

  • statusstring or null

    One of: active, archived, null

  • stock_statestring or null

    One of: ok, low, out, null

  • tax_inclusiveboolean or null

  • tenant_idstring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • unitstring or null

  • updated_bystring or null

    A record id.

    • pattern: ^[0-9a-fA-F]{24}$
  • updatedAtstring or null

    • format: date-time
  • variant_keystring or null

May hold more fields than listed.

Error

object

An error answer. message is always there; the rest comes with every error the server's error handler shapes (a route's own refusal may carry message only).

  • messagestringrequired

    Readable text; show it, never parse it.

  • classNamestring

  • codeinteger

    The HTTP status again.

  • dataobject

    code is the typed error code to branch on. Some codes add keys: RATE_LIMITED → retry_after_seconds; PLAN_LIMIT_REACHED → key, limit, used.

    • codestring

    • keystring

    • kindstring

    • limitnumber

    • retry_after_secondsinteger

      • minimum 1
    • usednumber

    May hold more fields than listed.

  • errorsobject

    Field key → what is wrong with it (validation refusals).

  • namestring

    Error class, e.g. Unauthorized

May hold more fields than listed.