Publish the selected products and sync the connection
POST
/api/v1/workspaces/{workspaceId}/channel-connections/{connectionId}/sync
const url = 'https://api.crossmart.io/api/v1/workspaces/example/channel-connections/example/sync';const options = {method: 'POST'};
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/channel-connections/example/syncQueues every selected product to be published (or updated when the channel has it) and every listing that is no longer selected to be delisted. Jobs run in the background; follow them in the listings. Refused (402) before anything is queued when the plan has no room for the active listings it would add.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspaceId
required
string
connectionId
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
queued
required
Selected products queued to be published or updated
number
delisting
required
Listings queued to be delisted, as they are no longer selected
number
Example generated
{ "queued": 1, "delisting": 1}The organization’s plan does not allow this (ENTITLEMENTS_ENFORCED is on). code and feature say why; upgrading the plan resolves it.
Media typeapplication/json
object
statusCode
required
number
error
required
string
code
required
string
message
required
string
feature
required
string
plan
required
The code of the organization’s plan
string
limit
required
Null is unlimited
number
usage
required
number
requested
required
How many more the request asked for
number
Example
{ "statusCode": 402, "error": "Payment Required", "code": "plan_limit_reached", "message": "The Free plan includes 2 connected channels, and 2 are in use. Upgrade the plan to add more.", "feature": "active_listings", "plan": "free"}