The PainChek API includes a number of dummy or test API endpoints that can be used to test the web-hooks functionality. You might want to experiment with these to understand the flow of the PainChek webhooks.
The endpoints available are:
End Point |
Purpose |
Parameters |
Sample |
---|---|---|---|
/painchek/webhook-callback-succeed/ |
The endpoint will always return 201 (created) |
n/a |
https://ua.ap.painchek.com/api/painchek/webhook-callback-succeed/ |
/painchek/webhook-callback-fail/{error_code}/ |
The endpoint will return the error_code supplied in the URL |
n/a |
https://ua.ap.painchek.com/api/painchek/webhook-callback-fail/404/ |
/painchek/webhook-callback-fail-to-succeed/ |
The endpoint will fail a number of times before succeeding |
id 2: Unique identifier. Set to "{webhook_queue_id}" failures: Number of times to fail (before succeeding on the next attempt) failure_status: Error to return when failing |
https://ua.ap.painchek.com/api/painchek/webhook-callback-fail-to-succeed/?id={webhook_queue_id}&failures=3&failure_status=400 |
Note
-
The endpoints support the POST method
-
The Id is used to determine how many failures have occurred (so that the end-point can return the correct amount of failures before returning success). By using a value of "{webhook_queue_id}" PainChek will substitute that value with the unique webhook queue id assigned each time an event is created that triggers a webhook call.