You will be required to configure a callback_url, where we will POST the results of your request once it is completed.
POST https://<some_custom_callback_url>
We send the response as a JSON body, which looks like this:
{
"annotations": [{
"reference_id": "001",
"job_id": "33abc3fe-9fbc-4d7c-b951-a1d1bfb6f840",
"status": "COMPLETED",
"tag": "cat_or_dog",
"result": {
"category" : "cat"
}]
}
The result
object is a JSON which can contain one or more key-value pairs, depending on your requirements. Check the examples to understand how it can be used in various scenarios.
In case the images shared in the Feedline API are invalid or unavailable, we will retry multiple times before responding asynchronously to the Callback API with "status": "FAILED"
{
"annotations": [
{
"reference_id": "001",
"flu_id": "33abc3fe-9fbc-4d7c-b951-a1d1bfb6f840",
"status": "FAILED",
"tag": "cat_or_dog",
"error": {
"code": "FS_0003",
"message": "Invalid data passed",
"meta_data": {
"failures": [
{
"field": "product_image_url",
"type": "INVALID_IMAGE_LINK"
},
{
"field": "review_image_url",
"type": "INVALID_IMAGE_LINK"
}
]
}
}
}
]
}
Parameters
content-type : application/json
reference_id
reference_id
is a unique identifier for a request. We'll fail a request if you've sent another request with the samereference_id
previously. This helps us ensure that we don't charge you for work which we've already done for you.
job_id
This is the unique ID that we generate for every request
status
PENDING
: The data is currently being processed
COMPLETED
: All the data has been processed and is ready for consumption by client
FAILED
: Data validation or file download failedAs of today, you will not receive a response which has a `FAILED' status
tag
Each request should have a
tag
which tells us what operation needs to be performed on that request. Don't worry, We'll share this tag with you during the integration process.
Authentication
For authentication of the callbacks, we can send a x-playment-key
header with each callback. You will need to share the key with us via a secure channel. If you receive requests without the set header, then it is not from Playment's side.