POST

Suppliers.List

Return suppliers for the logged-in account from the suppliers table (product-report Suppliers tab / Products form suppliers_id dropdown). Default lists account-owned rows (user_id = owner). Send include_shared=1 or for_product=1 to also include shared system suppliers (user_id = 0), matching the dashboard product form. Page size is capped at 25. Use returned id as suppliers_id on Products.Add.

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 Suppliers 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

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.
  • For paging, do not request more than 25 rows.
  • For total rows, call the matching Count function with the same filters.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
search
post
stringAcmeSearch name, phone, email, company_id, contact_name. Aliases: value, filter_data, search[value], name.
language
post
stringenFilter by language code when stored on the supplier.
include_shared
post
int1When 1, also return shared suppliers with user_id=0 (product form dropdown). Alias behavior: for_product=1.
for_product
post
int1Same as include_shared=1 — use when filling Products.Add suppliers_id.
start
post
int0First row offset for paging. Alias: offset.
limit
post
int25Maximum rows to return. Values above 25 are capped. Aliases: length, per_page.
order_by
post
stringnameOrder column: id, name, email, phone, company_id, contact_name, language. Default name.
order_dir
post
stringascOrder direction: asc or desc. Default asc.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Suppliers.List",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "for_product": "1",
        "limit": "25"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Suppliers.List",
    "url_domain": "https:\/\/{domain}\/app\/Suppliers.List"
}

Endpoint

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

Sample Output

{
    "success": 1,
    "count": 2,
    "recordsTotal": 2,
    "recordsFiltered": 2,
    "total_record": 2,
    "start": 0,
    "limit": 25,
    "include_shared": 1,
    "data": [
        {
            "id": 8,
            "supplier_id": 8,
            "suppliers_id": 8,
            "name": "Acme Supply",
            "supplier_name": "Acme Supply",
            "phone": "0500000000",
            "email": "[email protected]",
            "company_id": "123456789",
            "contact_name": "Dana",
            "language": "en",
            "user_id": 14
        }
    ]
}

Count Only

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

{
    "url": "\/app\/Suppliers.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/Suppliers.Count",
    "url_domain": "https:\/\/{domain}\/app\/Suppliers.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "for_product": "1"
    },
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "route": "Suppliers.Count",
        "max_limit": 25
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('for_product', '1');

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

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ for_product: '1', limit: '25' });
const res = await fetch('/app/Suppliers.List', {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + token },
  body
});
const data = await res.json();
console.log(data.count, data.data);
// Use data.data[i].id as suppliers_id on Products.Add

Error Example

{
    "success": "0",
    "error": "bearer_token_required",
    "message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}