Save the current filters of the product list as a view
POST
/api/v1/workspaces/{workspaceId}/product-views
const url = 'https://api.crossmart.io/api/v1/workspaces/example/product-views';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","search":"example","status":"DRAFT","gap":"images"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.crossmart.io/api/v1/workspaces/example/product-views \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "search": "example", "status": "DRAFT", "gap": "images" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspaceId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Unique in the workspace
string
search
Matches title, handle or SKU
string
status
string
gap
string
Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string format: uuid
name
required
string
search
string
status
string
gap
string
createdAt
required
string format: date-time
Example
{ "status": "DRAFT", "gap": "images"}