Webhook ⚓
Use this endpoint to notify Deck of something happening outside of it. Some actions will be triggered depending on the event key and the caller. The event key and its consequences have to be defined with Deck team before using it, as it will be custom behaviours. If you want to test an API call before having a real event in place, use "test-event" as event_key. It will not do anything but will reply with an OK.
POST
/webhook/{event_key}
curl \
--request POST 'https://api.ppe-analytics.com/api/v1/webhook/test-event' \
--header "PPEApiKey: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"sample_input_1":"123AMA","sample_input_2":7894}'
Request examples
{
"sample_input_1": "123AMA",
"sample_input_2": 7894
}
Response examples (200)
{
"status": "OK",
"message": "Event 'test-event' received with 2 input parameters. Processing will begin and results should be visible on Deck within 5 minutes."
}
Response examples (404)
{
"status": "ERROR",
"message": "Unknown event key 'yolo'"
}
Response examples (400)
{
"status": "ERROR",
"message": "Unexpected parameters provided for event key 'notify-new-product'. Expected something like '{product_code: AA99}'"
}