Skip to content

Import the connected channel’s catalog

POST
/api/v1/workspaces/{workspaceId}/channel-connections/{connectionId}/imports
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/example/channel-connections/example/imports

Queues 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.

workspaceId
required
string
connectionId
required
string
Media typeapplication/json
object
id
required
string format: uuid
mode
required
string
Allowed values: create update inventory create_or_link
format
required
string
Allowed values: shopify_csv inventory_csv shopify_api
fileName
required

The file name, or the channel account a channel import read

string
connectionId
required

The channel connection a channel import reads; null for file imports

string format: uuid
nullable
totalCount
required

Records the source holds, when it reports them, to show progress

number
nullable
status
required
string
Allowed values: PROCESSING COMPLETED FAILED
counts
required

Products for create and update imports; stock rows for inventory imports

object
created
required
number
linked
required

Channel products linked to catalog products they matched; zero for file imports

number
updated
required

Products replaced by an update import, variants whose stock an inventory import set, or products a channel import found already linked

number
skipped
required
number
failed
required
number
errorMessage
required

Why the whole file was rejected

string
nullable
actor
required
object
userId
required
string format: uuid
nullable
userName
required

The user who sent the file; null for API keys and deleted users

string
nullable
apiKeyId
required
string format: uuid
nullable
apiKeyName
required

The API key that sent the file, if one did

string
nullable
createdAt
required
string format: date-time
finishedAt
required
string format: date-time
nullable
issues
required

Skipped and failed records, in file order

Array<object>
object
code
required
string
Allowed values: already_exists duplicate_sku invalid_value missing_value invalid_options not_found unknown_sku not_tracked duplicate_row unmatched_variant already_linked
message
required
string
handle
string
sku
string
row

Spreadsheet row number; the header is row 1

number
outcome
required
string
Allowed values: SKIPPED FAILED

Example

{
"mode": "create",
"format": "shopify_csv",
"status": "PROCESSING",
"issues": [
{
"code": "already_exists",
"outcome": "SKIPPED"
}
]
}