logo

Webhooks

This page is currently under construction 🚧
You can subscribe and manage webhooks in the settings section in the admin portal.
Webhook messages can be used to trigger workflows that you might want to run as part of the basta integration. An example of a workflow is sending an email confirmation when a “BidOnItem” webhook is received.

Webhook Types

Each webhook event has the following template
javascript
{ "idempotencyKey": "{UNIQUE_STRING}", "actionType": "{BASTA_ACTION}", "data": "{PAYLOAD}" }
ActionType can be one of the following
  • BidOnItem
  • SaleStatusChanged
  • ItemsStatusChanged

BidOnItem

The BidOnItem event(ActionType) is sent whenever a successful bid is placed on an auction.
javascript
{ "idempotencyKey": "717756cc-b5d4-4715-a983-9101d39100d0", "actionType": "BidOnItem", "data": { "bidId": "9f1cd2a3-edb7-427f-b354-0ea8ec230c24", "saleId": "f574bc51-bee2-4042-bea7-031d8ba9193c", "itemId": "a4889f22-c43f-4562-84ef-ba2bb4913442", "userId": "a7c67169-3857-49ef-bdc5-11d029a20dc8", "amount": 500, "maxAmount": 500, "bidDate": "2024-02-27 10:23:08.181026943 +0000 UTC m=+1304442.589759567", "bidType": "", "saleState": { "newLeader": "ea582aa7-e650-4352-9a05-6b6cae713cfa", "prevLeader": "187042af-857a-40d2-9cac-8d5a70c54662", "currentBid": 600, "currentMaxBid": 600 }, "reactiveBids": [ { "bidId": "165bc5ab-773f-4c1f-b2d8-acc73f88d62e", "userId": "bea25c0c-066a-4db1-94f3-1d43bbc0239e", "amount": 600, "maxAmount": 600 } ] } }
BidOnItem payload example

SaleStatusChanged

The SaleStatusChanged event(ActionType) is sent whenever a sale changes its status. For example when sale moves from being “PUBLISHED” to status “OPEN”
javascript
{ "idempotencyKey": "90696215-d0f9-4878-85cf-86aa6e4d17c7", "actionType": "SaleStatusChanged", "data": { "saleId": "2d0bae48-8c37-4991-816f-0309745d11bd", "saleStatus": "OPEN" } }
SaleStatusChanged payload example

ItemsStatusChanged

The ItemsStatusChanged event(ActionType) is sent whenever items in a sale change their status.
javascript
{ "idempotencyKey": "52254f4e-82cd-4aec-8f74-eb93ce516cc1", "actionType": "ItemsStatusChanged", "data": { "saleId": "ed553a36-6cb7-4fe4-af74-b554c32fb52b", "itemStatusChanges": [ { "itemId": "a4d24150-937d-4d85-9dc8-792c99886cc7", "itemStatus": "CLOSING", "saleState": { "newLeader": "bidder-a", "prevLeader": "bidder-a", "currentBid": 500, "currentMaxBid": 500 } }, { "itemId": "536c9bfd-78bd-4296-96d7-4d4d78901260", "itemStatus": "CLOSING", "saleState": { "newLeader": "bidder-x", "prevLeader": "bidder-x", "currentBid": 25000, "currentMaxBid": 25000 } } ] } }
ItemsStatusChanged payload example