Skip to content

The products a selection lists, with counts, saved or not

POST
/api/v1/workspaces/{workspaceId}/channel-connections/{connectionId}/product-selection/preview
curl --request POST \
--url 'https://api.crossmart.io/api/v1/workspaces/example/channel-connections/example/product-selection/preview?limit=25' \
--header 'Content-Type: application/json' \
--data '{ "rule": { "filter": { "search": "example", "status": "DRAFT", "gap": "images", "tags": [ "example" ], "vendor": "example" }, "includeProductIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "excludeProductIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] } }'
workspaceId
required
string
connectionId
required
string
cursor
string format: uuid

nextCursor from the previous page

limit
number
default: 25 >= 1 <= 100
Media typeapplication/json
object
rule
required

The selection; null lists every product

object
filter
required
object
search

Matches title, handle or SKU

string
status
string
Allowed values: DRAFT ACTIVE ARCHIVED
gap
string
Allowed values: images description sku barcode out_of_stock
tags

Products with any of these tags

Array<string>
vendor

Products of this vendor, ignoring case

string
includeProductIds
required
Array<string>
excludeProductIds
required
Array<string>
Media typeapplication/json
object
total
required

Products the selection lists

number
matchingFilter
required

Products the filter matches, before the manual lists

number
addedManually
required

Products added by hand that the filter does not match

number
removedManually
required

Products the filter matches that were removed by hand

number
items
required
Array<object>
object
id
required
string format: uuid
handle
required
string
title
required
string
status
required
string
Allowed values: DRAFT ACTIVE ARCHIVED
vendor
required
string
nullable
productType
required
string
nullable
variantCount
required
number
totalAvailable
required

Stock across variants that track it; null when none do

number
nullable
priceRange
required
object
min
required

Decimal string in the workspace currency

string
max
required
string
imageUrl
required
string
nullable
stores
required

The stores it is in, in the order it joined them

Array<object>
object
connectionId
required
string format: uuid
channel
required
string
Allowed values: shopify ebay google_merchant etsy amazon walmart
storeName
required
string
status
required
string
Allowed values: PENDING ACTIVE INACTIVE ERROR DELISTED
source
required
string
Allowed values: MANUAL IMPORT RULE
updatedAt
required
string format: date-time
nextCursor
required
string
nullable
toPublish
required

Products saving this rule publishes now

number
toRemove
required

Products saving this rule delists now

number

Example

{
"items": [
{
"status": "DRAFT",
"priceRange": {
"min": "22.00",
"max": "89.00"
},
"stores": [
{
"channel": "shopify",
"storeName": "Demo Store",
"status": "PENDING",
"source": "MANUAL"
}
]
}
]
}