POST

Order.List

Return orders_for_cust rows. Customer-wise: send cust_id (profile Orders List). Order-wise: send order_id = catalog orders.id (dashboard order report / get_customer_record_by_orders). Both may be sent together. Includes custom_fields, order_status label/color, and customer_name on order-wise rows.

Permissions

  • User must be logged in with a valid bearer token.
  • The user must be from the same company domain as the request Host (call the API on that account subdomain or allowed custom domain). A token from another company returns success=0, error user_not_in_company.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Returns Order rows as JSON.
  • Supports the documented filters and paging fields.
  • List responses are capped at 25 rows per call.

Push Service

No push is sent because this function only reads data or returns helper information.

Automation

No automation is run for this function.

Special Instructions

  • On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
  • Customer portal alias (cust_id from JWT): Customer.Orders.List / Get / FormData.
  • Send at least one of: cust_id (aliases customer_id, c_id) OR order_id (aliases catalog_order_id, product_order_id).
  • order_id is the catalog product id from Order.Catalog — not the list Order Number (that is orders_for_cust.id / order_numbr).
  • list_mode in the response is customer, order, or customer_and_order.
  • Requires module_orders permission.
  • Custom field filters: custom_field__order-1731…=value.
  • total_serch_price / from_to_date use from---@---to format.
  • Page size default 25, max 100.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
cust_id
post
int108545Customer-wise filter. Aliases: customer_id, c_id. Required if order_id is omitted.
order_id
post
int55Order-wise filter = catalog orders.id. Aliases: catalog_order_id, product_order_id. Required if cust_id is omitted.
start
post
int0Offset. Alias: offset.
limit
post
int25Page size (max 100). Aliases: length, per_page.
paid_val
post
int0Filter paid_status. Alias: paid_status.
note
post
stringthis is T-shirt noteExact notes match. Alias: notes.
order
post
stringT-shirtExact catalog orders.name.
order_numbr
post
int267974orders_for_cust.id (Order Number row filter).
total_serch_price
post
string10---@---100total_price between from---@---to.
from_to_date
post
string2026-01-01---@---2026-12-31date between from---@---to. Or use from_date/to_date.
order_status_id
post
array|string12,15Filter by order_status ids.

Authentication

Send the bearer token returned by Login in the request header. The user must be from the same company domain as this Host — a token from another company is rejected (user_not_in_company).

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Order.List",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body_customer": {
        "cust_id": "108545",
        "limit": "25"
    },
    "body": {
        "order_id": "55",
        "limit": "25"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Order.List",
    "url_domain": "https:\/\/{domain}\/app\/Order.List"
}

Endpoint

POST /app/Order.List
POST https://{user}.bull36.com/app/Order.List
POST https://{domain}/app/Order.List

Sample Output

{
    "success": 1,
    "count": 5,
    "list_mode": "order",
    "order_id": 55,
    "order_name": "Product A",
    "data": [
        {
            "id": 267974,
            "orders_for_cust_id": 267974,
            "cust_id": 108545,
            "customer_name": "Paril sadguru 12345",
            "total_price": "18",
            "order_status": 12,
            "order_name": "Product A",
            "custom_fields": {
                "order-1731": "opt1"
            }
        }
    ]
}

Count Only

Use the matching count route with the same filters when the UI only needs total rows for paging.

{
    "url": "\/app\/Order.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/Order.Count",
    "url_domain": "https:\/\/{domain}\/app\/Order.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "order_id": "55"
    },
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "count": "Use the matching count route when available, or count returned rows.",
        "max_limit": 25
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('order_id', '55');

const res = await fetch('https://{domain}/app/Order.Count', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}` },
  body
});
const data = await res.json();
console.log(data.count);

JavaScript Example

// Customer-wise
let body = new URLSearchParams({ cust_id: '108545', limit: '25' });
// Order-wise (catalog order id)
body = new URLSearchParams({ order_id: '55', limit: '25' });
const res = await fetch('/app/Order.List', { method: 'POST', headers: { Authorization: 'Bearer YOUR TOKEN' }, body });
console.log(await res.json());

Error Example

{
    "success": 0,
    "message": "Missing required parameter: cust_id or order_id"
}