Preview an order

Previews an order. Use this operation to preview a draft order before making an order.

SecurityAPI Key: SecretApiKey or HTTP: JWT
Request
Request Body schema: application/json
websiteId
required
string <= 50 characters
required
Array of objects non-empty

Items details.

ContactObject (object) or null

Billing address details.

ContactObject (object) or null

Delivery address details.

couponIds
Array of strings

List of coupons that are applied to the order.

object (Shipping)

Shipping settings.

post
/previews/orders
Request samples
application/json
{ "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "items": [ ], "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO" }, "deliveryAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO" }, "couponIds": [ "string" ], "currency": "USD", "shipping": { "amount": 0.1, "calculator": "manual" } }
Responses

200

Order preview retrieved.

Response Schema: application/json
currency
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

Array of objects

List of purchase items.

Array of objects (ShippingOption)

Available shipping rates.

Array of objects

Taxes applied to the purchase.

Array of objects

Discounts applied to the purchase.

subtotalAmount
number <double>

Subtotal amount of the purchase.

taxAmount
number <double>

Tax amount of the purchase.

shippingAmount
number <double>

Shipping amount of the purchase.

discountsAmount
number <double>

Total discount amount of the purchase.

total
number <double>

Total amount of the purchase.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

Response samples
application/json
{ "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "deliveryAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "currency": "USD", "lineItems": [ ], "shippingRates": [ ], "taxes": [ ], "discounts": [ ], "subtotalAmount": 0.1, "taxAmount": 0.1, "shippingAmount": 0.1, "discountsAmount": 0.1, "total": 0.1, "shipping": { "amount": 0.1, "calculator": "manual" } }