Callbackfy act as a proxy for your calls to 3rd party vendors.
The following example is to make a POST
request to https://vendor.com
and receive the result on https://myservice.com
.
{
"request": {
"url": "https://vendor.com",
"method": "post",
"headers": {
"x-example":"Example of header",
},
"data": {
"id":"example id"
}
},
"callback": {
"url":"https://myservice.com",
"meta": {
"correlation": "send me this info back"
}
}
}
The request example in the previous section should create a callback to https://myservice.com
with the following information:
{
"id" : "12345",
"request": {
"url": "https://vendor.com",
"method": "post",
"headers": {
"x-example":"Example of header",
},
"data": {
"id":"example id"
}
},
"callback": {
"url":"https://myservice.com",
"status": 200,
"meta": {
"correlation": "send me this info back"
}
},
"response" : {
"status": 200,
"data" : "Data from the request",
"headers": {
}
}