complete_from_history

If the orders were not completed online, you may use the order/complete_from_history method to complete the orders using history messages:

Copied!
order/complete_from_history&params={"itemId":<long>,
				    "orders":[long]}

Parameters

ParameterDescription

itemId

Resource ID.

orders

Array of order IDs.

Use:

  • ./update with callMode=‘‘create’’ to create an order with the unit assigned;
  • ./update with callMode=‘‘assign’’ to assign a unit to the order that has already been created.

Response

Copied!
{
    "completed":<bool>        /* checked the aggregated status of the orders: 
                               1 - completed (if at least one order is completed during the request processing, the status of this order will be changed to "s":2), 
                               0 - not completed (no order has been completed during request processing) */
}

Error codes

Error codeDescription
7Couldn't get the item with the provided itemId.
6Failed to create the order collection.
4No order was provided or one of the orders was erroneous.
Download PDF file
Download Word document

See also