| Code | Description |
|---|---|
| 401 | The provided token is invalid |
| 422 | Could not process parameters |
// invalid params GET /api/shopify/inventory_batch_order_items?line_item_id=37651 422 param is missing or the value is empty: order_id
// invalid token GET /api/shopify/inventory_batch_order_items?order_id=17841&line_item_id=97368 401 HTTP Token: Access denied.
// valid token and params
GET /api/shopify/inventory_batch_order_items?order_id=64371&line_item_id=27144
200
[
{
"id": 1597,
"inventory_batch_id": 4047,
"quantity": 2,
"created_at": "2023-07-03 05:48:06 UTC",
"updated_at": "2023-07-03 05:48:06 UTC",
"order_id": 64371,
"line_item_id": 27144
}
]
| Param name | Description |
|---|---|
|
line_item_id
required |
Shopify line item ID Validations:
|
|
order_id
required |
Shopify order ID Validations:
|
| Header name | Description |
|---|---|
|
Authorization required |
Bearer token |
All parameters must be nested under inventory_batch_order_item, e.g. inventory_batch_order_item. The order_id (Shopify order ID) is REQUIRED alongside line_item_id, inventory_batch_id and quantity; requests missing any of them are rejected with a 422 response.
| Code | Description |
|---|---|
| 401 | The provided token is invalid |
| 422 | Could not process parameters |
Request (all params nested under inventory_batch_order_item):
POST /api/shopify/inventory_batch_order_items
{
"inventory_batch_order_item": {
"order_id": 5443815864496,
"line_item_id": 13374776201392,
"inventory_batch_id": 4050,
"quantity": 2
}
}
Response (201):
{
"id": 1598,
"inventory_batch_id": 4050,
"quantity": 2,
"created_at": "2024-03-01 05:48:06 UTC",
"updated_at": "2024-03-01 05:48:06 UTC",
"order_id": 5443815864496,
"line_item_id": 13374776201392
}
// invalid token POST /api/shopify/inventory_batch_order_items inventory_batch_order_item[order_id]=70424&inventory_batch_order_item[line_item_id]=23779&inventory_batch_order_item[inventory_batch_id]=4048&inventory_batch_order_item[quantity]=2 401 HTTP Token: Access denied.
// invalid params POST /api/shopify/inventory_batch_order_items inventory_batch_order_item[quantity]=2 422 Server error
// valid token and params
POST /api/shopify/inventory_batch_order_items
inventory_batch_order_item[order_id]=50743&inventory_batch_order_item[line_item_id]=63389&inventory_batch_order_item[inventory_batch_id]=4050&inventory_batch_order_item[quantity]=2
201
{
"id": 1598,
"inventory_batch_id": 4050,
"quantity": 2,
"created_at": "2023-07-03 05:48:06 UTC",
"updated_at": "2023-07-03 05:48:06 UTC",
"order_id": 50743,
"line_item_id": 63389
}
| Param name | Description |
|---|---|
|
inventory_batch_order_item
required |
Validations:
|
|
inventory_batch_order_item[line_item_id]
required |
Shopify line item ID Validations:
|
|
inventory_batch_order_item[order_id]
required |
Shopify order ID Validations:
|
|
inventory_batch_order_item[inventory_batch_id]
required |
Inventory batch ID Validations:
|
|
inventory_batch_order_item[quantity]
required |
Quantity Validations:
|
| Header name | Description |
|---|---|
|
Authorization required |
Bearer token |
Responds with a JSON object: {“message”: “Batch removed”} on success, or {“error”: “…”} with an appropriate HTTP status on failure.
| Code | Description |
|---|---|
| 401 | The provided token is invalid |
| 404 | Record not found |
Response (200):
{ "message": "Batch removed" }
Response (404):
{ "error": "Record not found" }
// invalid id
DELETE /api/shopify/inventory_batch_order_items/100
404
{
"error": "Record not found"
}
// invalid token DELETE /api/shopify/inventory_batch_order_items/1593 401 HTTP Token: Access denied.
// valid token and id
DELETE /api/shopify/inventory_batch_order_items/1594
200
{
"message": "Batch removed"
}
| Param name | Description |
|---|---|
|
id
required |
Inventory batch order item ID Validations:
|
| Header name | Description |
|---|---|
|
Authorization required |
Bearer token |