Get All Region API

This API will fetch all the regions, So that billers can be fetched according to the specific region.

Environment

Test Environmenthttps://bbps-sb.payu.in .
Production EnvironmentContact your Account Manager to get access to the production environment

πŸ“˜

Note:

Send the scope of the Get Token API as read_regions to obtain the access_token for this request. For more information, refer to Get Token API - BBPS.

Sample request
curl --request GET \
     --url https://bbps-sb.payu.in/payu-nbc/v1/nbc/getRegions \
     --header 'authorization: Bearer stsdafsdfasdfadsfasdfasdfasdfsdafadsf'
Response parameters
Field NameDescription
codeThe global response code and can be any of the following:

- 0: If web service call failed
- 1: if web service call succeeded
statusThe status of the API command and can be any of the following:

- SUCCESS
- FAILURE
payloadIt will contain a list of biller categories. For more information, refer to the payload table.

payload

Field NameDescription
Success Scenarios
regionsThis field contains the region details in a JSON format.
regions.regionCodeThis field contain the region code.
regions.regionNameThis field contain the region name.
Failure Scenarios
refIdFor failure scenarios, This parameter contains the reference ID.
Note: In case of category fetch refId will be null.
typeFor failure scenarios, this field contains the type of error.
payloadIt will contain payload with error messages.
payload.errorsFor failure scenarios, this field contains the following in the response:

- reason: The error description if the request has failed.
- errorCode: The error code of the error if the request has failed
messageFor failure scenarios, this field contains the description of error type for failure or success.
additionalParamsFor failure scenarios, this field contains the additional fields (if any) related to billers in an array format.
Sample response

Success scenario

{
   "code":200,
   "status":"SUCCESS",
   "payload":{
      "regions":[
         {
            "regionCode":"STRING",
            "regionName":"STRING"
         },
         {
            "regionCode":"STRING",
            "regionName":"STRING"
         },
         {
            "regionCode":"STRING",
            "regionName":"STRING"
         }
      ]
   }
}

Failure scenario

{
   "code":600,
   "status":"FAILURE",
   "payload":{
      "errors":[
         {
            "reason":"<error reason>",
            "errorCode":"<error code>"
         }
      ],
      "refId":null,
      "type":"<type of message>",
      "message":"<message>",
      "additionalParams":{
         "Key1":"value1",
         "Key2":"value2",
         "Key3":"value3"
      }
   }
}

Request parameters

Language
Authorization
Bearer
Click Try It! to start a request and see the response here!