Hello everyone,
I have consumed Register Api. And Data saved into locally as well API's Database. I created table same as API's Table. Like...
Table - Name, Aadhar, pan , Email, phone, address, Pincode.
Now, I have to expose callback Api for updating status....where Producer will update status....
So, How to expose callback api.... please share ur suggestions...
Hey @Rajkamal Singh Jhala,
Since you have already consumed a Register API and saved data locally, for status update via callback you need to expose a REST API.
Step-by-Step Approach:
1.Expose REST APIGo to Logic → Integrations → Expose → REST APICreate a new REST API (e.g. Callback_Status_API)
2.Define Callback MethodAdd a POST method (recommended)Example endpoint:- /updateStatus
3.Define Input ParametersMatch what Producer will send, for example: Aadhar,Pan
4.Implement Server Action LogicIn the method flow: Fetch record from local table using Aadhar / Pan / ReferenceId Update Status field Save changesHandle “record not found” scenario properly5.Return Proper ResponseExample response:{ "success": true,
"message": "Status updated successfully"}
Hope it help you.Thanks & Regards,Kundan Chauhan
In OutSystems, a callback API is implemented by exposing a REST endpoint that the external producer can call to notify a status update. There is no special “callback” construct beyond this pattern.
Given your scenario, the usual and correct approach is:
Expose a REST API in Logic → Integrations → Expose → REST
Define a POST method that receives a status update payload from the producer
Use a technical correlation identifier (for example, a reference ID returned during the initial Register API call) to locate the record stored locally
Update only the relevant status fields and persist the changes
Return an appropriate HTTP response indicating the outcome (e.g. success, record not found, validation error)
From a design and security perspective:
Avoid using sensitive personal identifiers (Aadhaar, PAN, etc.) as the primary lookup key for callbacks
Keep the callback logic minimal and independent from UI flows
Secure the exposed REST API using the authentication mechanism agreed with the producer
This pattern is the standard way to handle asynchronous status updates from external systems in OutSystems.