Skip to content

Sync a channel now

POST
/api/v1/commerce/channels/{channel}/sync
curl --request POST \
--url https://digize.com/api/v1/commerce/channels/meta/sync \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>'

Sends what changed in the catalog to Meta or TikTok and reads back what the channel made of it, unless a sync is running.

Needs the commerce:write permission.

channel
required

meta for Facebook and Instagram, tiktok for TikTok.

string
Allowed values: meta tiktok
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69

Done

Media typeapplication/json
object
channel
required
string
Allowed values: meta tiktok
available
required

Whether this server has the channel’s app, so it can connect.

boolean
connected
required
boolean
allowed
required

Connected with the permissions catalogs need.

boolean
catalog
required
Any of:
object
businessId
required
string
businessName
required
string
catalogId
required
string
catalogName
required
string
currency
required
string | null
storefront
required

The storefront address products link to; empty until set.

string
products
required
object
listed
required
number
sent
required

Sent, waiting for the channel’s word.

number
accepted
required
number
refused
required
number
sync
required
object
running
required
boolean
startedAt
required
Any of:
string format: date-time
finishedAt
required
Any of:
string format: date-time
error
required
string | null
checkedAt
required
Any of:
string format: date-time
refusals
required
Array<object>
object
variantId
required
string
productId
required
string
name
required
string
error
required
string

Example

{
"channel": "meta"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}