curl --request POST \
--url https://public-api.stora.co/2025-09/orders/{order_id}/line_items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "unit_type",
"quantity": 1,
"price": {
"amount": 1999
},
"item": {
"id": "utype_3b3aed5cca33b11d"
}
}
'{
"line_item": {
"id": "olitm_216f3087ddaf1234",
"created_at": "2025-02-22T14:41:00Z",
"discount_total": {
"amount": 1000,
"currency": "GBP",
"formatted": "£10.00"
},
"item": {
"id": "utype_3b3aed5cca33b11d"
},
"price": {
"amount": 1999,
"currency": "GBP",
"formatted": "£19.99"
},
"quantity": 1,
"tax": {
"amount": 0,
"currency": "GBP",
"formatted": "£0.00"
},
"total": {
"amount": 1999,
"currency": "GBP",
"formatted": "£19.99"
},
"total_excluding_tax": {
"amount": 1999,
"currency": "GBP",
"formatted": "£19.99"
},
"type": "unit_type",
"updated_at": "2025-02-22T14:41:00Z"
},
"meta": {
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"curies": [
{
"name": "bo",
"href": "https://app.stora.test{rel}",
"templated": true,
"title": "Backoffice"
},
{
"name": "sf",
"href": "https://acme.stora.test{rel}",
"templated": true,
"title": "Storefront"
}
]
}
}Create a new line item for the order. Create a new line item can be done only when the order is in draft status.
Required authorization scope: public.order:write
curl --request POST \
--url https://public-api.stora.co/2025-09/orders/{order_id}/line_items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "unit_type",
"quantity": 1,
"price": {
"amount": 1999
},
"item": {
"id": "utype_3b3aed5cca33b11d"
}
}
'{
"line_item": {
"id": "olitm_216f3087ddaf1234",
"created_at": "2025-02-22T14:41:00Z",
"discount_total": {
"amount": 1000,
"currency": "GBP",
"formatted": "£10.00"
},
"item": {
"id": "utype_3b3aed5cca33b11d"
},
"price": {
"amount": 1999,
"currency": "GBP",
"formatted": "£19.99"
},
"quantity": 1,
"tax": {
"amount": 0,
"currency": "GBP",
"formatted": "£0.00"
},
"total": {
"amount": 1999,
"currency": "GBP",
"formatted": "£19.99"
},
"total_excluding_tax": {
"amount": 1999,
"currency": "GBP",
"formatted": "£19.99"
},
"type": "unit_type",
"updated_at": "2025-02-22T14:41:00Z"
},
"meta": {
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"curies": [
{
"name": "bo",
"href": "https://app.stora.test{rel}",
"templated": true,
"title": "Backoffice"
},
{
"name": "sf",
"href": "https://acme.stora.test{rel}",
"templated": true,
"title": "Storefront"
}
]
}
}Bearer Token necessary to use API
The ID of the order
This endpoint supports expandable responses. For more, see the documentation page.
Was this page helpful?