curl --request POST \
--url https://api.bitbybit.studio/customer/open/v1/orders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"lineItems": [
{
"productVariantId": "<string>",
"quantity": 2
}
],
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"address1": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"address2": "<string>",
"country": "<string>"
},
"customerId": "<string>",
"notes": "<string>",
"tags": [
"<string>"
]
}
'{
"data": {
"id": "<string>",
"orderId": "<string>",
"orderNumber": "<string>",
"status": "active",
"fulfillmentStatus": "unfulfilled",
"financialStatus": "pending",
"total": 123,
"currency": "<string>",
"notes": "<string>",
"customer": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>"
},
"lineItems": [
{
"id": "<string>",
"quantity": 123,
"price": 123,
"title": "<string>",
"productVariant": {
"id": "<string>",
"key": "<string>",
"price": 123,
"compareAtPrice": 123,
"inventorySku": "<string>",
"media": "<string>"
}
}
],
"shippingAddress": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"province": "<string>",
"country": "<string>",
"zip": "<string>"
},
"tags": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Create a new order. Provide either a customerId or a customer object to auto-create.
curl --request POST \
--url https://api.bitbybit.studio/customer/open/v1/orders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"lineItems": [
{
"productVariantId": "<string>",
"quantity": 2
}
],
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"address1": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"address2": "<string>",
"country": "<string>"
},
"customerId": "<string>",
"notes": "<string>",
"tags": [
"<string>"
]
}
'{
"data": {
"id": "<string>",
"orderId": "<string>",
"orderNumber": "<string>",
"status": "active",
"fulfillmentStatus": "unfulfilled",
"financialStatus": "pending",
"total": 123,
"currency": "<string>",
"notes": "<string>",
"customer": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>"
},
"lineItems": [
{
"id": "<string>",
"quantity": 123,
"price": 123,
"title": "<string>",
"productVariant": {
"id": "<string>",
"key": "<string>",
"price": 123,
"compareAtPrice": 123,
"inventorySku": "<string>",
"media": "<string>"
}
}
],
"shippingAddress": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"province": "<string>",
"country": "<string>",
"zip": "<string>"
},
"tags": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}API key for authentication. Create one in Settings > Developer.
Order created
Show child attributes