Accessing the webhooks defined and available on your marketplace
All your webhooks are available via the resource:
GET /marketplaces/{marketplace}/webhooks
The resource returns:
- The list of webhooks currently defined on the marketplace
- And the list of available but unused webhooks
Note: this list will get longer along with the development of the Marketplace API
Example:
Request
GET https://secure.lyra.com/marketplace/marketplaces/6f6b04c2-0e99-4f8d-b710-8856f5654bb8/webhooks
Response
[ { "event_type":"order", "target":"https://mymarketplace.com/mkp/webhooks/order.php" }, { "event_type":"token", "target":"https://mymarketplace.com/mkp/webhooks/order.php" }, { "event_type":"refund", "target":null }, { "event_type":"registration", "target":null } ]
This response indicates that only one webhook address is used for two objects, order and token, but that the webhooks for the refund and registration objects are not specified, and are therefore inactive.