SmakeSmake API Docs
EndpointsProducts

Show product

GET
/products/{id}

Returns the product with the id = x.

Expanding relationships

You can expand some resources to show more details.

See: Expanding Objects

  • Expand variant — You can show the variant data instead of the id: /products/1?expand=variants
  • Expand variants customizations resource — You can show entire variant data including customizations resources: /products/1?expand=variants.views.customizations.resource
  • Expand product's allowed designable methods — You can show details of allowed designable production method: /products/1?expand=designable_production_methods
AuthorizationbearerAuth

Authorization

bearerAuth
AuthorizationBearer <token>

API token as bearer token — you receive a test and a live token, there is no switch between them. See Setup → Authentication and Setup → Test mode.

In: header

Path Parameters

id*integer

The ID of the resource.

Query Parameters

expand?string

You can expand some resources to show more details — see Expanding Objects. Allowed values:

  • variantsExpand variant. You can show the variant data instead of the id.
  • variants.views.customizations.resourceExpand variants customizations resource. You can show entire variant data including customizations resources.
  • designable_production_methodsExpand product's allowed designable methods. You can show details of allowed designable production method.

Header Parameters

Accept*"application/json"

The API only responds with JSON — this header is mandatory on every request (see Setup → Headers).

Default"application/json"

Value in

  • "application/json"

Response Body

application/json

application/json

application/json

Request example
curl -X GET "https://example.com/products/0?expand=variants" \  -H "Accept: application/json"

GET /products/1 HTTP/1.1

{  "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",  "designable_production_methods": [    1,    2,    3  ],  "variants": [    1,    2,    3  ]}

List products GET

The Products endpoint lets you list all products available. > **Info:** Variants Attribute is expandable. See: [Expanding Objects](/docs/checkout/2022-02-01/basic/expanding-objects) Returns a collection of products. ### Filtering You can filter your results as follows: - **List products for specified id(s)** — `/products?filter[id]=1`, `/products?filter[id]=1,2,3` - **List products for specified title** — `/products?filter[title]=qui` - **List products for a specified origin code** — `/products?filter[variants.origin.sku]=58975` - **List products for a specified origin manufacturer_number** — `/products?filter[origin.manufacturer_number]=X01234` - **List products for a specified design method** — `/products?filter[designable_production_methods]=direct-to-film` See: [Pagination](/docs/checkout/2022-02-01/basic/pagination), [Filtering](/docs/checkout/2022-02-01/basic/filtering) ### Expanding relationships You can expand some resources to show more details. See: [Expanding Objects](/docs/checkout/2022-02-01/basic/expanding-objects) - **Expand variant** — You can show the variant data instead of the `id`: `/products?expand=variants` - **Expand variants customizations resource** — You can show entire variant data including customizations resources: `/products?expand=variants.views.customizations.resource` - **Expand product's allowed designable methods** — You can show which methods design can be done on this product: `/products?expand=designable_production_methods`

List variants GET

Here you can view a product variant or design a new one from an existing product variant. When designing, information such as customizations, dimensions, files, etc. must be transferred. After that you will receive a new product variant that can be ordered. Returns a collection of variants. **Filtering** You can filter your results as follows — see [Pagination](/docs/checkout/2022-02-01/basic/pagination), [Filtering](/docs/checkout/2022-02-01/basic/filtering): - `/variants?filter[id]=1` / `/variants?filter[id]=1,2,3` — list variants for specified id(s) - `/variants?filter[origin.sku]=42443` — list variants for a specified sku (not an exact search) - `/variants?filter[origin.external_identifier]=extern-123` — list variants for external identifier - `/variants?filter[collection_name]=catalogue` — list variants for specified collection name(s) **Expanding relationships** You can expand some resources to show more details — see [Expanding Objects](/docs/checkout/2022-02-01/basic/expanding-objects): - `/variants?expand=product` — show the content of the product instead of the `id` - `/variants?expand=views.customizations.resource` — show the content of the customizations' resource