title: Order description: Represents an order x-resourceId: order required: - customer_id - email - region_id - currency_code properties: id: type: string description: The order's ID example: order_01G8TJSYT9M6AVS5N4EMNFS1EK status: type: string description: The order's status enum: - pending - completed - archived - canceled - requires_action default: pending fulfillment_status: type: string description: The order's fulfillment status enum: - not_fulfilled - partially_fulfilled - fulfilled - partially_shipped - shipped - partially_returned - returned - canceled - requires_action default: not_fulfilled payment_status: type: string description: The order's payment status enum: - not_paid - awaiting - captured - partially_refunded - refuneded - canceled - requires_action default: not_paid display_id: type: integer description: The order's display ID example: 2 cart_id: type: string description: The ID of the cart associated with the order example: cart_01G8ZH853Y6TFXWPG5EYE81X63 cart: description: A cart object. Available if the relation `cart` is expanded. type: object customer_id: type: string description: The ID of the customer associated with the order example: cus_01G2SG30J8C85S4A5CHM2S1NS2 customer: description: A customer object. Available if the relation `customer` is expanded. type: object email: description: The email associated with the order type: string format: email billing_address_id: type: string description: The ID of the billing address associated with the order example: addr_01G8ZH853YPY9B94857DY91YGW billing_address: description: Available if the relation `billing_address` is expanded. $ref: ./address.yaml shipping_address_id: type: string description: The ID of the shipping address associated with the order example: addr_01G8ZH853YPY9B94857DY91YGW shipping_address: description: Available if the relation `shipping_address` is expanded. $ref: ./address.yaml region_id: type: string description: The region's ID example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G region: description: A region object. Available if the relation `region` is expanded. type: object currency_code: description: The 3 character currency code that is used in the order type: string example: usd externalDocs: url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes description: See a list of codes. currency: description: Available if the relation `currency` is expanded. $ref: ./currency.yaml tax_rate: description: The order's tax rate type: number example: 0 discounts: type: array description: >- The discounts used in the order. Available if the relation `discounts` is expanded. items: type: object description: A discount object. gift_cards: type: array description: >- The gift cards used in the order. Available if the relation `gift_cards` is expanded. items: type: object description: A gift card object. shipping_methods: type: array description: >- The shipping methods used in the order. Available if the relation `shipping_methods` is expanded. items: $ref: ./shipping_method.yaml payments: type: array description: >- The payments used in the order. Available if the relation `payments` is expanded. items: $ref: ./payment.yaml fulfillments: type: array description: >- The fulfillments used in the order. Available if the relation `fulfillments` is expanded. items: $ref: ./fulfillment.yaml returns: type: array description: >- The returns associated with the order. Available if the relation `returns` is expanded. items: type: object description: A return object. claims: type: array description: >- The claims associated with the order. Available if the relation `claims` is expanded. items: type: object description: A claim order object. refunds: type: array description: >- The refunds associated with the order. Available if the relation `refunds` is expanded. items: type: object description: A refund object. swaps: type: array description: >- The swaps associated with the order. Available if the relation `swaps` is expanded. items: type: object description: A swap object. draft_order_id: type: string description: The ID of the draft order this order is associated with. example: null draft_order: description: A draft order object. Available if the relation `draft_order` is expanded. type: object items: type: array description: >- The line items that belong to the order. Available if the relation `items` is expanded. items: $ref: ./line_item.yaml gift_card_transactions: type: array description: >- The gift card transactions used in the order. Available if the relation `gift_card_transactions` is expanded. items: $ref: ./gift_card_transaction.yaml canceled_at: type: string description: The date the order was canceled on. format: date-time no_notification: description: >- Flag for describing whether or not notifications related to this should be send. type: boolean example: false idempotency_key: type: string description: >- Randomly generated key used to continue the processing of the order in case of failure. externalDocs: url: >- https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. type: string example: null sales_channel_id: type: string description: The ID of the sales channel this order is associated with. example: null sales_channel: description: >- A sales channel object. Available if the relation `sales_channel` is expanded. type: object shipping_total: type: integer description: The total of shipping example: 1000 discount_total: type: integer description: The total of discount example: 800 tax_total: type: integer description: The total of tax example: 0 refunded_total: type: integer description: The total amount refunded if the order is returned. example: 0 total: type: integer description: The total amount of the order example: 8200 subtotal: type: integer description: The subtotal of the order example: 8000 paid_total: type: integer description: The total amount paid example: 8000 refundable_amount: type: integer description: The amount that can be refunded example: 8200 gift_card_total: type: integer description: The total of gift cards example: 0 gift_card_tax_total: type: integer description: The total of gift cards with taxes example: 0