SetCourier

[POST] .../v1/docorderdelivery/setcourier

Assigns a courier to a retail order. Assign or change the courier for a retail order delivery document. The request requires id and courier_id and locks the document by id during the update. The method requires the retail order edit permission, validates the courier, sends the courier-set webhook and returns row_affected. Errors such as a missing request body, invalid id or courier_id, denied access, disabled tariff, missing courier, invalid or deleted document state, missing active row, storage errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
courier_id Int64 Required Courier ID.
id Int64 Required Retail order document ID.

Request Example

{
  "courier_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
  }
}