API Integration Guide – Getting Started

To begin using the API, you will need a few credentials and settings that are essential for authentication and access.

Old API vs New API (at a glance)
New API Flow (Use Api-Token only):
Back Office Login -> Security -> API Token (New/Public API) -> Generate Token
                                   |
                                   +-- Use Api-Token in request header
                                   |
                                   +-- IP Whitelist in Security

Old API Flow (Legacy):
Back Office Login -> API Settings/Credentials -> Get ClientId/UserName/Password/EndUserIp
                        |
                        +-- Send old fields in request (as per old API docs)
                        |
                        +-- IP can be passed as EndUserIp in request payload
						
1. Get Your API Credentials

Login to the DSA Back Office, go to Security and generate your API token there.

Use the following process:

  • Login to your DSA Back Office account.
  • Security menu se API Token section open karein.
  • Token Type me Public API ya New API select karein.
  • Generate par click karke token create karein, aur banne ke baad token ko secure place me save karein (token usually ek baar hi copy hota hai).
  • Api-Token (Required in the request header)
  • ClientId (Old API only; not required in the new API)
  • UserName (Old API only; not required in the new API)
  • Password (Old API only; not required in the new API)
  • EndUserIp (Old API only; not required in the new API)

The new API requires only Api-Token for authentication. ClientId, UserName, Password and EndUserIp are required only for the old API and do not need to be sent to the new API. Each endpoint still requires its documented business request fields.

2. Whitelist Your IP

Same Security section me IP Whitelist me apna public IP add karein.

Isse token sirf trusted IP se hi use ho paayega. New API middleware request ke caller IP ko automatically validate karta hai, isliye EndUserIp request body me bhejne ki zarurat nahi hai.

3. Set Environment Variables

Once you have all the required details:

Replace the placeholders in the API documentation (like Api-Token) with your actual credentials.

You can use Postman's Environment feature to set these dynamically for convenience and better security.

New API environment variables:

{
"Api-Token": "your-api-token"
}
					

Old API required variables (required only in Old API body):

{
"ClientId": "your-client-id",
"UserName": "your-username",
"Password": "your-password",
"EndUserIp": "your-ip-address"
}
					

Old API also requires Api-Token in header: old and new APIs dono requests me Api-Token header required hai.

4. Authentication

The new API uses API Token–based authentication. The legacy credential fields listed above are not required.

All API requests must include the Api-Token in the request header.

Requests without a valid Api-Token will be rejected.

Required Header (Mandatory for Every API Call)
Api-Token: your-api-token
Content-Type: application/json

Important:

  • Api-Token must be included in every API request.
  • Keep your token secure and do not expose it in frontend code.
  • Regenerate the token from the DSA portal if it is compromised.
🛠️ Pro Tip: Keep your environment variables updated if any credential changes, or regenerate your token from the DSA panel when needed.

Now you're ready to start integrating with the API! 🚀

For any help, feel free to reach out to the support team.