SmakeSmake API Docs
EndpointsProducts

List products

GET
/products

The Products endpoint lets you list all products available.

Info: Variants Attribute is expandable. See: 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, Filtering

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?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
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

Query Parameters

page?integer

Page number to return — see Basic Usage → Pagination.

Default1
per_page?integer

Number of objects per page (default 25, maximum 100) — see Basic Usage → Pagination.

Rangevalue <= 100
Default25
filter[id]?string

List products for specified id(s). Several ids can be passed comma-separated:

  • /products?filter[id]=1
  • /products?filter[id]=1,2,3
filter[title]?string

List products for specified title:

  • /products?filter[title]=qui
filter[variants.origin.sku]?string

List products for a specified origin code:

  • /products?filter[variants.origin.sku]=58975
filter[origin.manufacturer_number]?string

List products for a specified origin manufacturer_number:

  • /products?filter[origin.manufacturer_number]=X01234
filter[designable_production_methods]?string

List products for a specified design method:

  • /products?filter[designable_production_methods]=direct-to-film
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 which methods design can be done on this product.

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

Request example
curl -X GET "https://example.com/products?filter%5Bid%5D=1%2C2%2C3&filter%5Btitle%5D=qui&filter%5Bvariants.origin.sku%5D=58975&filter%5Borigin.manufacturer_number%5D=X01234&filter%5Bdesignable_production_methods%5D=direct-to-film&expand=variants" \  -H "Accept: application/json"

GET /products HTTP/1.1

{  "data": [    {      "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      ]    },    {      "is_test": false,      "id": 30,      "title": "ut",      "description": "Et voluptatem quas neque praesentium qui harum. Ea occaecati perferendis inventore tempore nemo. Nobis perferendis voluptas sed tempore at.",      "created_at": "2017-11-15T08:07:51+00:00",      "updated_at": "2017-11-15T08:07:51+00:00",      "designable_production_methods": [],      "variants": [        37,        38,        39      ]    }  ],  "links": {    "first": "https://api.smake.io/v2/products?page=1",    "last": null,    "prev": null,    "next": "https://api.smake.io/v2/products?page=2"  },  "meta": {    "current_page": 1,    "from": 1,    "path": "https://api.smake.io/v2/products",    "per_page": 25,    "to": 25  }}