> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sibipro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](/checkout-links) 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()`](/graphql/ordering/create-order), 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

```graphql theme={null}
type OrderingQuery {
  reviewOrder(input: OrderingReviewOrderInput!): OrderingReviewOrderResponse!
}
```

* [`input: OrderingReviewOrderInput`](#orderingrevieworderinput)
* [`response: OrderingReviewOrderResponse`](#orderingrevieworderresponse)

## `OrderingReviewOrderInput`

```graphql theme={null}
input OrderingReviewOrderInput {
  manufacturer: String!
  address: OrderingAddressInput!
  products: [OrderingOrderProductInput!]!
  contactInfo: OrderingCustomerContactInfoPartialInput
  fulfillmentMethodId: String
  fulfillmentMethodType: OrderingFulfillmentMethodType
  shipToOfficePropertyId: String
  requestedDeliveryDate: String
  poNumber: String
  specialInstructions: String
  distributionCenterId: String
  paymentMethodId: String
  idempotencyKey: String
  subscribers: [OrderingOrderSubscriberInput!]
  warrantyOrderPaymentMethodId: String
}
```

***

### `manufacturer`

`string | null` - The manufacturer of the order.

***

### `address`

[`OrderingAddressInput`](/graphql/ordering/ordering-address) - 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[]`](/graphql/ordering/ordering-order-product-input) - An array of order products. At least one product must be specified.

***

### `contactInfo`

[`OrderingCustomerContactInfoPartialInput`](/graphql/ordering/ordering-customer-contact-info-partial-input)`| null` - The contact information of the customer placing the order.

***

### `fulfillmentMethodId`

`string | null` - The ID of a specific fulfillment method to use. Pass the `id` from one of the `availableFulfillmentMethods` returned by a prior `reviewOrder` call. Cannot be specified together with `fulfillmentMethodType`.

When not provided, the API will automatically select a fulfillment method using this logic:

1. If the distributor has a configured default for the resolved type, that default is used.
2. Otherwise, the first available method for the resolved type is used.

We recommend calling `reviewOrder` first to discover `availableFulfillmentMethods`, then passing the desired `id` explicitly.

***

### `fulfillmentMethodType`

`OrderingFulfillmentMethodType | null` - The type of fulfillment method to use. Possible values are `DELIVERY` and `PICKUP`. Defaults to `DELIVERY` if neither `fulfillmentMethodId` nor `fulfillmentMethodType` is provided. Cannot be specified together with `fulfillmentMethodId`.

***

### `shipToOfficePropertyId`

`string | null` - The property id of the office to ship the order to. Only valid when `fulfillmentMethodId` is `'ship-to-office'`. Required when using the ship-to-office fulfillment method.

***

### `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.

***

### `idempotencyKey`

`string | null` - A unique identifier for this request. This field is included for compatibility with `OrderingCreateOrderInput` but is ignored by the `reviewOrder` query.

***

### `subscribers`

`OrderingOrderSubscriberInput[]` - An array of subscribers that will receive updates about the order. If the email is not formatted correctly, the query will fail with an error. Other than email validation, the reviewOrder API does not do anything with the subscribers. It is mostly included to make all createOrder inputs valid inputs for reviewOrder.

***

### `warrantyOrderPaymentMethodId`

`string | null` - If provided, this payment method is used for the extended-warranty sub-order instead of the parent order's `paymentMethodId`. Must be one of the [`warranties.availablePaymentMethods`](/graphql/ordering/ordering-review-order-warranties#availablepaymentmethods) returned in the response. Ignored when no warranty coverage is applied to the order.

***

## `OrderingOrderSubscriberInput`

```graphql theme={null}
input OrderingOrderSubscriberInput {
  email: String!
}
```

## `OrderingReviewOrderResponse`

```graphql theme={null}
type OrderingReviewOrderResponse {
  address: OrderingAddress!
  products: [OrderingOrderProduct!]!
  contactInfo: OrderingCustomerContactInfo
  distributionCenter: OrderingDistributionCenter!
  taxCents: Int!
  subtotalCents: Int!
  totalPriceCents: Int!
  fees: [OrderingFee!]!
  discounts: [OrderingDiscount!]!
  poNumber: String
  specialInstructions: String
  fulfillmentMethod: OrderingFulfillmentMethod!
  requestedDeliveryDate: String!
  paymentMethodId: String!
  availablePaymentMethods: [OrderingPaymentMethod!]!
  availableFulfillmentMethods: [OrderingFulfillmentMethod!]!
  subscribers: [OrderingOrderSubscriber!]!
  warranties: OrderingReviewOrderWarranties!
}
```

***

### `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[]`](/graphql/ordering/ordering-order-product) - An array of order products.

***

### `contactInfo`

`OrderingCustomerContactInfo | undefined` - The contact information that was passed in. Has all the same properties as [`OrderingCustomerContactInfoInput`](/graphql/ordering/ordering-customer-contact-info-input).

### `distributionCenter`

[`OrderingDistributionCenter`](#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`](#orderingfulfillmentmethod) - The fulfillment method that will be used for the order. If the method was auto-selected (no `fulfillmentMethodId` provided), this reflects the resolved default. If an invalid fulfillment method was specified, 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.

***

### `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[]`](#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.

***

### `availableFulfillmentMethods`

[`OrderingFulfillmentMethod[]`](#orderingfulfillmentmethod) - An array of available fulfillment methods for the order. Use the `id` from one of these entries as `fulfillmentMethodId` when placing or re-reviewing the order.

***

### `fees`

`OrderingFee[]` - An array of fees applied to the order.

***

### `discounts`

`OrderingDiscount[]` - An array of discounts applied to the order.

***

### `subscribers`

`OrderingOrderSubscriber[]` - The list of subscribers that was passed in.

***

### `warranties`

[`OrderingReviewOrderWarranties`](/graphql/ordering/ordering-review-order-warranties) - Extended-warranty sub-order details. Populated regardless of whether warranty coverage is applied, so callers can preview what coverage would be added before committing. Per-product warranty options and the resolved selection are available on each [`OrderingOrderProduct`](/graphql/ordering/ordering-order-product) in `products`.

## `OrderingAddress`

```graphql theme={null}
type OrderingAddress {
  line1: String!
  line2: String
  city: String!
  stateOrProvince: String!
  postalCode: String!
  country: String
}
```

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`

```graphql theme={null}
type OrderingDistributionCenter {
  id: ID!
  name: String!
  latitude: Float
  longitude: Float
  address: OrderingAddress!
  imageUrl: String
  storeNumber: String!
}
```

### `id`

`string` - The distribution center's unique identifier. Use this when placing orders at a specific DC.

***

### `name`

`string` - The name of the distribution center.

***

### `latitude`

`number | undefined` - The latitude of the distribution center's location.

***

### `longitude`

`number | undefined` - The longitude of the distribution center's location.

***

### `address`

[`OrderingAddress`](#orderingaddress) - The address 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.

***

## `OrderingFee`

```graphql theme={null}
type OrderingFee {
  name: String!
  amountCents: Int!
}
```

### `name`

`string` - The name of the fee.

***

### `amountCents`

`number` - The fee amount in cents.

***

## `OrderingDiscount`

```graphql theme={null}
type OrderingDiscount {
  name: String!
  amountCents: Int!
}
```

### `name`

`string` - The name of the discount.

***

### `amountCents`

`number` - The discount amount in cents.

***

## `OrderingFulfillmentMethod`

```graphql theme={null}
type OrderingFulfillmentMethod {
  id: String!
  title: String!
  description: String
  type: OrderingFulfillmentMethodType!
  dates: [String!]!
}

enum OrderingFulfillmentMethodType {
  DELIVERY
  PICKUP
}
```

### `id`

`string` - The unique identifier for the fulfillment method. Use this when placing orders with a specific fulfillment method.

***

### `title`

`string` - The human-readable title of the fulfillment method.

***

### `description`

`string | undefined` - An optional description providing additional details about the fulfillment method.

***

### `type`

`OrderingFulfillmentMethodType` - The type of fulfillment method. Either `DELIVERY` or `PICKUP`.

***

### `dates`

`string[]` - An array of available dates for this fulfillment method.

***

## `OrderingPaymentMethod`

```graphql theme={null}
union OrderingPaymentMethod = OrderingPaymentMethodManufacturerCredit | OrderingPaymentMethodStripe

type OrderingPaymentMethodManufacturerCredit {
  id: String!
  description: String!
}

type OrderingPaymentMethodStripe {
  id: String!
  description: String!
  last4: String!
}
```

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`.
