Product Webhook API

changelog

Summary

Product Webhook API is an event-based API that lets our partners be notified about all product changes events, including new products added to our repository, product changes (including price or stock changes) but also changes within partner's shop and collections.

It is an event-based API, meaning that all small changes will be sent out to the subscriber, upon which the subscriber can react accordingly to ie. invalidate your own cache, update the product prices that you keep in your system or reindex any third party searches/indices. This is a great way to keep your snapshot of Tipser's inventory up to date if combined with Export Feed API.

webhook subscription

In order to get subscribed to the Webhook API, reach out to the support team with your webhook URL and a list of events that you want to subscribe to. Our Webhook API is using a POST HTTP method, so be sure to use the proper method type.

As soon as the webhook URL you provided is up and running, the first message will be delivered which requires confirmation of the subscription.

The first message will look as follows:

X-Amz-Sns-Message-Type: SubscriptionConfirmation


{

"Type" : "SubscriptionConfirmation",

"MessageId" : "2bb5b9ba-2342-4ebd-b88c-a1feb1e21228",

"Token" : "<token>",

"TopicArn" : "...",

"Message" : "You have chosen to subscribe to the topic arn:aws:sns:eu-west-1:770937179823:webhooks-change-broker-elle-de-topic-dev.\nTo confirm the subscription, visit the SubscribeURL included in this message.",

"SubscribeURL" : "<subscribe_url>",

"Timestamp" : "2021-03-02T11:36:37.665Z",

"SignatureVersion" : "1",

"Signature" : "<signature>",

"SigningCertURL" : "<sig_cert>"

}

To confirm the subscription, as soon as the subscription event is received, you must callback the address at SubscribeURL field (simple GET request will do).

From now on the events will be delivered to your webhook listener. The request will look as follows:

X-Amz-Sns-Message-Type: Notification


{

"eventType": "collection-changed",

"data": {

"collectionId": "5f1a21f60d34b4140ce2f10c"

}

}

Events

product-CHANGED

Example payload:

{

"eventType": "product-changed",

"data": {

"productId": "5075bb2ae1d49107c08f3fc8"

}

}

The event will be called whenever the product price, stock, title has changed, but also when it got sold out or it got new variants added. It is also triggered when a new product is added to our inventory. If you subscribe to this one, expect a massive amount of events if you are subscribed to the whole market inventory without any filters.

product-in-collection-changed

It is triggered whenever a product in one of POS collection has been changed. It will trigger for all product changes, no matter if it's the price or the description. This event may be verbose.

Example payload:

{

"eventType": "product-in-collection-changed",

"data": {

"productId": "606c4b1d26581c1d2db4cae2",

"collectionsIds": [

"60891a59ba0deda86df46276",

"60891b40ba0deda86df46277"

]

}

}

Similarly to the product-changed event, it is triggered on exactly same circumstances but only if it is contained in one of POS collection.

pos-collections-changed

It is triggered when either a new collection has been added to the shop or removed from the shop of the POS.
Payload will contain snapshot of all the collection ids currently visible in shop.

Example payload:

{

"eventType": "pos-collections-changed",

"data": {

"posId": "5075bb2ae1d49107c08f3fc8",

"collectionsIds": [

"546dd6b4784155237472f73a",

"546dd8ad784155237472f77b",

"546dd9f0784155237472f7bc",

"553d0124784155080cc17bbd"

]

}

}

collection-changed

It is triggered whenever a visible collection of the POS has been changed (it's name or friendly url was modified). Private collections will not trigger that event.

Example payload:

{

"eventType": "collection-changed",

"data": {

"collectionId": "5075bb2ae1d49107c08f3fc8"

}

}

collection-added

It is triggered whenever a new collection has been added to POS' shop. Private collections will not trigger that event.

Example payload:

{

"eventType": "collection-added",

"data": {

"collectionId": "5075bb2ae1d49107c08f3fc8"

}

}

PRODUCT-CUSTOMIZATION-CHANGED

It is triggered when the product customization traits i.e. tags, description, title, image has changed.

Example payload:

{

"eventType": "product-customization-changed",

"data": {

"productCustomizationId": "6086bf492a4b7f5a8ded9663",

"productId": "60522cad085143fb93c0dd2b"

}

}