curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/orders/{id}/items' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"product_id": "SKU-WIDGET-001",
"quantity": 2,
"tax_rate": "0.08",
"unit_price": "49.99"
}'
{
"data": {
"discount": "5.00",
"id": "item-550e8400-e29b-41d4",
"product_id": "prod-abc123",
"product_name": "Wireless Bluetooth Headphones",
"quantity": 2,
"sku": "WBH-BLK-001",
"tax_amount": "7.60",
"tax_rate": "0.08",
"total_price": "99.98",
"unit_price": "49.99"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Add order item
Add a new item to an existing order
POST
/
api
/
v1
/
orders
/
{id}
/
items
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/orders/{id}/items' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"product_id": "SKU-WIDGET-001",
"quantity": 2,
"tax_rate": "0.08",
"unit_price": "49.99"
}'
{
"data": {
"discount": "5.00",
"id": "item-550e8400-e29b-41d4",
"product_id": "prod-abc123",
"product_name": "Wireless Bluetooth Headphones",
"quantity": 2,
"sku": "WBH-BLK-001",
"tax_amount": "7.60",
"tax_rate": "0.08",
"total_price": "99.98",
"unit_price": "49.99"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Add a new item to an existing order
Path parameters
string
required
Order ID
Request body
CreateOrderItem
string
required
Variant identifier; accepts either a UUID or SKU string
integer (int32)
required
Quantity to order (must be at least 1)
string,null
Tax rate as decimal (e.g., 0.08 for 8%)
string,null
Unit price (optional, will use catalog price if not provided)
Response
ApiResponse_OrderItem
object
Show data
Show data
string,null
Discount amount applied
string
required
Line item ID
string
required
Product variant ID
string
required
Product display name
integer (int32)
required
Quantity ordered
string,null
Product SKU
string,null
Calculated tax amount
string,null
Tax rate as decimal
string
required
Total price (unit_price × quantity)
string
required
Price per unit
array,null
string,null
boolean
required
Status codes
| Code | Meaning |
|---|---|
201 | Item added successfully |
401 | Unauthorized |
403 | Forbidden |
404 | Order not found |
422 | Validation error |
429 | Rate limit exceeded |
500 | Internal server error |
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/orders/{id}/items' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"product_id": "SKU-WIDGET-001",
"quantity": 2,
"tax_rate": "0.08",
"unit_price": "49.99"
}'
{
"data": {
"discount": "5.00",
"id": "item-550e8400-e29b-41d4",
"product_id": "prod-abc123",
"product_name": "Wireless Bluetooth Headphones",
"quantity": 2,
"sku": "WBH-BLK-001",
"tax_amount": "7.60",
"tax_rate": "0.08",
"total_price": "99.98",
"unit_price": "49.99"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Last modified on August 31, 2026