Order
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
Constructors
constructor
**new Order**()
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
Properties
The details of the billing address associated with the order.
billing_address_idstringRequiredThe ID of the billing address associated with the order
canceled_atDateRequiredThe date the order was canceled on.
The details of the cart associated with the order.
cart_idstringRequiredThe ID of the cart associated with the order
The details of the claims created for the order.
created_atDateRequiredThe date with timezone at which the resource was created.
The details of the currency used in the order.
currency_codestringRequiredThe 3 character currency code that is used in the order
The details of the customer associated with the order.
customer_idstringRequiredThe ID of the customer associated with the order
discount_totalnumberRequiredThe total of discount rounded
The details of the discounts applied on the order.
display_idnumberRequiredThe order's display ID
The details of the draft order this order was created from.
draft_order_idstringRequiredThe ID of the draft order this order was created from.
The details of the order edits done on the order.
emailstringRequiredThe email associated with the order
external_idnull | stringRequiredThe ID of an external order.
The order's fulfillment status
Default: not_fulfilled
The details of the fulfillments created for the order.
gift_card_tax_totalnumberRequiredThe total of gift cards with taxes
gift_card_totalnumberRequiredThe total of gift cards
The gift card transactions made in the order.
The details of the gift card used in the order.
idstringRequiredThe order's ID
idempotency_keystringRequiredRandomly generated key used to continue the processing of the order in case of failure.
item_tax_totalnull | numberRequiredThe tax total applied on items
The details of the line items that belong to the order.
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
no_notificationbooleanRequiredFlag for describing whether or not notifications related to this should be send.
object"order"RequiredDefault: "order"
paid_totalnumberRequiredThe total amount paid
The order's payment status
Default: not_paid
The details of the payments used in the order.
raw_discount_totalnumberRequiredThe total of discount
refundable_amountnumberRequiredThe amount that can be refunded
refunded_totalnumberRequiredThe total amount refunded if the order is returned.
The details of the refunds created for the order.
The details of the region this order was created in.
region_idstringRequiredThe ID of the region this order was created in.
The details of the line items that are returnable as part of the order, swaps, or claims
The details of the returns created for the order.
The details of the sales channel this order belongs to.
sales_channel_idnull | stringRequiredThe ID of the sales channel this order belongs to.
The details of the shipping address associated with the order.
shipping_address_idstringRequiredThe ID of the shipping address associated with the order
The details of the shipping methods used in the order.
shipping_tax_totalnull | numberRequiredThe tax total applied on shipping
shipping_totalnumberRequiredThe total of shipping
The order's status
Default: pending
subtotalnumberRequiredThe subtotal of the order
The details of the swaps created for the order.
tax_ratenull | numberRequiredThe order's tax rate
tax_totalnull | numberRequiredThe total of tax
totalnumberRequiredThe total amount of the order
updated_atDateRequiredThe date with timezone at which the resource was updated.
Methods
beforeInsert
Private **beforeInsert**(): Promise<void>
Returns
Promise<void>
PromisePromise<void>RequiredWas this section helpful?