List and search your entities. This playground calls the live API with your account credentials.
Retrieve a paginated list of entities for the active brand, optionally filtered and sorted.
This endpoint returns the entities (products) of your active brand using a declarative filter and sort tree. Each entity exposes its core fields plus a normalised attributes array that merges synthetic fields (title, description, brand, category, family) with the brand's global and family attributes.
The same logic is available through two methods: a simple GET with query string parameters, or a POST to /entities/query where the same parameters are sent as a JSON body. In the body, filters, sort and projection are native JSON instead of JSON-encoded strings. Prefer POST /entities/query for large filter trees (for example an in condition with hundreds of codes, which would overflow the maximum URL length) and to apply a saved view.
brand_id to override it.
GET https://api.commerceclarity.com/api/2026-05/entitiesPOST https://api.commerceclarity.com/api/2026-05/entities/query
| Parameter | Type | Required | Description |
|---|---|---|---|
filters |
object | Optional | Declarative filter tree of groups ({ "operator": "and"|"or", "conditions": [...] }) and conditions ({ "field": ..., "op": ..., "value": ... }). As a query param it must be a JSON-encoded string; in the POST body it can be a JSON object. See Building filters below. |
sort |
array | Optional | Sort spec: [{ "field": "...", "dir": "asc"|"desc" }]. field is a standard field or attr.<norm_name>; dir defaults to asc. As a query param it must be a JSON-encoded string. When omitted, results are ordered by created_at descending. |
page |
integer | Optional | 1-based page number. Default 1. |
per_page |
integer | Optional | Page size. One of 10, 25, 50, 100. Default 50; any other value falls back to 50. |
only_updated_attributes |
boolean | Optional | When true, each entity's attribute arrays are trimmed to entries whose own updated_at satisfies the updated_at conditions in the filter tree. |
only_with_value |
boolean | Optional | When true, attributes whose value is null, empty string or empty array are removed from the response. |
projection |
array | Optional | Ordered list of attribute norm_names. Each entity's attributes array then contains only these attributes, in this order. See Projection. |
attribute_dependency |
string | Optional | norm_name, attribute_id or _id of a blocking attribute in the brand's attribute dependency rules. Each entity then returns only the attributes that the matching rule allows for its value of the blocking attribute. |
brand_id |
string | Optional | Override the active brand for this request. The caller must be a member of that brand. |
The filters value is a recursive tree built from two kinds of nodes that can be freely nested:
{ "operator": "and" | "or", "conditions": [ ... ] }. Combines its child nodes with boolean AND / OR.{ "field": "...", "op": "...", "value": ... }. A single test on one field.A group's conditions array may contain conditions, other groups, or a mix — so you can express arbitrarily nested AND/OR logic.
Standard fields (top-level entity fields):
code, status, publication_state,
brand_id, channel_id, family_id, country,
product_id, inventory_tags, created_at, updated_at.
product_id is the entity's own _id. It lets a filter tree subtract entities: { "field": "product_id", "op": "not in", "value": ["…"] } means "everything matching, except these".
Attribute fields — prefix the attribute's norm_name with attr. (e.g. attr.colore, attr.peso). Synthetic cc_* attributes are supported too: attr.cc_title, attr.cc_category, attr.cc_brand, … The available norm_name values come from the List attributes endpoint. Use the norm_name, not the display name: attr.Colore targets an attribute that doesn't exist and matches nothing, without raising an error.
op)| op | Meaning | value |
|---|---|---|
is | Exact match. | scalar |
is not | Not equal. | scalar |
is empty | Field has no value. | omit |
is not empty | Field has any value. | omit |
contains | Substring match (case-insensitive, multi-word supported). | string |
in | Matches any value in the list. | array |
not in | Matches none of the values in the list. | array |
greater than | Numeric greater-than. | number |
less than | Numeric less-than. | number |
between | Inclusive numeric range. | [min, max] |
is after | Date/number strictly after. | date or number |
is before | Date/number strictly before. | date or number |
between expects a two-element [min, max] array;
in / not in expect an array;
is empty / is not empty take no value;
booleans accept true / false (or the strings "true" / "false");
dates accept ISO strings (e.g. "2026-01-01"). Filtering and sorting run on the search index, so an attribute must be indexed for the brand to be filterable.
Only the top-level shape of filters is validated (it must be a group with operator and conditions). Inside the tree, a condition the server can't turn into a query is dropped, not rejected:
field or op;op that isn't in the table above;A dropped condition is simply left out, so it widens the result: a tree whose conditions are all dropped returns the whole catalogue. An empty conditions array also means "no filter". Check the operator spelling (is not empty, greater than, …) when a filter seems to have no effect.
An unknown field is not dropped: it is queried as is and matches no entity for positive operators (is, in, …) and every entity for negative ones (is not, not in, is empty). The bulk endpoints (delete, publication state, tags) are stricter and refuse a filter with any dropped condition.
{
"operator": "and",
"conditions": [
{ "field": "publication_state", "op": "is", "value": "online" }
]
}{
"operator": "and",
"conditions": [
{ "field": "attr.colore", "op": "in", "value": ["rosso", "blu"] },
{ "field": "attr.peso", "op": "between", "value": [10, 25] }
]
}{
"operator": "and",
"conditions": [
{ "field": "publication_state", "op": "is", "value": "online" },
{
"operator": "or",
"conditions": [
{ "field": "attr.cc_title", "op": "contains", "value": "pro" },
{ "field": "attr.cc_category", "op": "is empty" }
]
}
]
}{
"operator": "and",
"conditions": [
{ "field": "updated_at", "op": "is after", "value": "2026-01-01" }
]
}By default every entity returns its full attributes array. Pass projection, a list of attribute norm_names, to get only those attributes, in the exact order given.
norm_name the entity doesn't have is skipped, with no error and no placeholder.code, sku, pictures, …) are always returned; projection only filters attributes.only_with_value.[]) returns entities with no attributes. Omit the parameter to get every attribute.{
"projection": ["cc_title", "cc_brand", "colore"]
}In a GET request, send it as a JSON-encoded string (?projection=["cc_title","cc_brand"]) or as a repeated projection[] parameter.
A saved view of the entities grid stores its filters, sort and columns in a definition that already has the shape this endpoint takes. There is no view_id parameter: to get a view's entities, read the view with GET /api/2026-05/entities/views/{id} and send its definition to POST /api/2026-05/entities/query.
| View field | Query parameter | How |
|---|---|---|
definition.filters | filters | Pass as is. Omit it when it is null. |
definition.sort | sort | Pass as is. |
definition.columns | projection | Keep the entries with visible: true, sort them by order, and send their colIds. Omit it when no column is visible. |
A colId can also be a top-level field (code, sku, …): projection skips it without error, and top-level fields are returned anyway. A view can also reference attributes deleted after it was saved; nothing here raises an error for them, so drop them on your side by comparing against List attributes, as the grid does.
curl -X POST "https://api.commerceclarity.com/api/2026-05/entities/query" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"page": 1,
"per_page": 50,
"only_with_value": true,
"filters": {
"operator": "and",
"conditions": [
{ "field": "publication_state", "op": "is", "value": "online" }
]
},
"sort": [{ "field": "updated_at", "dir": "desc" }]
}'
$client = new \GuzzleHttp\Client();
$response = $client->post('https://api.commerceclarity.com/api/2026-05/entities/query', [
'headers' => [
'Authorization' => 'Bearer ' . $apiToken,
'Accept' => 'application/json',
],
'json' => [
'page' => 1,
'per_page' => 50,
'only_with_value' => true,
'filters' => [
'operator' => 'and',
'conditions' => [
['field' => 'publication_state', 'op' => 'is', 'value' => 'online'],
],
],
'sort' => [['field' => 'updated_at', 'dir' => 'desc']],
],
]);
$data = json_decode($response->getBody(), true);
const response = await fetch('https://api.commerceclarity.com/api/2026-05/entities/query', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiToken}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
page: 1,
per_page: 50,
only_with_value: true,
filters: {
operator: 'and',
conditions: [
{ field: 'publication_state', op: 'is', value: 'online' }
]
},
sort: [{ field: 'updated_at', dir: 'desc' }]
})
});
const data = await response.json();
{
"status": "success",
"results": {
"data": [
{
"_id": "507f1f77bcf86cd799439011",
"code": "8001234567890",
"sku": "CUSTOM-SKU-123",
"status": "completed",
"publication_state": "online",
"validation_messages": [],
"pictures": [
"https://media.commerceclarity.com/media/.../image.jpg"
],
"pictures_updated_at": "2026-01-15T10:30:00.000000Z",
"country": "it",
"tags": ["tag1", "tag2"],
"attributes": [
{ "id": null, "norm_name": "cc_title", "name": "cc_title", "type": "text", "value": "Product Name", "updated_at": null },
{ "id": null, "norm_name": "cc_category", "name": "cc_category", "type": "single-select", "value": [{ "option": "Home > Appliances", "option_id": "619" }], "updated_at": null },
{ "id": "color", "norm_name": "color", "name": "Color", "type": "multi-select", "value": [{ "option": "Black", "option_id": null }], "updated_at": "2026-01-15T10:30:00.000000Z" }
],
"created_at": "2026-01-15T10:30:00.000000Z",
"updated_at": "2026-01-15T10:30:00.000000Z"
}
],
"total": 500,
"current_page": 1,
"per_page": 50,
"last_page": 10,
"from": 1,
"to": 50
}
}
results holds the page of entities in results.data[] plus the pagination fields total, current_page, per_page, last_page, from and to (from / to are null when nothing matches). Each entity in results.data[] contains the following fields:
| Field | Type | Description |
|---|---|---|
_id | string | MongoDB entity identifier. |
code | string | Product code (e.g. EAN/GTIN). |
sku | string|null | Customer SKU. |
status | string|null | Processing status of the entity. |
publication_state | string | One of pending_review, ready, online. |
validation_messages | array|null | Validation warnings/errors for the entity. |
pictures | array | Ordered list of image URLs. |
pictures_updated_at | string|null | Timestamp of the last picture change. |
country | string | Country/locale of the entity. |
tags | array|null | Free-form tags of the entity. |
attributes | array | Normalised attribute list (see below). |
attributes[].id | string|null | Attribute id; null for synthetic cc_* fields. |
attributes[].norm_name | string | Normalised name — the key used when updating the attribute. |
attributes[].name | string | Human-readable attribute name. |
attributes[].type | string | text, rich-text, number, boolean, single-select, multi-select. |
attributes[].value | mixed | Value, shaped by type (string, number, boolean, or option objects). |
created_at / updated_at | string | Entity timestamps. |
cc_ (cc_title, cc_description, cc_short_description, cc_brand, cc_category, cc_family) are derived from core entity fields and always returned alongside the brand's real attributes.
Validation errors return 422 with { "status": "error", "message": "..." }:
| Trigger | Message |
|---|---|
filters is not valid JSON | Invalid JSON in "filters" parameter: ... |
filters is not a JSON object | The "filters" parameter must be a JSON object. |
filters missing operator or conditions | The "filters" object must have "operator" (and|or) and "conditions" (array) keys. |
filters.operator is not and or or | The "filters.operator" must be "and" or "or", got: "...". |
filters.conditions is not an array | The "filters.conditions" must be an array. |
sort is not valid JSON | Invalid JSON in "sort" parameter: ... |
sort is not a JSON array | The "sort" parameter must be a JSON array. |
A sort entry is missing field | sort[N] must be an object with at least a "field" key. |
sort[N].dir is not asc or desc | sort[N].dir must be "asc" or "desc", got: "...". |
projection is not valid JSON | Invalid JSON in "projection" parameter: ... |
projection is not a JSON array | The "projection" parameter must be a JSON array of attribute norm_name strings. |
A projection entry is not a string | Each entry in "projection" must be an attribute norm_name string. |
attribute_dependency set, but the brand has no dependency rules | No attribute dependencies configured for this brand. |
attribute_dependency matches no attribute of the brand | Attribute not found for "attribute_dependency": ... |
| The attribute isn't the blocking attribute of any rule | Attribute "..." is not configured as a blocking attribute in any dependency rule. |
Other errors:
403 — brand_id points at a brand the caller isn't a member of.404 — brand_id points at a brand that doesn't exist.503 — the search index is temporarily unavailable. Retry after a short delay.