Removes an order item from the shipment it was added to. The item stays on the order.
Before you begin#
- The API token needs
OrderItemList_RemoveFromShipment, 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 ID of the item.
Example requests#
Remove an item from its shipment#
Removes line 323 of order 200331 from its shipment.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "OrderItemList_RemoveFromShipment",
"Order_ID": 200331,
"Line_IDs": [323]
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
Order_ID |
Integer | The order id | |
Line_IDs |
Integer array | Yes | Array of line IDs to remove from their shipments |
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 not found | Order number not found |
Related functions#
| Function | Use it to |
|---|---|
OrderItemList_CreateShipment |
Add items to a new shipment |
OrderShipmentList_Load_Query |
Find shipments and the items in them |
OrderShipmentList_Update |
Update a shipment |
OrderList_Load_Query |
Find the order and its line IDs |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open Orders > OrderItemList_RemoveFromShipment. See Set Up Postman.