ToBeginning
[POST] .../v1/docorderdelivery/tobeginning
Resets a retail order to the start of its sale or return workflow. Reset a retail order delivery document to the beginning of the current sale or return flow. The request requires id and locks the document by id while the method decides whether the order returns to New, Finished or another beginning state based on the current status. The method requires the retail order edit permission, calls the same beginning logic used by some status transitions, sends the reset webhook and returns row_affected. Errors such as a missing request body, invalid id, denied access, invalid current status, locked or deleted document state, missing active row, storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Retail order document ID. |
Request Example
{
"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
}
}