curl -X POST https://api.stateset.com/v1/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
},
"items": [
{
"sku": "TSHIRT-BLUE-L",
"quantity": 2,
"price": 1999,
"name": "Blue T-Shirt (Large)"
},
{
"sku": "HAT-RED",
"quantity": 1,
"price": 1499,
"name": "Red Baseball Cap"
}
],
"shipping_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"payment": {
"method": "card",
"payment_intent_id": "pi_1234567890"
},
"shipping": {
"method": "standard",
"carrier": "ups"
},
"metadata": {
"source": "web",
"campaign": "summer-sale"
}
}'
{
"id": "ord_1a2b3c4d5e6f",
"object": "order",
"order_number": "ORD-2024-001234",
"status": "processing",
"customer": {
"id": "cus_9z8y7x6w5v4u",
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
},
"items": [
{
"id": "item_abc123",
"sku": "TSHIRT-BLUE-L",
"quantity": 2,
"price": 1999,
"name": "Blue T-Shirt (Large)",
"total": 3998
},
{
"id": "item_def456",
"sku": "HAT-RED",
"quantity": 1,
"price": 1499,
"name": "Red Baseball Cap",
"total": 1499
}
],
"shipping_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"billing_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"payment": {
"method": "card",
"payment_intent_id": "pi_1234567890",
"status": "paid"
},
"shipping": {
"method": "standard",
"carrier": "ups",
"tracking_number": null,
"estimated_delivery": "2024-01-22T00:00:00Z"
},
"totals": {
"subtotal": 5497,
"tax": 482,
"shipping": 799,
"discount": 0,
"total": 6778
},
"metadata": {
"source": "web",
"campaign": "summer-sale"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Create a new order with automatic inventory allocation and fulfillment workflow initiation
curl -X POST https://api.stateset.com/v1/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
},
"items": [
{
"sku": "TSHIRT-BLUE-L",
"quantity": 2,
"price": 1999,
"name": "Blue T-Shirt (Large)"
},
{
"sku": "HAT-RED",
"quantity": 1,
"price": 1499,
"name": "Red Baseball Cap"
}
],
"shipping_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"payment": {
"method": "card",
"payment_intent_id": "pi_1234567890"
},
"shipping": {
"method": "standard",
"carrier": "ups"
},
"metadata": {
"source": "web",
"campaign": "summer-sale"
}
}'
{
"id": "ord_1a2b3c4d5e6f",
"object": "order",
"order_number": "ORD-2024-001234",
"status": "processing",
"customer": {
"id": "cus_9z8y7x6w5v4u",
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
},
"items": [
{
"id": "item_abc123",
"sku": "TSHIRT-BLUE-L",
"quantity": 2,
"price": 1999,
"name": "Blue T-Shirt (Large)",
"total": 3998
},
{
"id": "item_def456",
"sku": "HAT-RED",
"quantity": 1,
"price": 1499,
"name": "Red Baseball Cap",
"total": 1499
}
],
"shipping_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"billing_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"payment": {
"method": "card",
"payment_intent_id": "pi_1234567890",
"status": "paid"
},
"shipping": {
"method": "standard",
"carrier": "ups",
"tracking_number": null,
"estimated_delivery": "2024-01-22T00:00:00Z"
},
"totals": {
"subtotal": 5497,
"tax": 482,
"shipping": 799,
"discount": 0,
"total": 6778
},
"metadata": {
"source": "web",
"campaign": "summer-sale"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
orders:write
permissions.
Authorization: Bearer YOUR_API_KEY
Show Item object properties
Show Address properties
pending
, processing
, shipped
, delivered
, cancelled
curl -X POST https://api.stateset.com/v1/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
},
"items": [
{
"sku": "TSHIRT-BLUE-L",
"quantity": 2,
"price": 1999,
"name": "Blue T-Shirt (Large)"
},
{
"sku": "HAT-RED",
"quantity": 1,
"price": 1499,
"name": "Red Baseball Cap"
}
],
"shipping_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"payment": {
"method": "card",
"payment_intent_id": "pi_1234567890"
},
"shipping": {
"method": "standard",
"carrier": "ups"
},
"metadata": {
"source": "web",
"campaign": "summer-sale"
}
}'
{
"id": "ord_1a2b3c4d5e6f",
"object": "order",
"order_number": "ORD-2024-001234",
"status": "processing",
"customer": {
"id": "cus_9z8y7x6w5v4u",
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890"
},
"items": [
{
"id": "item_abc123",
"sku": "TSHIRT-BLUE-L",
"quantity": 2,
"price": 1999,
"name": "Blue T-Shirt (Large)",
"total": 3998
},
{
"id": "item_def456",
"sku": "HAT-RED",
"quantity": 1,
"price": 1499,
"name": "Red Baseball Cap",
"total": 1499
}
],
"shipping_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"billing_address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"payment": {
"method": "card",
"payment_intent_id": "pi_1234567890",
"status": "paid"
},
"shipping": {
"method": "standard",
"carrier": "ups",
"tracking_number": null,
"estimated_delivery": "2024-01-22T00:00:00Z"
},
"totals": {
"subtotal": 5497,
"tax": 482,
"shipping": 799,
"discount": 0,
"total": 6778
},
"metadata": {
"source": "web",
"campaign": "summer-sale"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}