Appearance
Create a simple order
To create a simple order using the API, use the request body format described below. This request body should include essential details such as product, quantity and delivery address.
Following this format will ensure the successful creation of a new order based on the details provided. See the API-Reference or Orders Endpoint documentation to learn more.
Request Body
json
{
"externalId": "YOW-7792796022",
"shipping": "STANDARD",
"recipient": {
"name": "Alex Johnson",
"company": "Johnson Enterprises",
"address1": "123 Main Street",
"address2": "Suite 100",
"city": "San Francisco",
"stateCode": "CA",
"stateName": "California",
"countryCode": "US",
"countryName": "United States",
"zip": "94102",
"phone": "555-123-4567",
"email": "alex.johnson@example.com",
"taxNumber": "654321987"
},
"orderItems": [
{
"externalId": "PAY-4627172881",
"quantity": 3,
"name": "Heart-Shaped Mug",
"retailPrice": "19.9",
"variantId": "590f1af7-75f6-46c8-bab3-60b109a66371",
"placements": [
{
"type": "front",
"technique": "direct_print",
"layers": [
{
"url": "https://www.example.org/example.pdf",
"type": "file",
"position": {
"top": 0,
"left": 0,
"width": 218,
"height": 98.5
}
}
],
"placement_options": [
{
"name": "unlimited_color",
"value": true
}
]
}
]
}
]
}
Response data
json
{
"@context": "/api/contexts/Order",
"@id": "/api/orders/018f80ad-7ce4-71ef-a71a-146e3b7e16f7",
"@type": "Order",
"id": "018f80ad-7ce4-71ef-a71a-146e3b7e16f7",
"externalId": "YOW-7792796022",
"shipping": "STANDARD",
"status": "draft",
"createdAt": "2024-05-16T09:13:24+00:00",
"updatedAt": "2024-05-16T09:13:24+00:00",
"recipient": {
"name": "Alex Johnson",
"company": "Johnson Enterprises",
"address1": "123 Main Street",
"address2": "Suite 100",
"city": "city",
"stateCode": "CA",
"stateName": "California",
"countryCode": "US",
"countryName": "United States",
"zip": "94102",
"phone": "555-123-4567",
"email": "alex.johnson@example.com",
"taxNumber": "654321987"
},
"orderItems": [
{
"@id": "/api/orders/018f80ad-7ce4-71ef-a71a-146e3b7e16f7/order_item/018f80ad-7ce4-71ef-a71a-146e3b8dc05f",
"@type": "OrderItem",
"id": "590f1af7-75f6-46c8-bab3-60b109a66371",
"externalId": "PAY-4627172881",
"quantity": 3,
"name": "Heart-Shaped Mug",
"retailPrice": "19.9",
"variantId": "0587b207-d841-4ae4-824d-71b56d3db67b",
"placements": [
{
"@type": "Placement",
"@id": "/api/.well-known/genid/c6e37013c73255ab175f",
"type": "front",
"technique": "direct_print",
"layers": [
{
"@type": "Layer",
"@id": "/api/.well-known/genid/988aa582786896677f20",
"type": "file",
"url": "https://www.example.org/example.pdf",
"layerOptions": [],
"position": {
"@type": "Position",
"@id": "/api/.well-known/genid/30e5cf80c6147b49846d",
"width": 218,
"height": 98.5,
"top": 0,
"left": 0
}
}
],
"placementOptions": []
}
]
}
]
}