Fetch a single saved view by id. This playground calls the live API with your account credentials.
Retrieve a single saved view by id, and apply it to the entities query.
GET https://api.commerceclarity.com/api/2026-05/entities/views/{id}Returns a view the caller can see: one of their own, or any shared view in the brand. See Visibility and permissions.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Required | The view's _id. |
curl "https://api.commerceclarity.com/api/2026-05/entities/views/664f1a2b3c4d5e6f7a8b9c0d" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"status": "success",
"data": {
"_id": "664f1a2b3c4d5e6f7a8b9c0d",
"owner_email": "anna.rossi@example.com",
"name": "EU products missing weight",
"visibility": "shared",
"definition": {
"filters": { "operator": "and", "conditions": [{ "field": "attr.peso", "op": "is empty" }] },
"sort": [{ "field": "attr.cc_title", "dir": "asc" }],
"columns": [
{ "colId": "cc_title", "visible": true, "order": 0 },
{ "colId": "code", "visible": true, "order": 1 },
{ "colId": "peso", "visible": false, "order": 2 }
]
},
...
}
}The full field list is in The view object.
{
"status": "error",
"message": "View not found."
}Returned when the id doesn't exist, is another user's private view, or belongs to another brand.
There is no view_id parameter on the entities endpoints. To get a view's entities, fetch the view and send its definition to POST /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: an empty projection returns no attributes. |
# 1. Fetch the view
VIEW=$(curl -s "https://api.commerceclarity.com/api/2026-05/entities/views/664f1a2b3c4d5e6f7a8b9c0d" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json")
# 2. Build the query body from its definition
BODY=$(echo "$VIEW" | jq '.data.definition | {
filters,
sort,
projection: ([.columns[]? | select(.visible)] | sort_by(.order) | map(.colId)
| if length == 0 then null else . end)
} | with_entries(select(.value != null))')
# 3. Run it
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 "$BODY"
A colId that is a top-level field (code, sku, …) or a deleted attribute is skipped by projection without error. The same filters tree also works as the scope of the bulk endpoints (delete, publication state, tags), which is how you act on "everything in this view".