Requisition orders
Read the legacy requisition grid
/a/RequisitionOrders_getDT
Page the CRM1 requisition table with active/scoped counts and positional rows.
When to use this endpoint
Use the CRM1 requisition list. The newer mapped table returns named fields and different search/date controls.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. Session requests use dispatcher CSRF protection when configured. API keys use their owner’s identity.
The dispatcher requires explicit View on Requisition Order or Requisition Orders, even without a TeamAccess policy. API keys retain their owner’s permissions. Records are filtered to active headers within RequisitionOrder_scopeSQL: configured TeamAccess, or the legacy department boundary, including the owner exception for unlinked requisitions in the TeamAccess policy.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
draw / start / length | Integer-compatible | Yes | All keys are required. draw is echoed as integer; start is row offset and length is page size. Negative or malformed paging values are rejected; there is no all-record sentinel. |
order | Native DataTables order array | Yes | Presence required. First column: 0 local ID, 1 user name, 2 description, 3 creation, 4 delivery, 5 approval, 6 target type, 7 received/workflow status. Other indices use ID. Exact dir=desc descends, otherwise asc; missing first item falls back to column 0/asc. |
search[value] | Native nested text | No | Trimmed/lowercased substring over header ID, assigned user name and description. LIKE wildcards remain active. |
dateFrom / dateTo | Date strings | No | When dateFrom is present, reads both controls: creation >=dateFrom and <=dateTo plus 23:59:59. Supply both; both must be real ISO calendar dates. |
Example request
$result = FM_api('RequisitionOrders_getDT', [
'draw'=>'1','start'=>'0','length'=>'10',
'order'=>[['column'=>'0','dir'=>'asc']],
'search'=>['value'=>'Materials'],
]);
Example response
{
"draw": 1,
"recordsTotal": "12",
"recordsFiltered": "1",
"data": [
[
"312",
"Example user",
"Materials",
"2026-11-05 09:00:00",
null,
null,
"0",
"0",
"0"
]
]
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error": "missing or invalid parameter: draw"} | draw is missing; length, order and start have corresponding presence errors. |
{"error": "permission denied"} | The dispatcher denies Requisition View. |
{"error":"permission denied"} | The required page permission is missing. Hidden/deleted records are omitted from collections; explicit parent readers reject an inaccessible parent. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Each data row has nine positions: 0 requisition ID, 1 assigned user name, 2 description, 3 creation time, 4 delivery date, 5 approval time, 6 target type, 7 target ID, 8 numeric status. Requisition ID itself is its displayed number.
- Status values are 0 Open, 1 Approved, 2 Processed, 3 Received, 4 Cancelled. They are returned as stored codes, not labels. All active statuses are eligible; no extra status/user/target filter is consumed here.
- recordsTotal counts active headers inside the record scope before search/dates; recordsFiltered applies search/dates too. Both are database scalar counts. Data sorts by the chosen field without an ID tie-breaker and is then offset/limited.
- Assigned-user names require Users View and the user visibility boundary; missing/inaccessible names are null. Invalid paging and ISO dates are rejected. SQL row failure still becomes empty data while counts are queried separately.
Side effects
- Reads tenant data without modifying orders, lines, stock, approval, history or notifications.
See it in Fieldmotion
CRM1
In CRM1 Requisition Orders, load/search the table or change its dates; inspect RequisitionOrders_getDT. The datepicker supplies absolute date strings.
CRM2
No direct CRM2 literal caller was found in the searched client source. CRM2 uses RequisitionOrders_getDataTable.
Related endpoints
RequisitionOrders_getDataTable— Read a paged mapped collection.RequisitionOrders_getExportData— Read selected configurable export rows.RequisitionOrder_get— Read one checked requisition.