POST

Order.Count

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Returns only the count for Order using the same filters as the list function.

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

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
cust_id
post
int108545Customer-wise. Aliases: customer_id, c_id.
order_id
post
int55Order-wise catalog orders.id. Aliases: catalog_order_id, product_order_id.

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

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

Endpoint

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

Sample Output

{
    "success": 1,
    "count": 5,
    "list_mode": "order",
    "order_id": 55,
    "total_record": 5
}

JavaScript Example

const res = await fetch('/app/Order.Count', { method: 'POST', headers: { Authorization: 'Bearer YOUR TOKEN' }, body: new URLSearchParams({ order_id: '55' }) });
console.log((await res.json()).count);

Error Example

{
    "success": "0",
    "message": "Request failed"
}