show) or a filtered list (list).POST /v2/api/multi-entityalias (or its key when no alias is given). Each value holds that sub-request's result, so one call can return, for example, an invoice together with its related requisitions.| Field | Required | Description |
|---|---|---|
| key | Yes | The entity key to read (e.g. invoice, requisition, follow_up_reminder). |
| action | Yes | show to fetch a single record, list to fetch a filtered list. Any other value returns { "error": "Action not found" } under that alias. |
| options | Yes | Depends on action. For show: the record id. For list: a filters object (see below). |
| alias | No | The key under which this sub-request's result appears in the response. Defaults to key. Use it to disambiguate two sub-requests that read the same entity. |
| level | No | Data-detail level — how deeply related records are loaded. Defaults to 1. Higher levels return more nested relations. |
options by actionshow — options is the record id, e.g. "options": "172185".list — options is an object of filter conditions merged into the listing query, e.g. "options": { "order_id": "172185", "order_type": 3 }. Any field the target entity supports may be used.alias:show sub-request → the record object (with a custom_data property holding the record's custom-field values, when the entity has any).list sub-request → a paginated envelope (data array plus current_page, per_page, total, last_page, and page-URL fields).{ "error": "<message>" }.error object under that alias and never fails the whole call. The overall HTTP status is always 200.Permissions: a showsub-request requires permission to view the requested entity; without it that alias returns{ "error": "You are not allowed to view this page" }.
Authorization header. Also send Accept: application/json.curl --location --globoff 'https://.daftara.com/v2/api/multi-entity' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"key": "invoice",
"action": "show",
"options": "172185",
"level": 2
},
{
"key": "requisition",
"action": "list",
"options": { "order_id": "172185", "order_type": 3 },
"alias": "requisition"
}
]'{
"property1": {
"id": 0,
"custom_data": {}
},
"property2": {
"id": 0,
"custom_data": {}
}
}