[POST] .../v1/orderfrompartneroperation/getdiscount
Returns discounts/allowances order-from-partner document. Use this method to read discounts and allowances already applied to DocOrderFromPartner documents before adding or deleting a discount operation. The response returns DiscountOperation records and supports id and document_id filter plus sort_orders over action, type, percent, amount and last_update; the controller sets the document type internally for order-from-partner documents. The caller must have order-from-partner discount read permission; missing body, denied access, invalid filters or sort_orders, database failures or persistent lookup errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| sort_orders | Array of DiscountOperationSortOrder | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| document_id | int | |
| id | int |
Sortable Fields
| Field |
|---|
| action |
| amount |
| document_id |
| id |
| last_update |
| percent |
| type |
Request Example
{
"filters": [
{
"Field": "document_ids",
"Operator": "In",
"Value": [
4601
]
}
],
"sort_orders": [
{
"column": "id",
"direction": "ASC"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of DiscountOperation | Result array. |
Response Example
{
"ok": true,
"result": [
{
"id": 9101,
"document_id": 4601,
"action": "Discount",
"type": "Percent",
"percent": 5,
"amount": 0,
"last_update": 1767225600
}
]
}