Preview an order

Use order preview before making an actual order.

SecuritySecretApiKey or JWT
Request
Request Body schema: application/json
websiteId
required
string <= 50 characters

The website identifier string.

required
Array of objects non-empty
Array (non-empty)
planId
required
string <= 50 characters

The plan identifier string.

quantity
integer

Number of units of the product on the given plan.

object or null

The billing address.

firstName
string or null <= 45 characters ^[\w\s\-\pL,.']+$

The contact first name.

lastName
string or null <= 45 characters ^[\w\s\-\pL,.']+$

The contact last name.

organization
string or null <= 255 characters ^[\w\s\-\pL,.'&]+$

The contact organization.

address
string or null <= 60 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact street address.

address2
string or null <= 60 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact street address (second line).

city
string or null <= 45 characters ^[\w\s\-\pL,.']+$

The contact city.

region
string or null <= 45 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact region (state).

country
string or null <= 2 characters ^[A-Z]{2}$

The contact country ISO Alpha-2 code.

postalCode
string or null <= 10 characters ^[\w\s\-]+$

The contact postal code.

Array of objects (ContactPhoneNumbers)

The list of phone numbers.

Array
label
required
string <= 45 characters

The phone label.

value
required
string <= 50 characters

The phone value.

primary
boolean

True if phone is primary.

Array of objects (ContactEmails)

The list of emails.

Array
label
required
string <= 45 characters

The email label.

value
required
string <email> <= 255 characters

The email value.

primary
boolean

True if email is primary.

dob
string or null <date>

The contact's date of birth in ISO-8601 format (yyyy-mm-dd).

jobTitle
string or null <= 255 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact's job title.

object or null

The delivery address.

firstName
string or null <= 45 characters ^[\w\s\-\pL,.']+$

The contact first name.

lastName
string or null <= 45 characters ^[\w\s\-\pL,.']+$

The contact last name.

organization
string or null <= 255 characters ^[\w\s\-\pL,.'&]+$

The contact organization.

address
string or null <= 60 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact street address.

address2
string or null <= 60 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact street address (second line).

city
string or null <= 45 characters ^[\w\s\-\pL,.']+$

The contact city.

region
string or null <= 45 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact region (state).

country
string or null <= 2 characters ^[A-Z]{2}$

The contact country ISO Alpha-2 code.

postalCode
string or null <= 10 characters ^[\w\s\-]+$

The contact postal code.

Array of objects (ContactPhoneNumbers)

The list of phone numbers.

Array
label
required
string <= 45 characters

The phone label.

value
required
string <= 50 characters

The phone value.

primary
boolean

True if phone is primary.

Array of objects (ContactEmails)

The list of emails.

Array
label
required
string <= 45 characters

The email label.

value
required
string <email> <= 255 characters

The email value.

primary
boolean

True if email is primary.

dob
string or null <date>

The contact's date of birth in ISO-8601 format (yyyy-mm-dd).

jobTitle
string or null <= 255 characters ^[\w\s\-\/\pL,.#;:()']+$

The contact's job title.

couponIds
Array of strings

The list of coupons applied to the order.

object (Shipping)

Shipping settings.

calculator
required
string

Shipping calculator.

amount
required
integer

Shipping amount.

Responses
200

Order preview was retrieved.

Response Schema: application/json
currency
string = 3 characters

ISO 4217 alphabetic currency code.

Array of objects

Purchase items array.

Array
type
string

Type of the item.

Enum: "debit" "credit"
description
string

Description of the item.

unitPrice
number <double>

Unit price of the item.

quantity
number <integer>

The item total quantity.

price
number <double>

The item total amount.

planId
string <= 50 characters

The item plan identifier string.

productId
string <= 50 characters

The item product identifier string.

Array of objects (ShippingOption)

Available shipping rates.

Array
name
required
string

The shipping rate name.

price
required
number <double>

The shipping rate price - 0 is a valid value (for free).

currency
required
string = 3 characters

ISO 4217 alphabetic currency code.

id
string <= 50 characters

The shipping rate identifier string.

descriptions
string

The shipping rate description.

Array of objects

Taxes applied to this purchase.

Array
amount
number <double>

Tax amount.

description
string

Tax description.

Array of objects

Discounts applied to this purchase.

Array
couponId
string <= 50 characters

The coupon identifier string.

amount
number

Total amount that was discounted by this coupon.

description
string

The discount description.

subtotalAmount
number <double>

The purchase's subtotal amount.

taxAmount
number <double>

The purchase's taxes amount.

shippingAmount
number <double>

The purchase's shipping amount. This property will likely change to support multiple shipping methods.

discountsAmount
number <double>

The purchase's discounts amount.

total
number <double>

The purchase's total amount.

object (Shipping)

Shipping settings.

calculator
required
string

Shipping calculator.

amount
required
integer

Shipping amount.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

post/previews/orders
Request samples
application/json
{
  • "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "items": [
    ],
  • "billingAddress": {
    },
  • "deliveryAddress": {
    },
  • "couponIds": [
    ],
  • "shipping": {
    }
}
Response samples
application/json
{
  • "currency": "USD",
  • "lineItems": [
    ],
  • "shippingRates": [
    ],
  • "taxes": [
    ],
  • "discounts": [
    ],
  • "subtotalAmount": 0,
  • "taxAmount": 0,
  • "shippingAmount": 0,
  • "discountsAmount": 0,
  • "total": 0,
  • "shipping": {
    }
}