Validate Variants
Checks a list of custom variant IDs for validation errors, such as an unfinished or missing design, and indicates for each one whether the errors can be repaired automatically.
AuthorizationBearer
Authorization
default In: header
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/variants/validate" \ -H "X-Api-Version: 2022-02-01" \ -H "Content-Type: application/json" \ -d '{ "variants": [ 345074, 345075, 345076, 345077 ] }'[ { "variant_id": 345074, "has_errors": false, "can_be_repaired": null, "errors": [] }, { "variant_id": 345075, "has_errors": false, "can_be_repaired": null, "errors": [] }, { "variant_id": 345076, "has_errors": false, "can_be_repaired": null, "errors": [] }, { "variant_id": 345077, "has_errors": false, "can_be_repaired": null, "errors": [] }]Design Variant POST
Designing a product variant is made possible by placing customizations (logos, texts or additional instructions) on the corresponding view (e. g. front or back), or by adopting the design from another variant of the same product. Send the design as described in the request body below. **Background processing** When you design a product variant, this happens asynchronously. You can use [Polling](/docs/checkout/2022-02-01/basic/polling) or [Webhooks](/docs/checkout/2022-02-01/basic/webhooks) (`variant.completed` / `variant.failed`) for status updates. A new product variant is created implicitly. Therefore, you will already receive the new product variant `id` in the header for later reference. The current state of the asynchronous process is represented due the following states: | State | Meaning | |-------|---------| | `draft` | The initial state of a new variant | | `checking` | Variant is processed automatically in background. For example images will be generated or downloaded. | | `failed` | Something went wrong during the checking process. The reason can be found in the `failure_message` attribute. For example an image could not be downloaded. | | `completed` | All automatic processes were successful. The variant is ready to use. | It is not possible to order this product variant before state `completed`. **Response** The response is `202 Accepted` with the headers `Location` (e.g. `https://api.smake.io/jobs/1`) and `X-Identifier` (e.g. `137`). The `X-Identifier` is the new generated product variant `id` for later reference. **Further design examples** You can combine the usage of `id` and `url` on different models — see the request examples *Design with media id*, *Design with logo id*, *Design with logo id and resize logo*, *Design with media id and mockup with url* and *Adopt design from another variant*.
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 external identifier** — `/products?filter[variants.origin.external_identifier]=extern-123` - **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`