Appearance
Outgoing URL - Handling asynchronous response
Our API can be called by your services any time to get your data from many filtering options. But we all know that your needs will never exactly match what we built. Furthermore, making constant calls to an external API to get data that belongs to you is not a good practice.
The Outgoing URL process
So we have imagined and set up a clean way for you to handle data coming from our systems. This is a simple callback system that will POST data to a route you specify at the creation of an endpoint or a campaign on our API.
Here is the Outgoing process:
- An HTTP request coming from your back-end or front-end sends an image
- We receive the image and launch the analysis process
- When the process is done and if you have set-up an
outgoingUrlto the endpoint or campaign we trigger aPOSTrequest on the URL you specified with the result of the analysis. - You handle the data on the route you specified.
WARNING
Note that if you send an image without specifying an endpoint or campaign, you can not use the Outgoing URL process.
Code side
You must create a campaign or an endpoint via the API or Kweeri, and specify the POST-ready route that will be called each time we analyse an image for you.
A URL placeholder replacer allows you to specify some values to be replaced when the outgoingUrl is triggered.
Here are the possible values handled by our replacer:
{document_uid}{document_name}{endpoint_uid}{endpoint_name}{campaign_uid}{campaign_name}{company_uid}
For example, you can set the outgoingUrl to https://myOutgoingUrl.com/post/{endpoint_name}/{document_name} to make it easier for you to retrieve the endpoint and the document, since the values will be replaced by the actual ones.
Kweeri