You can add a line item (SKU) with quantity to an existing order. If that item is already on the order, the requested quantity will be added to the existing quantity.
Any items added will inherit the traits of the order, including the collection traits. For example, if the order contains a collection with delivery dates March thru April, the newly added SKU will inherit those delivery dates.
This endpoint requires JOOR ids.
Endpoint
- Method: POST
- URI:
https://api.jooraccess.com/v4/orders/sku_line_items/bulk_create?account=[account_id]
Params
- Accept: application/json
- Authorization: OAuth2 [Base64 encoded token]
Sample cURL Request
curl -X POST "https://apisandbox.jooraccess.com/v4/orders/sku_line_items/bulk_create?account=[account_id]" -H "accept: application/json" -H "Content-Type: application/json" -d "[{\"order_id\":\"string\",\"sku_id\":\"string\",\"quantity\":0}]"
Workflow
- To get the order id, you can use the v2 GET orders endpoint.
- To get the line item id, you can use the v4 GET skus endpoint.
a. You can filter this request by a JOOR product id.
Request Param Details
PARAMETERS | REQUIRED | TYPE | NOTES |
---|---|---|---|
order_id | Y | string | The JOOR id of the order being updated Example: "123456" |
sku_id | Y | string | The JOOR id of the SKU being added Example: "12345678" |
quantity | N | string | The quantity for the SKU being added Example: "100" |
Request Example
[
{
"order_id": "string",
"sku_id": "string",
"quantity": 0
}
]
Response Example
{
"data": [
{
"id": "<the JOOR id for this item",
"order_id": "the JOOR order id this item belongs to>",
"line_item_sku": {
"original_id": "<the JOOR sku id>",
"product": {
"name": "<the name of your product>",
"external_id": "<the system id of your product>"
},
"trait_values": [
{
"trait": {
"id": "U0tVVHJhaXQ6U3R5bGVDb2xvcg==",
"name": "Color",
"type": "sku"
},
"value": "Blood Orange",
"external_id": "BO"
},
{
"trait": {
"id": "U0tVVHJhaXQ6U2l6ZQ==",
"name": "Size",
"type": "sku"
},
"value": "Medium",
"external_id": "M"
}
]
},
"quantity": 100
}
],
"errors": []
}