OrderItemInterface attributes and implementations

OrderItemInterface provides details about items in a customer’s order history. It has the following implementations:

Attributes

Attribute Data Type Description
discounts [Discount] Final discount information for the product
entered_options [OrderItemOption] The entered option for the base product, such as a logo or image
id ID! The unique identifier for the order item
product_name String The name of the base product
product_sale_price Money! The sale price of the base product, including selected options
product_sku String! SKU of the base product
product_type String The type of product, such as simple or configurable
product_url_key String URL key of the base product
quantity_canceled Float The number of canceled items
quantity_invoiced Float The number of invoiced items
quantity_ordered Float The number of units ordered for this item
quantity_refunded Float The number of refunded items
quantity_returned Float The number of returned items
quantity_shipped Float The number of shipped items
selected_options [OrderItemOption] The selected options for the base product, such as color or size
status String The status of the order item

Implementations

OrderItem attributes

The OrderItem object does not introduce any additional attributes to OrderItemInterface.

BundleOrderItem attributes

The BundleOrderItem object defines the following attribute:

Attribute Data type Description
bundle_options [ItemSelectedBundleOption] A list of bundle options that are assigned to the bundle product

ItemSelectedBundleOption attributes

The ItemSelectedBundleOption object contains a list of bundle options that are assigned to the bundle product.

Attribute Data type Description
id ID! The unique identifier of the option
label String! The label of the option
values [ItemSelectedBundleOptionValue] A list of products that represent the values of the parent option

ItemSelectedBundleOptionValue attributes

Attribute Data type Description
id ID! The unique identifier of the option
price Money! The price of the child bundle product
product_name String! The name of the child bundle product
product_sku String! The SKU of the child bundle product
quantity Float! Indicates how many of this bundle product were ordered

DownloadableOrderItem attributes

The DownloadableOrderItem object defines the following attribute:

Attribute Data type Description
downloadable_links [DownloadableItemsLinks] A list of downloadable links that were ordered from the downloadable product

The DownloadableItemsLinks object defines characteristics of a downloadable product.

Attribute Data type Description
sort_order Int A number indicating the sort order
title String The display name of the link
uid ID! A string that encodes option details

GiftCardOrderItem attributes

The GiftCardOrderItem object defines the following attribute:

Attribute Data type Description
gift_card GiftCardItem Selected gift card properties for an order item

GiftCardItem attributes

The GiftCardItem object contains selected buyer-entered gift card properties for an order item.

Attribute Data type Description
message String A message provided by the sender to the recipient
recipient_email String The email provided for the recipient of a virtual gift card
recipient_name String The name provided for the recipient of a physical or virtual gift card
sender_email String The sender email provided for a virtual gift card
sender_name String The sender name provided for a physical or virtual gift card

Example usage

The following query returns details about order ID 000000005. The BundleOrderItem and DownloadableOrderItem fragments return item-specific information.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  customer {
    firstname
    lastname
    email
    orders(
      filter: {
        number: {
          eq: "000000005"
        }
      }) {
      items {
        id
        items {
          id
          product_name
          product_sku
          product_type
          quantity_ordered
          quantity_invoiced
          quantity_shipped
          quantity_refunded
          ...on BundleOrderItem {
            bundle_options {
              id
              label
              values {
                id
                product_name
                product_sku
                quantity
                price {
                  value
                  currency
                }
              }
            }
          }
          ...on DownloadableOrderItem {
            downloadable_links {
              uid
              title
            }
          }
        }
      }
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
  "data": {
    "customer": {
      "firstname": "Roni",
      "lastname": "Costello",
      "email": "roni_cost@example.com",
      "orders": {
        "items": [
          {
            "id": "NQ==",
            "items": [
              {
                "id": "MTU=",
                "product_name": "Yoga Adventure",
                "product_sku": "240-LV06",
                "product_type": "downloadable",
                "quantity_ordered": 1,
                "quantity_invoiced": 1,
                "quantity_shipped": 0,
                "quantity_refunded": 0,
                "downloadable_links": [
                  {
                    "uid": "ZG93bmxvYWRhYmxlLzM=",
                    "title": "Yoga Adventure"
                  }
                ]
              },
              {
                "id": "MTY=",
                "product_name": "Sprite Yoga Companion Kit",
                "product_sku": "24-WG080-24-WG082-blue-24-WG084-24-WG087-24-WG088",
                "product_type": "bundle",
                "quantity_ordered": 1,
                "quantity_invoiced": 1,
                "quantity_shipped": 1,
                "quantity_refunded": 0,
                "bundle_options": [
                  {
                    "id": "Mg==",
                    "label": "Sprite Foam Yoga Brick",
                    "values": [
                      {
                        "id": "MTg=",
                        "product_name": "Sprite Foam Yoga Brick",
                        "product_sku": "24-WG084",
                        "quantity": 1,
                        "price": {
                          "value": 5,
                          "currency": "USD"
                        }
                      }
                    ]
                  },
                  {
                    "id": "NA==",
                    "label": "Sprite Foam Roller",
                    "values": [
                      {
                        "id": "MjA=",
                        "product_name": "Sprite Foam Roller",
                        "product_sku": "24-WG088",
                        "quantity": 1,
                        "price": {
                          "value": 19,
                          "currency": "USD"
                        }
                      }
                    ]
                  },
                  {
                    "id": "MQ==",
                    "label": "Sprite Stasis Ball",
                    "values": [
                      {
                        "id": "MTc=",
                        "product_name": "Sprite Stasis Ball 65 cm",
                        "product_sku": "24-WG082-blue",
                        "quantity": 1,
                        "price": {
                          "value": 27,
                          "currency": "USD"
                        }
                      }
                    ]
                  },
                  {
                    "id": "Mw==",
                    "label": "Sprite Yoga Strap",
                    "values": [
                      {
                        "id": "MTk=",
                        "product_name": "Sprite Yoga Strap 10 foot",
                        "product_sku": "24-WG087",
                        "quantity": 1,
                        "price": {
                          "value": 21,
                          "currency": "USD"
                        }
                      }
                    ]
                  }
                ]
              },
              {
                "id": "MjE=",
                "product_name": "Radiant Tee",
                "product_sku": "WS12-XS-Orange",
                "product_type": "configurable",
                "quantity_ordered": 1,
                "quantity_invoiced": 1,
                "quantity_shipped": 1,
                "quantity_refunded": 1
              }
            ]
          }
        ]
      }
    }
  }
}