SetCourier

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

Adds method delivery (courier) to retail order. Use this method to 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 in the persistent layer, writes the action log, sends the courier-set webhook, and returns row_affected. Business 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, database errors, or persistence failures 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
  }
}