GetTotals
[POST] .../v1/docordertopartner/gettotals
Returns order-to-partner document totals calculated from operations. Use this method to get read-only order-to-partner totals from OrderToPartnerOperation rows before comparing them with the document header or showing a compact document summary. The request body is required and accepts the document id. The response returns document_id, operation_count, quantity, amount, vat_amount and additional_expenses_amount; amount is calculated from the stored operation price value that is exposed as cost in the public operation model and values are not cached. The current request user must have the order-to-partner document select permission; missing body, invalid id, denied access and database errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Document ID. |
Request Example
{
"id": 1
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | DocOrderToPartnerTotals | Result object. |
Response Example
{
"ok": true,
"result": {
"additional_expenses_amount": 1.0,
"amount": 1.0,
"document_id": 1,
"operation_count": 1,
"quantity": 1.0,
"vat_amount": 1.0
}
}