You will receive notifications via a webhook whenever there are new events associated with a product. All webhooks related to connections have a type of PRODUCT and a code with the specific type of event which occurred.

PRODUCT_UPDATED

Fired after a product has been updated.

{
 "type": "PRODUCT",
 "code": "PRODUCT_UPDATED",
 "access_token": "313c3e00-2bbc-4b2e-a9dc-13abed546b65",
 "product": {
    // ... Updated product object 
 }
}

PRODUCT_CREATED

Fired after a product has been created.

{
 "type": "PRODUCT",
 "code": "PRODUCT_CREATED",
 "access_token": "313c3e00-2bbc-4b2e-a9dc-13abed546b65",
 "product": {
    // ... New product object 
 }
}

PRODUCT_DELETED

Fired after a product has been deleted.

{
 "type": "PRODUCT",
 "code": "PRODUCT_DELETED",
 "access_token": "313c3e00-2bbc-4b2e-a9dc-13abed546b65",
 "product": {
   "id": "60fde312-0a7e-4bda-b838-3aa19a5c57e4"
 }
}

PRODUCT_READY

In platforms where POST /product is a long running job (specifically Amazon), a job ID will be returned as a response. A PRODUCT_READY webhook will be fired when the job has completed. A product object will be returned on POST /product success, and an error message will be returned on failure.

{
  "type": "PRODUCT",
  "code": "PRODUCT_READY",
  "job_id": "fc7e5f82-b6f3-4ad7-94d9-f00f9c864fa9",
  "access_token": "313c3e00-2bbc-4b2e-a9dc-13abed546b65",
  "product": {
        "id": "60fde312-0a7e-4bda-b838-3aa19a5c57e4",
  },
  "error": null
}

PRODUCT_FINISH_FAILED

In the platforms where image upload and/or variant create run asynchronously after the initial POST /products request, we will send an error message in case variant create or image upload fails. In the case of success, we will send a PRODUCT_UPDATE webhook.

{
  "type": "PRODUCT",
  "code": "PRODUCT_FINISH_FAILED",
  "job_id": "fc7e5f82-b6f3-4ad7-94d9-f00f9c864fa9",
  "connection_id": "313c3e00-2bbc-4b2e-a9dc-13abed546b65",
  "productRequestBody": {
    // Original product request body sent in POST /products
  },
  "access_token": "313c3e00-2bbc-4b2e-a9dc-13abed546b65",
  "existingProductId": "60fde312-0a7e-4bda-b838-3aa19a5c57e4",
  "error_message": "Something went wrong. Contact [email protected] for information."
}