Skip to content

Common Parameters

Most Zynk Insights tools share the same parameters and return the same shape of answer. They're described once here; each tool group's page lists only what's specific to each tool.

You don't need any of this to ask questions — your AI assistant fills in the parameters for you. It's here for when you use the Tool Console or want to know exactly what your assistant asked for.

Company and Connection

Parameter Used by Description
company_id Every tool except platform_list_companies and platform_get_usage The Company to ask about. Get it from platform_list_companies.
connection_id Every tool outside the Platform group, plus platform_get_connection_status, platform_get_capabilities and platform_get_data_health The Connection to read from. Get it from platform_list_connections. It must serve the tool's group — see Bindings.

IDs

Parameters ending in _id or _ids (such as party_id, product_ids or warehouse_ids) take exact IDs returned by an earlier tool — for example, a customer's ID from parties_list_parties. IDs are never guessed or typed from memory. An empty list means "all".

warehouse_ids is refused by systems without stock locations, such as Sage 50.

Searching

Parameter Default Description
query Empty Plain-text search. What's searched depends on the tool — usually IDs, numbers, names and references. It's never passed to your system as a query, so filter syntax doesn't work.

Periods

Tools that read dated records take a period, worked out in the Company's timezone. It's either a preset:

{"preset": "previous_month"}

or a date range, where the end date isn't included:

{"start": "2026-01-01", "end_exclusive": "2026-04-01"}
Preset Covers
today Today.
yesterday Yesterday.
last_7_days, last_30_days, last_90_days The last 7, 30 or 90 days.
month_to_date The start of this month to today.
previous_month Last calendar month.
quarter_to_date The start of this quarter to today.
year_to_date The start of this calendar year to today.
financial_year_to_date The start of this financial year to today, using the Company's financial year from platform_get_company.
previous_financial_year The whole of the last financial year.

List tools default to last_30_days, and accept null for no date limit. Report tools (turnover, order summary and supplier performance) default to month_to_date and need a period. The period actually used is returned in meta.effective_period.

Some questions ignore dates on purpose. Aged balances, open invoices, the sales order backlog and purchase commitments always cover everything outstanding today, however old.

Grouping and Time Grain

Report tools can break their figures down.

Parameter Default Description
grain total total, day, week (starting Monday), month, quarter or year.
group_by Empty One or more breakdowns, such as party or product. The choices depend on the tool. Not every system supports every breakdown — see Supported Systems.

Money is never added up across currencies. Reports return one row per currency (and per unit, for quantities).

Sorting

Parameter Used by Default Description
sort_by List tools id id or updated_at.
order_by Report tools dimension_key The column to sort by. The choices are listed with each tool. Sorting applies to the whole result before it's split into pages.
sort_direction Both asc asc or desc.

Ties are always broken by ID (lists) or by the grouping key (reports), so results come back in the same order every time.

Paging

Parameter Default Description
page_size 50 Results per page, from 1 to 200.
cursor Empty To get the next page, pass data.page.next_cursor from the previous answer, keeping every other parameter the same.

Each answer's data.page shows next_cursor, has_more and, where known, total_count.

Freshness

Parameter Default Description
max_age_seconds 300 Stored values younger than this are used without reading your system again. 0 always reads live.
allow_stale false If your system can't be reached, return the last stored values with a STALE_DATA warning instead of an error.

Sage 50 data is refreshed by the gateway on its own schedule — see How Fresh the Data Is.

The Answer

Every tool returns the same three parts:

{
  "data": { "items": [ ... ], "page": { "next_cursor": null, "has_more": false, "total_count": 2 } },
  "meta": { "request_id": "077107fd38df48508447e2a1e5d4a793", "effective_period": null, "sources": [], "quality": { "status": "complete" }, "warnings": [], ... },
  "error": null
}
  • data — the answer itself.
  • meta — about the answer:
    • request_id — quote this if you contact support.
    • company_id, connection_ids and timezone — what was asked about.
    • effective_period and as_of_date — the dates the answer covers.
    • sources — where the figures came from and how fresh they are.
    • quality — whether the answer is complete, or partial, sampled or limited in some way, with a coverage_note.
    • warnings — anything your assistant should pass on to you. See Data Warnings.
    • unavailable_fields — fields your system can't provide.
  • error — null on success. Otherwise it has a code and a message. See Error Codes.

Amounts on invoices and orders come as pairs: account in the document's own currency, and base in the Company's base currency.