API Playground

Fetch a single saved view by id. This playground calls the live API with your account credentials.

Authentication Required

You need to Login to test the API playground

Get view

Retrieve a single saved view by id, and apply it to the entities query.

Endpoint URL
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.

Path Parameters

ParameterTypeRequiredDescription
idstringRequiredThe view's _id.

Request Examples

curl "https://api.commerceclarity.com/api/2026-05/entities/views/664f1a2b3c4d5e6f7a8b9c0d" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Response Example

Success Response
{
  "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.

Error Response - Validation — 404
{
  "status": "error",
  "message": "View not found."
}

Returned when the id doesn't exist, is another user's private view, or belongs to another brand.

Apply a view to the entities query

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 fieldQuery parameterHow
definition.filtersfiltersPass as is. Omit it when it is null.
definition.sortsortPass as is.
definition.columnsprojectionKeep 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.
cURL + jq
# 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".