The Whistles API is designed for Staylists developers who wish to attract our application’s attention (hence Whistles) in order that we perform a pre-agreed process.
Whistles require authentication
Make a POST request to the following endpoint:
https://app.staylists.com/api/v3/whistles
instruction
(required)
An instruction you wish the system perform (this maps to the code we’ve written on our side).
url
(required)
The URL we need to hit in order to perform the instruction.
We’ll return a 200 with a body that looks something like this:
We’ll return a 400 (bad request) for any of the following scenarios
You may wish to poll our API to monitor a the status of a Whistle. This will tell you (through timestamps) if the request has been started and finished.
Make a GET request to the following endpoint:
https://app.staylists.com/api/v3/whistles/{id}
replace {id}
with the ID of the Whistle
We’ll return a 200 with a body that looks something like this:
Please note that started_at
and finished_at
could be be null
. When you create a Whistle, the instruction is queued up. The started_at
timestamp only gets updated when a worker picks up the job from the queue. The finished_at
timestamp is the last thing the worker does. As such, if something has gone wrong during the process of us fetching information from you, the finished_at
will remain null
until the problem has been fixed and the Whistle retried.
We’ll return a 404.