get https://bbps-sb.payu.in/payu-nbc/v1/nbc/getRegions
This API will fetch all the regions, So that billers can be fetched according to the specific region.
Environment
Test Environment | https://bbps-sb.payu.in . |
Production Environment | Contact 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 Name | Description |
---|---|
code | The global response code and can be any of the following: - 0: If web service call failed - 1: if web service call succeeded |
status | The status of the API command and can be any of the following: - SUCCESS - FAILURE |
payload | It will contain a list of biller categories. For more information, refer to the payload table. |
payload
Field Name | Description |
---|---|
Success Scenarios | |
regions | This field contains the region details in a JSON format. |
regions.regionCode | This field contain the region code. |
regions.regionName | This field contain the region name. |
Failure Scenarios | |
refId | For failure scenarios, This parameter contains the reference ID. Note: In case of category fetch refId will be null. |
type | For failure scenarios, this field contains the type of error. |
payload | It will contain payload with error messages. |
payload.errors | For 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 |
message | For failure scenarios, this field contains the description of error type for failure or success. |
additionalParams | For 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"
}
}
}