Puts one or more items (products) in an order on backorder. Pass the order and the Line_IDs of the items to backorder.
Before you begin#
- The API token needs
OrderItemList_BackOrder, either assigned directly under Functions or through a group. See Create an API token. - Requests must be signed if the token requires it. See Make a signed request with HMAC.
- You need the order ID and the
line_idof each item.OrderList_Load_Queryreturns both.
Example requests#
Backorder items#
Puts lines 170 and 165 of order 200100 on backorder.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "OrderItemList_BackOrder",
"Order_ID": 200100,
"Date_InStock": 1541030400,
"Line_IDs": [170, 165]
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
Order_ID |
Integer | Order ID | |
Line_IDs |
Integer array | Yes | Array of line_id values to put on backorder |
Date_InStock |
Integer | No | Optional. In-stock date for the backordered items |
Example response#
{
"success": 1
}
Response parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
Error responses#
| Error Code | Error Message | Error Description |
|---|---|---|
| MER-JSN-ORD-00025 | Order number not found. | Order number not found |
| MER-JSN-00023 | One or more parameters are invalid | Missing or incorrect line_id parameter |
Related functions#
| Function | Use it to |
|---|---|
OrderList_Load_Query |
Find the order and its line IDs |
OrderItemList_Cancel |
Cancel items in an order |
OrderItem_Split |
Split an item before backordering part of its quantity |
OrderItemList_CreateShipment |
Create a shipment once the items are in stock |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open Orders > OrderItemList_BackOrder. See Set Up Postman.