Import the connected channel’s catalog
const url = 'https://api.crossmart.io/api/v1/workspaces/example/channel-connections/example/imports';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/importsQueues an import of every product of the channel account. Products already linked to it are refreshed, products that match the catalog by handle or SKU are linked, and the rest are created with their stock. Returns the import history entry; poll it with GET /import-jobs/{jobId} to follow the progress. While an import of the connection runs, this returns that import instead of starting another. 409 when the connection is not connected.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
The file name, or the channel account a channel import read
The channel connection a channel import reads; null for file imports
Records the source holds, when it reports them, to show progress
Products for create and update imports; stock rows for inventory imports
object
Channel products linked to catalog products they matched; zero for file imports
Products replaced by an update import, variants whose stock an inventory import set, or products a channel import found already linked
Why the whole file was rejected
object
The user who sent the file; null for API keys and deleted users
The API key that sent the file, if one did
Skipped and failed records, in file order
object
Spreadsheet row number; the header is row 1
Example
{ "mode": "create", "format": "shopify_csv", "status": "PROCESSING", "issues": [ { "code": "already_exists", "outcome": "SKIPPED" } ]}