Skip to content

Place a fulfilment order.

POST
/v1/orders
const url = 'https://api.staging.elasticstage.com/store/v1/orders';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"customer":{"email":"ada@example.com"},"items":[{"sku":"example","ean":"example","quantity":1,"unit_price":{"amount":3900,"currency":"GBP"},"vat_rate":0,"purchasable_type":"release","discount":{"amount":390,"currency":"GBP"},"tax_lines":[{"rate":0.2,"title":"VAT","amount":{"amount":650,"currency":"GBP"}}],"duties":{"amount":250,"currency":"GBP"},"duties_tax":{"amount":50,"currency":"GBP"},"presentment":{"unit_price":{"amount":6999,"currency":"CAD"},"discount":{"amount":700,"currency":"CAD"},"tax_lines":[{"rate":0.13,"title":"HST","amount":{"amount":819,"currency":"CAD"}}],"duties":{"amount":455,"currency":"CAD"},"duties_tax":{"amount":91,"currency":"CAD"}}}],"shipping_address":{"full_name":"example","company":"example","address_line_1":"example","address_line_2":"example","city":"example","postal_code":"example","province_code":"example","country_code":"GB"},"shipping_rate_id":"example","shipping_vat_rate":0,"shipping_charged":{"price":{"amount":799,"currency":"GBP"},"tax_lines":[{"rate":0.2,"title":"VAT","amount":{"amount":133,"currency":"GBP"}}]},"source":{"platform":"shopify_app","store_id":"1234","external_order_id":"1234"},"placed_at":"2026-02-01T15:21:40+01:00","taxes_included":true,"presentment_currency":"CAD","discount_codes":[{"code":"SPRING10","type":"percentage","amount":{"amount":390,"currency":"GBP"}}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
idempotency-key
string
<= 64 characters
Media typeapplication/json
object
customer
required
object
email
required
string format: email
<= 255 characters /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
Example
{
"email": "ada@example.com"
}
items
required
Array<object>
>= 1 items
object
sku

The release id, as returned by GET /v1/releases. Provide exactly one of sku or ean.

string
ean

The release's EAN, in place of sku. Provide exactly one of sku or ean.

string
quantity
required
integer
>= 1 <= 9007199254740991
unit_price
required

The amount the merchant charged the customer for one unit (minor units + currency). Echoed back on GET /v1/orders/{id} and used to compute the order total.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 3900,
"currency": "GBP"
}
vat_rate

VAT rate as a fraction (0.2 = 20%).

number
0 <= 1
Example
0.2
purchasable_type
string
default: release
Allowed values: release test bulk
discount

The total discount allocated to this line (all units, including its share of any order-level code), in the store's currency.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 390,
"currency": "GBP"
}
tax_lines

Every tax applied to this line, with its rate and the amount charged. vat_rate remains the first rate for callers that send one.

Array<object>

One tax applied to a charge. A charge may carry several.

object
rate
required

VAT rate as a fraction (0.2 = 20%).

number
<= 1
Example
0.2
title
Any of:
string
<= 100 characters
amount
required

The tax charged at this rate, in the store's currency.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 1999,
"currency": "GBP"
}
Example
{
"rate": 0.2,
"title": "VAT",
"amount": {
"amount": 650,
"currency": "GBP"
}
}
duties

The import duties the platform collected from the customer for this line at checkout (all units), in the store's currency, without any tax charged on the duty. Kept for record keeping, never billed. Omit when none were collected.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 250,
"currency": "GBP"
}
duties_tax

The tax the platform charged on this line's duties, where the destination taxes them, in the store's currency. Kept for record keeping, never billed. Omit when none was charged.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 50,
"currency": "GBP"
}
presentment

The line as the customer saw it, in the currency they paid in. Omit when the store sells in one currency.

object
discount

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
tax_lines

The same taxes as the charge's tax_lines, in the same order and at the same rates, in the customer's currency. Paired by position; a list that differs is rejected.

Array<object>
object
rate
required

VAT rate as a fraction (0.2 = 20%).

number
<= 1
Example
0.2
title
Any of:
string
<= 100 characters
amount
required

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
unit_price
required

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
duties

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
duties_tax

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
Example
{
"unit_price": {
"amount": 6999,
"currency": "CAD"
},
"discount": {
"amount": 700,
"currency": "CAD"
},
"tax_lines": [
{
"rate": 0.13,
"title": "HST",
"amount": {
"amount": 819,
"currency": "CAD"
}
}
],
"duties": {
"amount": 455,
"currency": "CAD"
},
"duties_tax": {
"amount": 91,
"currency": "CAD"
}
}
shipping_address
required
object
full_name
required
string
>= 1 characters <= 255 characters
company
Any of:
string
>= 1 characters <= 255 characters
address_line_1
required
string
>= 1 characters <= 255 characters
address_line_2
Any of:
string
>= 1 characters <= 255 characters
city
required
string
>= 1 characters <= 255 characters
postal_code
required
string
>= 1 characters <= 32 characters
province_code
Any of:
string
/^[A-Za-z0-9]{1,3}$/
country_code
required
string
/^[A-Za-z]{2}$/
Example
GB
shipping_rate_id
required
string
shipping_vat_rate

VAT rate as a fraction (0.2 = 20%).

number
0 <= 1
Example
0.2
shipping_charged

The shipping charge as the integrating platform took it at checkout. elasticStage prices dispatch from shipping_rate_id, never from this.

object
price
required

What the platform charged the customer for shipping, before any discount, in the store's currency.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 1999,
"currency": "GBP"
}
discount

Any discount applied to the shipping charge.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 1999,
"currency": "GBP"
}
tax_lines
Array<object>

One tax applied to a charge. A charge may carry several.

object
rate
required

VAT rate as a fraction (0.2 = 20%).

number
<= 1
Example
0.2
title
Any of:
string
<= 100 characters
amount
required

The tax charged at this rate, in the store's currency.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 1999,
"currency": "GBP"
}
Example
{
"rate": 0.2,
"title": "VAT",
"amount": {
"amount": 650,
"currency": "GBP"
}
}
presentment
object
discount

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
tax_lines

The same taxes as the charge's tax_lines, in the same order and at the same rates, in the customer's currency. Paired by position; a list that differs is rejected.

Array<object>
object
rate
required

VAT rate as a fraction (0.2 = 20%).

number
<= 1
Example
0.2
title
Any of:
string
<= 100 characters
amount
required

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
price
required

An amount in the currency the customer saw and paid in (minor units + ISO 4217 code). Never settled in; elasticStage prices nothing from it.

object
amount
required
integer
<= 9007199254740991
Example
2599
currency
required

ISO 4217 currency code.

string
/^[A-Z]{3}$/
Example
CAD
Example
{
"amount": 2599,
"currency": "CAD"
}
Example
{
"price": {
"amount": 799,
"currency": "GBP"
},
"tax_lines": [
{
"rate": 0.2,
"title": "VAT",
"amount": {
"amount": 133,
"currency": "GBP"
}
}
]
}
source
required
object
platform
required
string
store_id
string | null
external_order_id
string | null
Example
{
"platform": "shopify_app",
"store_id": "1234",
"external_order_id": "1234"
}
placed_at

When the customer placed the order on the integrating platform. elasticStage records its own created_at regardless.

string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
Example
2026-02-01T15:21:40+01:00
taxes_included

Whether the prices on this order include tax, as the platform charged them.

boolean
presentment_currency

The currency the customer paid in. Omit when it is the store's currency.

string
/^[A-Z]{3}$/
Example
CAD
discount_codes

The discount codes applied to the whole order, if any.

Array<object>
object
code
required
string
>= 1 characters <= 255 characters
type
Any of:
string
<= 50 characters
amount
required

The total this code took off the whole platform order, in the store's currency. That order may hold lines elasticStage does not fulfil; each line's own discount is what reached it.

object
amount
required
integer
<= 9007199254740991
Example
1999
currency
required
string
Allowed values: GBP USD EUR JPY
Example
GBP
Example
{
"amount": 1999,
"currency": "GBP"
}
Example
{
"code": "SPRING10",
"type": "percentage",
"amount": {
"amount": 390,
"currency": "GBP"
}
}

Default Response

Media typeapplication/json
object
id
required
string
status
required
string
Allowed values: pending processing shipped delivered cancelled payment_failed
Example
{
"id": "ord_3a9f21",
"status": "processing"
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"error": "Bad Request",
"message": "Request validation failed.",
"details": [
{
"field": "items",
"reason": "must contain at least 1 item"
}
]
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 401,
"code": "UNAUTHORIZED",
"error": "Unauthorized",
"message": "Authentication required."
}

Default Response

Media typeapplication/json
object
id
required
string
status
required
string
Allowed values: pending processing shipped delivered cancelled payment_failed
Example
{
"id": "ord_3a9f21",
"status": "payment_failed"
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 403,
"code": "FORBIDDEN",
"error": "Forbidden",
"message": "Insufficient permissions."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 404,
"code": "NOT_FOUND",
"error": "Not Found",
"message": "The requested resource was not found."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 409,
"code": "CONFLICT",
"error": "Conflict",
"message": "Idempotency-Key was already used with a different request body."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 422,
"code": "UNPROCESSABLE_ENTITY",
"error": "Unprocessable Entity",
"message": "One or more items could not be shipped.",
"details": [
{
"field": "items.0.sku",
"reason": "Variant 'LUM-ME-12-001' is not available for purchase."
}
]
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 429,
"code": "RATE_LIMITED",
"error": "Too Many Requests",
"message": "Rate limit exceeded."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 500,
"code": "INTERNAL_ERROR",
"error": "Internal Server Error",
"message": "An unexpected error occurred."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 503,
"code": "SERVICE_UNAVAILABLE",
"error": "Service Unavailable",
"message": "The service is temporarily unavailable."
}