[POST] .../v1/docorderdelivery/setretailcard
Sets customer card for retail order document Use this method to attach an enabled retail customer card to a retail order that is already in Processing status. The request requires id and card_id and locks the document by id during the update. The method requires the retail order edit permission, checks that the order exists, is not marked for deletion, is locked by the current edit context, is in Processing status and that the card exists and is enabled; it writes the action log and returns row_affected. Business errors such as a missing request body, invalid id or card_id, denied access, missing order, invalid order status, deletion mark, failed lock check, missing or disabled card, missing active row, database errors or persistence failures are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| card_id | Int64 | Required | Customer card ID. |
| id | Int64 | Required | Retail order document ID. |
Request Example
{
"card_id": 1,
"id": 1
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"ids": [
null
],
"row_affected": 1
}
}