API Playground

Copy a view into a new private view of yours. This playground calls the live API and will create data.

Authentication Required

You need to Login to test the API playground

Duplicate view

Copy a view into a new private view owned by you.

Endpoint URL
POST https://api.commerceclarity.com/api/2026-05/entities/views/{id}/duplicate

The source can be any view the caller can see: their own (private or shared) or a teammate's shared view. The copy is always private and owned by the caller, whatever the source's visibility, and it goes to the end of the caller's private list. No request body.

The copy's name is generated by appending (n) with the lowest n that doesn't match a view the caller can see. If the source name already ends in (n), the counter goes up instead of nesting: duplicating Shoes gives Shoes (1), then Shoes (2); duplicating Shoes (2) gives Shoes (3).

Path Parameters

ParameterTypeRequiredDescription
idstringRequiredThe _id of the view to copy.

Request Examples

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

Response Example

Success Response — 201
{
  "status": "success",
  "data": {
    "_id": "665a1a2b3c4d5e6f7a8b9e12",
    "name": "EU products missing weight (1)",
    "visibility": "private",
    "definition": { ... },
    ...
  }
}
Error Response - Validation — 404
{
  "status": "error",
  "message": "View not found."
}

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