emfasemfas
Filtering

Attribute selection

Limit the attributes returned by product, variant, and SKU endpoints

Product, variant, and SKU list and detail endpoints return all attributes by default. Use attributes and exclude_attributes to reduce the response to the attributes a client needs.

Both parameters accept comma-separated, fully-qualified attribute keys. A selector can be an exact key such as product.description, or a prefix ending in * such as sku.price_*. Other wildcard positions and regular expressions are not supported.

curl "https://api.emfas.ai/v1/products?attributes=product.description,product.price_*" \
  -H "Authorization: Bearer YOUR_API_KEY"

Excluding attributes

Use exclude_attributes when most attributes are useful and only a group should be omitted:

curl "https://api.emfas.ai/v1/products?exclude_attributes=product.price_*" \
  -H "Authorization: Bearer YOUR_API_KEY"

The exclusion is applied after attributes, so exclusion wins when the same attribute matches both parameters.

curl "https://api.emfas.ai/v1/products?attributes=product.*&exclude_attributes=product.price_*" \
  -H "Authorization: Bearer YOUR_API_KEY"

An explicitly empty attributes= selects no attributes. Omitting attributes keeps the default of returning all attributes.

Entity levels and included resources

Selectors use the entity level where the attribute is defined: product.*, variant.*, or sku.*. This also applies to inherited attributes on variant and SKU responses and to variants or SKUs embedded with the include parameter.

When include=metaobjects is used, only metaobjects referenced by attributes that survive selection are sideloaded. The sideloaded metaobject itself is returned in full.