Webhooks

Objective

A Webhook is a user-defined callback (HTTP POST) triggered by an event.

  • Instead of polling the API, users will receive a notification to a specified URL containing a small payload with information they can then use to make a call to the Seller Center API.
  • This will reduce load and improve the performance for third party applications since the API will only be called when new information is available.
  • Webhooks are accessible via API (CreateWebhook, DeleteWebhook, ListWebhook) and via GUI.
    Critical Knowledge

    • To display the API Explorer, Product API Examples, and Webhooks UI, a setting needs to be enabled in Seller Management.
      • This has to be set for each Seller individually.
    • This Seller-level setting has no impact on the functionality of Webhooks.
      • It solely covers the visibility of the UI component.
    • Using Webhooks requires development by the third party applications. This is not covered in this document.
    • Users need to be integrated with the existing Seller Center API.


    Enabling Webhooks UI for a Seller

    • Webhooks are always available for API users. This description is only relevant for the UI administration.
      Step Description
      1 Go to Administration > Seller Management and select the Seller for whom you want to activate the UI for API Explorer, Product API Examples, and Webhooks by selecting “Edit” in the action column.
      2

      Scroll to “Integration Management” and set “Enable Integration Management” to “Yes”

      The User Interface is now available.

    Setting up Webhooks Through the UI

    • There is a Seller-level setting to activate API Explorer + Product API Examples + Webhooks together and make the GUI visible for the user.
    • When the feature is activated, users can create, edit, or remove Webhooks through the UI or by using the Webhooks API, which is documented here: https://sellerapi.sellercenter.net/docs
    Step Description Image
    1 Go to Settings > Integration Management Screen Shot 2016-06-23 at 10.40.22
    2 The UI allows you to create new Webhooks, edit existing Webhooks, and monitor the related callback logs. Screen Shot 2016-06-23 at 10.43.02
     3 To create a new Webhook, select “Add Webhook” Screen Shot 2016-06-23 at 10.44.06
    4 Specify the URL to which you would like to receive your callbacks. Screen Shot 2016-06-23 at 10.44.29
    5 Select which entities you want to subscribe to to receive notifications when selected events occur.

    • Selecting only the entity means subscribing to all of its events.
    • Submit the form.
    Screen Shot 2016-06-23 at 10.44.50

    • The following events are currently covered by Webhooks:
      • Feed: Created, Completed
      • Order: Created, StatusChanged, ReturnStatusChanged
      • Metrics: Updated
      • Statistics: Updated
      • Product: Created, Updated, QCStatus
    • Important events currently not covered:
      • Changes invoked by changes to master templates
      • Product deletion or un-deletion

    Retries of callbacks

    • Seller Center will retry the callback of the webhook event in case the seller based system was not reachable for any reason
    • It will delay the next execution of the callback by some minutes to give the other system time to recover
      Retry Minutes Additional Delay in Minutes Total Delay in Minutes
      #1 1 00:00:01 00:00:01
      #2 5 00:00:05 00:00:06
      #3 10 00:00:10 00:00:16
      #4 30 00:00:30 00:00:46
      #5 60 00:01:00 00:01:46
      #6 120 00:02:00 00:03:46
      #7 300 00:05:00 00:08:46
      #8 600 00:10:00 00:18:46
      #9 1440 01:00:00 01:18:46
      #10 1440 01:00:00 02:18:46
      #11 1440 01:00:00 03:18:46
      #12 1440 01:00:00 04:18:46
      #13 1440 01:00:00 05:18:46
      #14 1440 01:00:00 06:18:46
      #15 1440 01:00:00 07:18:46
      #16 1440
    • Seller Center will continue to execute the callback until 30 days have passed
    • Afterwards the callback is deleted from the Seller Center system even when it never succeeded and will not be retried afterwards