Review order
Validate an Order and see valid parameters for placing an Order and other Order information before Order placement.
Tip: We provide a URL configurable Checkout UI to make using these capabilities a breeze. We recommend using that for most use cases. If you need more control over the experience, we recommend you use the Order review and Order placement capabilities directly.
OrderingQuery.reviewOrder()
Takes all the same arguments as OrderingMutation.createOrder()
, so it can be used as a dry-run to validate that the input will create a valid order.
The response includes the known valid alternative options that can be passed in for some fields. For example, it includes the available delivery dates, payment methods, and fulfillment types.
Types
OrderingReviewOrderInput
manufacturer
string | null
- The manufacturer of the order.
address
OrderingAddressInput
- The address should correspond to a valid property in the system. If there is no matching property and the address is valid, a new property will be created. If the address is not valid, the mutation will fail with an error.
products
OrderingOrderProductInput[]
- An array of order products. At least one product must be specified.
contactInfo
OrderingCustomerContactInfoInput
| null
- The contact information of the customer placing the order.
fulfillmentMethod
OrderingFulfillmentMethod | null
- The fulfillment method for the order. Possible values are DELIVERY
and PICKUP
. If not provided, defaults to ‘DELIVERY’ if no value is provided and both are available.
requestedDeliveryDate
string | null
- The date the customer wants the order delivered. If not provided, defaults to the earliest available. If the provided date is not available, the mutation will fail with an error.
poNumber
string | null
- The purchase order number associated with the order. Can be any string value.
specialInstructions
string | null
- Special instructions for the order, if any.
distributionCenterId
string | null
- The ID of the distribution center where the order will be placed. If omitted, the order will be placed in the closest distribution center.
paymentMethodId
string | null
- The ID of the payment method associated with the order. Note: Unlike in the OrderingCreateOrderInput
, this field is not required.
OrderingReviewOrderResponse
address
OrderingAddress
- The property address associated with the order. If the fulfillmentMethod is DELIVERY
, this is the address the order will be shipped to.
products
OrderingOrderProduct[]
- An array of order products.
contactInfo
OrderingCustomerContactInfo | undefined
- The contact information that was passed in. Has all the same properties as OrderingCustomerContactInfoInput
.
distributionCenter
OrderingDistributionCenter
- The distribution center where the order will be placed.
taxCents
number
- The total tax amount for the order, in cents.
subtotalCents
number
- The subtotal for the order, in cents.
totalPriceCents
number
- The total price for the order, in cents. This is the sum of the subtotal and tax.
poNumber
string | undefined
- The purchase order number that was passed in.
specialInstructions
string | undefined
- The special instructions that were passed in.
fulfillmentMethod
OrderingFulfillmentMethod
- One of DELIVERY
or PICKUP
. This is the fulfillment method that will be used for the order. Will always return a valid value for the order. If an invalid fulfillment method was passed to reviewOrder()
, the query will fail with an error.
requestedDeliveryDate
string
- The requested delivery date for the order. The value returned will be a valid delivery date for the product & distribution center. If an invalid delivery date was passed to revierOrder()
, the query will fail with an error.
availableDeliveryDates
string[]
- An array of available delivery dates for the order. The array will always contain at least one value. If there are no available delivery dates, the query will fail with an error.
paymentMethodId
string
- The ID of the payment method that will be used for the order. If no payment method was passed to reviewOrder()
, the API will pick a value from `availablePaymentMethods“ and return a sensible default.
availablePaymentMethods
OrderingPaymentMethod[]
- An array of available payment methods for the order. The array will always contain at least one value. If there are no available payment methods, the query will fail with an error.
OrderingAddress
Both line2 and country are optional. All other fields are required. reviewOrder
will only return a valid addresses for properties registered with SIBI. If an invalid address is passed to reviewOrder()
, the query will fail with an error.
OrderingDistributionCenter
name
string
- The name of the distribution center.
imageUrl
string | undefined
- The URL of the distribution center’s logo.
storeNumber
string
- The store number of the distribution center. May not actually be numeric.
address
OrderingAddress
- The address of the distribution center.
fulfillmentMethods
string[]
- An array of fulfillment methods that are available for the distribution center. Possible values are DELIVERY
and PICKUP
.
OrderingPaymentMethod
These are the two possible payment methods that can be returned by reviewOrder()
. The id
and description
fields are always returned. The last4
field is only returned for OrderingPaymentMethodStripe
.
id
string
- The ID of the payment method.
description
string
- A human-readable description of the payment method.
last4
string
- The last 4 digits of the credit card number. Only returned for OrderingPaymentMethodStripe
.