curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/orders' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"billing_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "456 Billing Ave"
},
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"items": [
{
"product_id": "prod-abc123",
"quantity": 2,
"tax_rate": "0.08",
"unit_price": "49.99"
},
{
"product_id": "SKU-WIDGET-001",
"quantity": 1,
"unit_price": "29.99"
}
],
"notes": "Please gift wrap",
"payment_method_id": "pm_card_visa",
"shipping_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
}
}'
{
"data": {
"billing_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
},
"created_at": "2024-12-09T10:30:00Z",
"currency": "USD",
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"fulfillment_status": "unfulfilled",
"id": "550e8400-e29b-41d4-a716-446655440000",
"items": [
{
"id": "item-001",
"product_id": "prod-abc123",
"product_name": "Wireless Bluetooth Headphones",
"quantity": 2,
"sku": "WBH-BLK-001",
"tax_amount": "8.00",
"tax_rate": "0.08",
"total_price": "99.98",
"unit_price": "49.99"
}
],
"notes": "Please deliver to back door",
"order_date": "2024-12-09T10:30:00Z",
"order_number": "ORD-2024-001234",
"payment_method_id": "pm_card_visa",
"payment_status": "pending",
"shipping_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
},
"status": "pending",
"total_amount": "149.99",
"updated_at": "2024-12-09T10:30:00Z",
"version": 1
},
"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
}
Create order
Create a new order
POST
/
api
/
v1
/
orders
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/orders' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"billing_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "456 Billing Ave"
},
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"items": [
{
"product_id": "prod-abc123",
"quantity": 2,
"tax_rate": "0.08",
"unit_price": "49.99"
},
{
"product_id": "SKU-WIDGET-001",
"quantity": 1,
"unit_price": "29.99"
}
],
"notes": "Please gift wrap",
"payment_method_id": "pm_card_visa",
"shipping_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
}
}'
{
"data": {
"billing_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
},
"created_at": "2024-12-09T10:30:00Z",
"currency": "USD",
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"fulfillment_status": "unfulfilled",
"id": "550e8400-e29b-41d4-a716-446655440000",
"items": [
{
"id": "item-001",
"product_id": "prod-abc123",
"product_name": "Wireless Bluetooth Headphones",
"quantity": 2,
"sku": "WBH-BLK-001",
"tax_amount": "8.00",
"tax_rate": "0.08",
"total_price": "99.98",
"unit_price": "49.99"
}
],
"notes": "Please deliver to back door",
"order_date": "2024-12-09T10:30:00Z",
"order_number": "ORD-2024-001234",
"payment_method_id": "pm_card_visa",
"payment_status": "pending",
"shipping_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
},
"status": "pending",
"total_amount": "149.99",
"updated_at": "2024-12-09T10:30:00Z",
"version": 1
},
"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
}
Create a new order
Request body
CreateOrderRequest
Address,null
string
required
Customer UUID
CreateOrderItem[]
required
Order line items (at least one required)
string,null
Optional notes for the order
string,null
Payment method identifier (e.g., Stripe payment method ID)
Address,null
Response
ApiResponse_OrderResponse
object
Show data
Show data
Address,null
string (date-time)
required
Creation timestamp
string,null
Currency code (ISO 4217)
string
required
Customer identifier (UUID)
string
required
Fulfillment status (unfulfilled, partially_fulfilled, fulfilled)
string
required
Unique order identifier (UUID)
OrderItem[]
required
Order line items
Show OrderItem
Show OrderItem
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
string,null
Order notes
string (date-time)
required
Date when the order was placed
string
required
Human-readable order number
string,null
Payment method identifier
string
required
Payment status (pending, paid, failed, refunded)
string,null
Associated shipment identifier
Address,null
OrderStatus
required
Current order status
string,null
Total order amount
string (date-time)
required
Last update timestamp
integer (int32)
required
Version number for optimistic locking
array,null
string,null
boolean
required
Status codes
| Code | Meaning |
|---|---|
201 | Order created successfully |
400 | Invalid request data |
401 | Unauthorized |
403 | Forbidden |
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' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"billing_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "456 Billing Ave"
},
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"items": [
{
"product_id": "prod-abc123",
"quantity": 2,
"tax_rate": "0.08",
"unit_price": "49.99"
},
{
"product_id": "SKU-WIDGET-001",
"quantity": 1,
"unit_price": "29.99"
}
],
"notes": "Please gift wrap",
"payment_method_id": "pm_card_visa",
"shipping_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
}
}'
{
"data": {
"billing_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
},
"created_at": "2024-12-09T10:30:00Z",
"currency": "USD",
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"fulfillment_status": "unfulfilled",
"id": "550e8400-e29b-41d4-a716-446655440000",
"items": [
{
"id": "item-001",
"product_id": "prod-abc123",
"product_name": "Wireless Bluetooth Headphones",
"quantity": 2,
"sku": "WBH-BLK-001",
"tax_amount": "8.00",
"tax_rate": "0.08",
"total_price": "99.98",
"unit_price": "49.99"
}
],
"notes": "Please deliver to back door",
"order_date": "2024-12-09T10:30:00Z",
"order_number": "ORD-2024-001234",
"payment_method_id": "pm_card_visa",
"payment_status": "pending",
"shipping_address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94102",
"state": "CA",
"street": "123 Main Street"
},
"status": "pending",
"total_amount": "149.99",
"updated_at": "2024-12-09T10:30:00Z",
"version": 1
},
"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