Overview

An event is a specific action within a system, such as updating price, generating a coupon code, or deleting a promotion. Through Webhooks, you can get automated, real-time notifications when an event is initiated. You can subscribe to one or more webhook events to receive event-specific information without making individual REST API calls. For example, if you subscribe to a price update event, you will be notified whenever a new price becomes active. This enables you to update your Product Description Page (PDP) promptly, ensuring your website reflects the latest prices accurately. Similarly, by subscribing to new promotions event, you are notified whenever a new promotion becomes active, enabling you to display the new promotion on your website as soon as the promotion is available. For using the event-driven notifications, you must subscribe to the relevant webhook events.

fabric Offer Events

You can subscribe to one or more Offers events in each of the following objects to get event-specific information in real-time:

For example, by subscribing to offers:price:created event, you can get notified whenever a new price is created for a specific item. If you want more information about an event, you can make an API call to the callBackUrl available in the sample response. The following is a sample cURL request to get an event-related information from a specific URL:

curl --location 'https://api-stg02.admin.offers.fabric.inc/v3/prices/1000072889?priceListId=100000' \\ Replace this URL with the event-specific callBackUrl
--header 'x-fabric-tenant-id: 64a86ebb0cf29efc89cd2d9d' \
--header 'x-fabric-channel-id: 12' \
--header 'x-fabric-source: copilot' \
--header 'x-fabric-request-id: 73068ccf-d359-4292-bbc9-6b31e865587b' \
--header 'x-fabric-stage: stg02' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJqbXE2bFNUTTZEZTRfcGhveTQ4eVFjb1dLLWFnLWo3RktVbkhaUG5vbmhRIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULm5KQ0tvMzRtNjFUUHZqU1NmeHN4VlB1allEMUdiZENfRjU5NGc0YU05b0UiLCJpc3MiOiJodHRwczovL2NvcGlsb3QubG9naW4tc2J4LmZhYnJpYy5pbmMvb2F1dGgyL2F1c29wYm85c3JPUndIY001Njk2IiwiYXVkIjoiYXBpOi8vc2VydmljZSIsInN1YiI6IjBvYTFqb2s0OGR6YWZLZEZsNjk3IiwiaWF0IjoxNjkzMzc5ODM2LCJleHAiOjE2OTMzODE2MzYsImNpZCI6IjBvYTFqb2s0OGR6YWZLZEZsN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