20
Views
2
Comments
Callback api

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...

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

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 API
Go to Logic → Integrations → Expose → REST API
Create a new REST API (e.g. Callback_Status_API)

2.Define Callback Method
Add a POST method (recommended)
Example endpoint:- /updateStatus

3.Define Input Parameters
Match what Producer will send, for example:
 Aadhar,Pan

4.Implement Server Action Logic
In the method flow:
 Fetch record from local table using Aadhar / Pan / ReferenceId
 Update Status field
 Save changes
Handle “record not found” scenario properly

5.Return Proper Response
Example response:
{
  "success": true,

  "message": "Status updated successfully"
}

Hope it help you.

Thanks & Regards,
Kundan Chauhan

2025-11-19 06-14-01
Miguel Verdasca
Champion

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.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.