curl -X POST "https://api.trycase.ai/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"supplier_id": "sup_xyz789",
"items": [
{"product_id": "prod_abc123", "quantity": 2},
{"product_id": "prod_def456", "quantity": 1}
],
"shipping_address": {
"street1": "123 Market Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"buyer_notes": "Please include tech sheets"
}'
{
"id": "ord_2025_0042",
"order_number": "ORD-2025-0042",
"status": "confirmed",
"supplier": {
"id": "sup_xyz789",
"name": "Stag's Leap Wine Cellars"
},
"items": [
{
"id": "item_001",
"product_id": "prod_abc123",
"product_name": "2021 Reserve Cabernet Sauvignon",
"quantity": 2,
"unit_price_cents": 24000,
"total_cents": 48000
},
{
"id": "item_002",
"product_id": "prod_def456",
"product_name": "2022 Chardonnay",
"quantity": 1,
"unit_price_cents": 18000,
"total_cents": 18000
}
],
"subtotal_cents": 66000,
"shipping_cents": 6000,
"platform_fee_cents": 2500,
"total_cents": 74500,
"shipping_address": {
"street1": "123 Market Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"buyer_notes": "Please include tech sheets",
"created_at": "2025-01-15T14:30:00Z",
"confirmed_at": "2025-01-15T14:30:05Z"
}
Place a new order with a supplier
curl -X POST "https://api.trycase.ai/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"supplier_id": "sup_xyz789",
"items": [
{"product_id": "prod_abc123", "quantity": 2},
{"product_id": "prod_def456", "quantity": 1}
],
"shipping_address": {
"street1": "123 Market Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"buyer_notes": "Please include tech sheets"
}'
{
"id": "ord_2025_0042",
"order_number": "ORD-2025-0042",
"status": "confirmed",
"supplier": {
"id": "sup_xyz789",
"name": "Stag's Leap Wine Cellars"
},
"items": [
{
"id": "item_001",
"product_id": "prod_abc123",
"product_name": "2021 Reserve Cabernet Sauvignon",
"quantity": 2,
"unit_price_cents": 24000,
"total_cents": 48000
},
{
"id": "item_002",
"product_id": "prod_def456",
"product_name": "2022 Chardonnay",
"quantity": 1,
"unit_price_cents": 18000,
"total_cents": 18000
}
],
"subtotal_cents": 66000,
"shipping_cents": 6000,
"platform_fee_cents": 2500,
"total_cents": 74500,
"shipping_address": {
"street1": "123 Market Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"buyer_notes": "Please include tech sheets",
"created_at": "2025-01-15T14:30:00Z",
"confirmed_at": "2025-01-15T14:30:05Z"
}
curl -X POST "https://api.trycase.ai/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"supplier_id": "sup_xyz789",
"items": [
{"product_id": "prod_abc123", "quantity": 2},
{"product_id": "prod_def456", "quantity": 1}
],
"shipping_address": {
"street1": "123 Market Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"buyer_notes": "Please include tech sheets"
}'
{
"id": "ord_2025_0042",
"order_number": "ORD-2025-0042",
"status": "confirmed",
"supplier": {
"id": "sup_xyz789",
"name": "Stag's Leap Wine Cellars"
},
"items": [
{
"id": "item_001",
"product_id": "prod_abc123",
"product_name": "2021 Reserve Cabernet Sauvignon",
"quantity": 2,
"unit_price_cents": 24000,
"total_cents": 48000
},
{
"id": "item_002",
"product_id": "prod_def456",
"product_name": "2022 Chardonnay",
"quantity": 1,
"unit_price_cents": 18000,
"total_cents": 18000
}
],
"subtotal_cents": 66000,
"shipping_cents": 6000,
"platform_fee_cents": 2500,
"total_cents": 74500,
"shipping_address": {
"street1": "123 Market Street",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"buyer_notes": "Please include tech sheets",
"created_at": "2025-01-15T14:30:00Z",
"confirmed_at": "2025-01-15T14:30:05Z"
}