Check garment compatibility
const url = 'https://example.com/v1/compatibility/check';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"product_garment_category_public_id":"example","candidate_complementary_image_public_ids":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/compatibility/check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "product_garment_category_public_id": "example", "candidate_complementary_image_public_ids": [ "example" ] }'Evaluate candidate complementary garments against a product category.
Unknown candidate image ids come back as per-candidate
catalog_ref_missing verdicts inside the 200; an unknown product
category is a 404 RESOURCE_NOT_FOUND.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”POST /v1/compatibility/check body.
The product side is a garment category public_id; the candidate side
is a list of complementary-garment catalog image public_ids (what the
wizard’s picker holds — each is resolved to its category server-side).
object
ULID public_id of the product’s garment category.
Complementary-garment catalog image public_ids to evaluate.
Example generated
{ "product_garment_category_public_id": "example", "candidate_complementary_image_public_ids": [ "example" ]}Responses
Section titled “ Responses ”Successful Response
POST /v1/compatibility/check response — one verdict per candidate, in request order.
object
The product garment category (echoed).
Per-candidate verdicts, in request order.
The per-candidate verdict of a compatibility check.
object
The candidate’s catalog image public_id (echoed).
Whether the candidate may appear with the product garment.
Structured reasons for the verdict.
One structured reason inside a candidate verdict.
object
Structured compatibility code (or catalog_ref_missing).
Human-readable explanation of the code.
Example generated
{ "product_garment_category_public_id": "example", "results": [ { "public_id": "example", "compatible": true, "reasons": [ { "code": "example", "message": "example" } ] } ]}Validation Error
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}