+ Start a Discussion
Maurya PriyadarshiMaurya Priyadarshi 

What should be Callback URL in REST API callout JSON?

I am trying to do a callout to an external REST API (using http JSON POST). The external REST API provides option to give callback URL's where it sends various responses.

 "callbacks":   [
    {       "url":"http://mydomain.com/path/to/my/service/event/status",       "type":"status"     },     {          "url":"http://mydomain.com/path/to/my/service/event/deliveryStatus",       "type":"deliveryStatus"     },     {       "url":"http://mydomain.com/path/to/my/service/event/response",           "type":"response"     }   ]

I want to update certain fields in Salesforce based on these responses received. What URL should I give here which Salesforce can listen to? Also these response are asynchronous. How do I achieve reading these responses in Salesforce? Thanks in advance for any help in this.
ShashankShashank (Salesforce Developers) 
I could not understand your question completely, but please check if this helps: http://salesforce.stackexchange.com/questions/30888/accessing-external-rest-service-that-requires-callback
Maurya PriyadarshiMaurya Priyadarshi
I looked at the other post before posting mine, but I dont think that has been answered yet (although the best answer is selected). I would like to explain my question in more detail.

The REST API call out is basically for invoking an event in an external system which is executed fine using my callout from Salesforce. But after the event is invoked in external system (and after the first response is sent to Salesforce) the external system sends some more responses (not immediately but after some time). For sending these responses the external REST API provides an option to give callback URL's to which the response will be sent. In my apex code, I want to read those responses and update certain fields in Salesforce system. For this I need to provide a URL in Salesforce which can receive those responses (without a GET).

I tried testing this with regular SoapUI and providing the URL of a bin I created in requestb.in as the callback URL. I am able to receive those callback responses from the external system after the first callout is made.