Retrieve a product

This endpoint returns the complete product for the authenticated tenant, resolving either a MongoDB _id or a SKU. This page also covers two related endpoints scoped to a single product: similar products by embeddings, and the variant/option summary.

Use it when you need to:

  • Show a product's full detail page in your application.
  • Pull inventory per variant and location without an extra call (extend=inventory).
  • Suggest related products on a detail page.
  • Get only a product's variant/option structure without fetching the rest of its fields.

Gets a product by its ID or its SKU

200Product found
{
  "id": "65f3a1b2c4d5e6f7a8b9c0e1",
  "sku": "CAM-ROJO-M",
  "status": "active",
  "productType": "physical",
  "title": { "value": "Camisa Roja Talla M", "translations": [] },
  "description": { "value": "Camisa de algodón 100%, corte regular.", "translations": [] },
  "price": 499.00,
  "compareAtPrice": 599.00,
  "currency": "MXN",
  "taxable": true,
  "brand": "Fenicia Basics",
  "tags": ["playeras", "temporada-verano"],
  "media": [
    {
      "id": "m1",
      "src": "https://cdn.fenicia.io/img/cam-rojo-m.jpg",
      "type": "image",
      "position": 0,
      "alt": { "value": "Camisa roja talla M", "translations": [] }
    }
  ],
  "variants": [
    {
      "id": "65f3a1b2c4d5e6f7a8b9c0f1",
      "sku": "CAM-ROJO-M-CH",
      "parentSku": "CAM-ROJO-M",
      "title": { "value": "Camisa Roja - Chica" },
      "price": 499.00,
      "position": 0,
      "taxable": true,
      "options": [{ "id": "opt-talla", "name": "Talla", "value": "CH" }],
      "bindings": []
    }
  ],
  "options": [],
  "attributes": [],
  "bindings": [],
  "seo": { "metaTitle": "Camisa Roja Talla M", "metaDescription": "Camisa de algodón para hombre.", "slug": "camisa-roja-talla-m" },
  "minAlertStock": 5,
  "sellIfOutOfStock": false
}
404No product resolves that ID or SKU in your tenant
{ "code": "not-found", "message": "Product not found" }

Returns the complete Product object at the root of the JSON, with no data envelope.

Required permission: products:read

Parameters

idstringrequired

MongoDB `_id` (24 hexadecimal characters) or the product SKU. The endpoint auto-detects which one you sent: if the value is a valid ObjectId it resolves by `_id`, otherwise by SKU.

extendstring

Comma-separated list that turns on additional data. Values this endpoint recognizes: inventory, all — and only those two. Any other value (variants, options, seo, description, bindings, metadata, dimensions) is accepted without error but does NOT change the response: product fields already come back in full by default.

`extend` only recognizes `inventory` and `all`

The handler evaluates extend with a single test —/\b(inventory|all)\b/— and uses it to pick between two reads: with inventory or without. No other value has any effect. Sending extend=seo neither errors nor adds anything; the response is identical to omitting extend. If you expected extend to trim the response, it does not: the product always comes back complete.

`extend=inventory` attaches real stock per variant and location

A variant's stock does not live in the product document: it is resolved by joining against the inventory collection. Without inventory (or all) in extend, the stock field simply does not appear in the response.

Flat response, no `data` envelope

Unlike the Orders domain, this endpoint returns the Product object directly at the root of the JSON — not wrapped in { "data": … }. The same applies to its errors: they are flat { "code": …, "message": … }.

Tenant isolation

You can only retrieve products from your own tenant. A product belonging to another tenant returns 404, never cross-tenant information.

Tip

For the product's complete data model (all fields and the price, cost, media and binding sub-shapes), see the product data model.

Examples

curl "https://api.fenicia.io/products/CAM-ROJO-M?extend=inventory" \
  -H "Authorization: Bearer fkapi_your_api_key"

Suggests similar products using semantic embeddings

200Similar products ordered by score
{
  "products": [
    {
      "_id": "65f3a1b2c4d5e6f7a8b9c0e2",
      "sku": "CAM-AZUL-M",
      "title": { "value": "Camisa Azul Talla M" },
      "price": 499.00,
      "compareAtPrice": 599.00,
      "currency": "MXN",
      "brand": "Fenicia Basics",
      "media": [],
      "status": "active",
      "score": 0.87,
      "matchType": "combined"
    }
  ],
  "count": 1,
  "sourceSku": "CAM-ROJO-M"
}
404The reference SKU does not exist in your tenant
{ "code": "not-found", "message": "Product not found: CAM-ROJO-M" }

Returns the products array of similar products (each with its score and matchType), the result count, and the sourceSku that was queried.

Required permission: products:read

Parameters

skustringrequired

SKU of the reference product.

limitnumber

Number of results. Default: 10. The value is capped at 50: asking for more does not return more.

inStockboolean

Only takes effect with the exact value `true`; any other value is equivalent to `false`. With `true`, products without available stock are excluded from the result.

Fields of each suggested product

_idstring

ID of the suggested product. Note the underscore: this endpoint returns `_id`, not `id`.

skustring

SKU of the suggested product.

titleobject

Translatable product title.

title.valuestringrequired

Title text in the base language.

title.translationsarray

Title translations. Default: empty array.

title.translations.localestringrequired

Language code of the translation.

title.translations.valuestringrequired

Translated text.

pricenumber

Base price of the suggested product.

compareAtPricenumber

Compare-at price, if the product has one.

currencystring

Price currency, in ISO 4217.

brandstring

Product brand, if captured.

mediaarray

Media array of the suggested product, with the same shape as on the full product.

media.idstringrequired

Identifier of the media entry within the product.

media.srcstringrequired

File URL. Validated against `^https?://.+`: a relative path is rejected.

media.namestringrequired

File name.

media.typestring

Nature of the file. Accepted values: image, video, audio, document. Default: image.

media.sizenumber

File size. Accepts a number or a string; any other type is rejected.

media.positionnumberrequired

Order of the entry within the gallery. Integer greater than or equal to 0.

media.altobjectrequired

Translatable alt text for the image.

media.alt.valuestringrequired

Alt text in the base language.

media.alt.translationsarray

Alt-text translations. Default: empty array.

media.alt.translations.localestringrequired

Language code of the translation.

media.alt.translations.valuestringrequired

Translated text.

media.bindingsarray

Publications of this specific media item on channels.

media.bindings.idstringrequired

Binding identifier.

media.bindings.channelIdstringrequired

Channel the media was published to.

media.bindings.handlestringrequired

Identifier of the media on that channel.

statusstring

Status of the suggested product. Accepted values: draft, active, disabled.

scorenumber

Similarity score, already weighted. Text weighs 0.7 and image 0.3, so the theoretical maximum for a match through a single channel is that weight, not 1.

matchTypestring

Which channel matched. Accepted values: text (text embedding only), image (image embedding only), combined (both, with their scores added).

inventoryobject

Stock for the suggested product, present only when the query resolved it.

inventory.availablenumber

Available units.

inventory.locationIdstring

Location the stock corresponds to.

Similarity threshold fixed at 0.3

The search discards anything below minScore: 0.3, even if it belongs to the same category or brand. That threshold is fixed: it cannot be tuned via a parameter. A product with no computed embeddings falls back to an attribute-based search.

The `404` is decided by the TEXT of the internal error

The handler returns 404 when the internal exception message contains the substring not found. In practice that covers the real case —the sourceSku does not exist— but it means the error classification depends on a text string, not a type. Any other failure returns 500.

Variant and option summary

Returns only a product's variant and option structure, without the rest of its fields

200The product's variant and option structure
{
  "sku": "CAM-ROJO-M",
  "variants": [
    {
      "id": "65f3a1b2c4d5e6f7a8b9c0f1",
      "sku": "CAM-ROJO-M-CH",
      "title": { "value": "Camisa Roja - Chica" },
      "price": 499.00,
      "position": 0,
      "options": [{ "id": "opt-talla", "name": "Talla", "value": "CH" }]
    }
  ],
  "options": [{ "id": "opt-talla", "name": "Talla", "values": ["CH", "M", "G"] }],
  "hasVariants": true,
  "hasOptions": true
}
404No product with that SKU exists in your tenant
{ "code": "not-found", "message": "Product CAM-ROJO-M not found" }

Returns the queried sku, the variants and options arrays, and the hasVariants and hasOptions booleans.

Required permission: products:read

Parameters

skustringrequired

SKU of the parent product. It also accepts an `_id`: identifier resolution is the same as in `GET /products/{id}`.

`variants` and `options` are never `null`

When the product has no variants or options, the endpoint returns empty arrays ([]), not null. The hasVariants/hasOptions booleans are the direct way to tell "no variants" apart without inspecting length.

This same endpoint is also documented in Variants and media, alongside the only write endpoint for existing variants.

Next steps