This is the documentation for 2022-02-01.

Expanding Objects

Many objects contain the id of a related object in their response properties. For example, a Product may have associated Variant ids. Those objects can be expanded inline with the expand request parameter. Objects that can be expanded are noted in this documentation.

You can expand recursively by specifying nested fields after a dot (.). For example, requesting items.variant on an order will expand the variant property into a full variant object.

You can expand multiple objects at once by separating them with a comma.

Variants Not Expanded

Request

GET /products/1 HTTP/1.1

Response

{
    "is_test": false,
    "id": 1,
    "title": "qui ut nemo",
    "description": "Autem nesciunt ipsam excepturi non distinctio quas ullam placeat. Quam quidem rerum veniam corrupti velit aperiam non. Repudiandae rem incidunt atque optio vero et voluptatem. Fuga et quos in ipsa.",
    "created_at": "2017-11-15T08:07:48+00:00",
    "updated_at": "2017-11-15T08:07:48+00:00",
    "variants": [
        1,
        2,
        3,
    ]
}

Variants Expanded

Request

GET /products/1?expand=variants HTTP/1.1

Response

{
    "id": 1,
    "is_test": false,
    "title": "T-Shirt 1 not designable",
    "description": "Qui excepturi voluptas et esse in quis dolores. At molestiae ipsam provident earum aut omnis inventore non. Ea repellat distinctio laboriosam et mollitia qui.",
    "created_at": "2022-04-28T14:31:45+00:00",
    "updated_at": "2022-04-28T14:31:45+00:00",
    "variants": [
        {
            "id": 1,
            "state": "completed",
            "collection_name": "catalogue",
            "total": 20.49,
            "price": 19.15,
            "tax": 1.34,
            "tax_rate": 7,
            "option_values": [
                {
                    "handle": "S",
                    "name": "S",
                    "option_type": {
                        "handle": "size",
                        "name": "Size"
                    }
                },
                {
                    "handle": "lime",
                    "name": "lime",
                    "option_type": {
                        "handle": "color",
                        "name": "Color"
                    }
                }
            ],
            "origin": {
                "sku": "production-variant-1",
                "external_identifier": "56879425366"
            },
            "product": 1,
            "views": [
                {
                    "handle": "front",
                    "name": "Front View",
                    "media": [
                        {
                            "id": 38,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-front-lime.png",
                            "size": 54738,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/19258c4eeefe4ce98ea37ed670501ba6/view-image-front-lime.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=1b129f611ab0a6a6ec2facfc0a6076297d7f2ab809de7f0047bff475a85111c2",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:08+00:00",
                            "updated_at": "2022-04-28T14:31:08+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "back",
                    "name": "Rear View",
                    "media": [
                        {
                            "id": 39,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-back-lime.png",
                            "size": 40214,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/6214cdeb5f51499bba015c32e0d29917/view-image-back-lime.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=38d4f41af9a6bb7f4c38dc98831519f64c0f65eba005cab6205a01c800fb496e",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:08+00:00",
                            "updated_at": "2022-04-28T14:31:08+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "left",
                    "name": "Left View",
                    "media": [
                        {
                            "id": 40,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-left-lime.png",
                            "size": 33003,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/d238d888cfc3448d9d9b06ef24456a68/view-image-left-lime.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=3e8c53c1ec85803c35bdb90ac3d0e7adbd27fb55bb1cf128bbb064434d72fc67",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:09+00:00",
                            "updated_at": "2022-04-28T14:31:09+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "right",
                    "name": "Right View",
                    "media": [
                        {
                            "id": 41,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-right-lime.png",
                            "size": 33411,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/fe2af0c54eaf4fc4b84d3b2e657d12b4/view-image-right-lime.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=d5bb51e9790a204da95869e91b7c081e46ddcddb61a13d06acadad84892529f8",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:09+00:00",
                            "updated_at": "2022-04-28T14:31:09+00:00"
                        }
                    ],
                    "customizations": []
                }
            ],
            "failure_message": null,
            "created_at": "2022-04-28T14:31:45+00:00",
            "updated_at": "2022-04-28T14:31:45+00:00"
        },
        {
            "id": 2,
            "state": "completed",
            "collection_name": "catalogue",
            "total": 201.32,
            "price": 169.18,
            "tax": 32.14,
            "tax_rate": 19,
            "option_values": [
                {
                    "handle": "S",
                    "name": "S",
                    "option_type": {
                        "handle": "size",
                        "name": "Size"
                    }
                },
                {
                    "handle": "cyan",
                    "name": "cyan",
                    "option_type": {
                        "handle": "color",
                        "name": "Color"
                    }
                }
            ],
            "origin": {
                "sku": "production-variant-1",
                "external_identifier": "56879425367"
            },
            "product": 1,
            "views": [
                {
                    "handle": "front",
                    "name": "Front View",
                    "media": [
                        {
                            "id": 42,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-front-cyan.png",
                            "size": 54723,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/c0979fbf9dc54db1a4c6ae2a5162a743/view-image-front-cyan.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=db5ec9bc2d528789f554373e4943920c1cbad87344804c90fddb2e372a3ffb11",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:09+00:00",
                            "updated_at": "2022-04-28T14:31:09+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "back",
                    "name": "Rear View",
                    "media": [
                        {
                            "id": 43,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-back-cyan.png",
                            "size": 40319,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/c156101fa055404990dfb52ede9b576d/view-image-back-cyan.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=86570f7742c678a64856c8f2218d7933733a8bc0d3ff2e3a8b40ceab5733629d",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:10+00:00",
                            "updated_at": "2022-04-28T14:31:10+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "left",
                    "name": "Left View",
                    "media": [
                        {
                            "id": 44,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-left-cyan.png",
                            "size": 33012,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/5a12c902143240c892701825ca152027/view-image-left-cyan.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=f3c6e0fc6e3779af8a686f27e3e4f104d217e1eee933b8a287ecdf0ccbce77c9",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:10+00:00",
                            "updated_at": "2022-04-28T14:31:10+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "right",
                    "name": "Right View",
                    "media": [
                        {
                            "id": 45,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-right-cyan.png",
                            "size": 33623,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/ef8d0d40eaa841bba7fe51c95e260a30/view-image-right-cyan.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=2e0b60e17d6297d0b8ab2194963cb6a28f77b06c1f4015ce39d6023183f18b69",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:10+00:00",
                            "updated_at": "2022-04-28T14:31:10+00:00"
                        }
                    ],
                    "customizations": []
                }
            ],
            "failure_message": null,
            "created_at": "2022-04-28T14:31:45+00:00",
            "updated_at": "2022-04-28T14:31:45+00:00"
        },
        {
            "id": 3,
            "state": "completed",
            "collection_name": "catalogue",
            "total": 193.89,
            "price": 162.93,
            "tax": 30.96,
            "tax_rate": 19,
            "option_values": [
                {
                    "handle": "S",
                    "name": "S",
                    "option_type": {
                        "handle": "size",
                        "name": "Size"
                    }
                },
                {
                    "handle": "purple",
                    "name": "purple",
                    "option_type": {
                        "handle": "color",
                        "name": "Color"
                    }
                }
            ],
            "origin": {
                "sku": "production-variant-1",
                "external_identifier": "56879425368"
            },
            "product": 1,
            "views": [
                {
                    "handle": "front",
                    "name": "Front View",
                    "media": [
                        {
                            "id": 46,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-front-purple.png",
                            "size": 54946,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/e7a5042b6e7748579cc3bd405cc3dd80/view-image-front-purple.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=73632df9f33f69f36c6df0ee625beab0059174771f60ce4d4749b6c370c989e4",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:10+00:00",
                            "updated_at": "2022-04-28T14:31:10+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "back",
                    "name": "Rear View",
                    "media": [
                        {
                            "id": 47,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-back-purple.png",
                            "size": 40298,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/21d30e4f92444e5a919e76e63c48ef2d/view-image-back-purple.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=d5d109a6c3e55574cc4c891e9dd825d2e600be315fa6cbc38902622d2d79103e",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:11+00:00",
                            "updated_at": "2022-04-28T14:31:11+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "left",
                    "name": "Left View",
                    "media": [
                        {
                            "id": 48,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-left-purple.png",
                            "size": 33095,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/de7cb3e2aaa9433d8871ae91b608bc70/view-image-left-purple.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=4076871583b9d13dfdf517f6eb95e604219930e30e2a59f288521bc94ae85c16",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:11+00:00",
                            "updated_at": "2022-04-28T14:31:11+00:00"
                        }
                    ],
                    "customizations": []
                },
                {
                    "handle": "right",
                    "name": "Right View",
                    "media": [
                        {
                            "id": 49,
                            "is_test": 0,
                            "collection_name": "view-image",
                            "file_name": "view-image-right-purple.png",
                            "size": 33638,
                            "mime_type": "image/png",
                            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/6bc4938844874946b0bee879f1b16b36/view-image-right-purple.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATV6IRLEXI2SRHX47%2F20220429%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T111909Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=16c14c605614667ccb6a21a50ae5db3b6f6855121b8138a435cf89fca02bd7d6",
                            "state": "pending",
                            "requested": null,
                            "failure_message": null,
                            "created_at": "2022-04-28T14:31:11+00:00",
                            "updated_at": "2022-04-28T14:31:11+00:00"
                        }
                    ],
                    "customizations": []
                }
            ],
            "failure_message": null,
            "created_at": "2022-04-28T14:31:45+00:00",
            "updated_at": "2022-04-28T14:31:45+00:00"
        }
    ]
}