BBPS Operator
Authentication
Basic Authentication
- Username: Client Id
- Password: Secret Key
Example Authorization Header:
Authorization: Basic eGV0dGxlXzgzMjg2NjU5YmRmNzBkZWEzMDUwMzcwNzE1MTYwMzA0MDo3YzE1ZDQyYTZhYjEyOTYzYWI4NzJhMzFkOTk4MDk1ZDMwNTAzNzA3MTUxNjMyMDg5
Request Body
{
"pageNumber": "2",
"recordsPerPage": "200"
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageNumber | String | Yes | Page number for pagination |
| recordsPerPage | String | Yes | Number of records to return per page |
Request Examples
Request Examples
- Curl
- JavaScript
- C#
- Java
- Python
curl --location 'https://xyz.com/v1/service/bbps/operator-list' --header 'Content-Type: application/json' --header 'Authorization: Basic eGV0dGxlXzU1NDlhYmQwYzJmNjdiOGUyMjM4Mjg5MTExMDc3MTExMjpjYjYyNzZlZTUwNGE1NzUzNDJlOTRlNmIwZjQ4MmQ0MTIyMzgyODkxMTEwNzc3NjM2' --data '{
"pageNumber":"2",
"recordsPerPage":"200"
}'
const axios = require('axios');
let data = JSON.stringify({
"pageNumber": "2",
"recordsPerPage": "200"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://xyz.com/v1/service/bbps/operator-list',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic eGV0dGxlXzU1NDlhYmQwYzJmNjdiOGUyMjM4Mjg5MTExMDc3MTExMjpjYjYyNzZlZTUwNGE1NzUzNDJlOTRlNmIwZjQ4MmQ0MTIyMzgyODkxMTEwNzc3NjM2'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://xyz.com/v1/service/bbps/operator-list");
request.Headers.Add("Authorization", "Basic eGV0dGxlXzU1NDlhYmQwYzJmNjdiOGUyMjM4Mjg5MTExMDc3MTExMjpjYjYyNzZlZTUwNGE1NzUzNDJlOTRlNmIwZjQ4MmQ0MTIyMzgyODkxMTEwNzc3NjM2");
var content = new StringContent("{
"pageNumber":"2",
"recordsPerPage":"200"
}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{
"pageNumber":"2",
"recordsPerPage":"200"
}");
Request request = new Request.Builder()
.url("https://xyz.com/v1/service/bbps/operator-list")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Basic eGV0dGxlXzU1NDlhYmQwYzJmNjdiOGUyMjM4Mjg5MTExMDc3MTExMjpjYjYyNzZlZTUwNGE1NzUzNDJlOTRlNmIwZjQ4MmQ0MTIyMzgyODkxMTEwNzc3NjM2")
.build();
Response response = client.newCall(request).execute();
import requests
import json
url = "https://xyz.com/v1/service/bbps/operator-list"
payload = json.dumps({
"pageNumber": "2",
"recordsPerPage": "200"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic eGV0dGxlXzU1NDlhYmQwYzJmNjdiOGUyMjM4Mjg5MTExMDc3MTExMjpjYjYyNzZlZTUwNGE1NzUzNDJlOTRlNmIwZjQ4MmQ0MTIyMzgyODkxMTEwNzc3NjM2'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Examples
- Success
- Failed
- MISSING_PARAMETER
{
"status": true,
"message": "Data fetched successfully",
"pagination": {
"currentPage": 2,
"totalPages": 122,
"recordsPerPage": 200,
"totalRecords": 24205
},
"data": [
{
"id": 201,
"name": "Amity University Greater Noida",
"recharge1": "AMIFEE000UTP02"
},
{
"id": 202,
"name": "Amity School Of Distance Learning",
"recharge1": "AMIFEE000UTP03"
},
{
"id": 203,
"name": "Amity International School Vrindavan Yojana",
"recharge1": "AMIFEE000UTP05"
},
{
"id": 204,
"name": "Amity International School Vasundhara Sec 6",
"recharge1": "AMIFEE000UTP06"
},
{
"id": 205,
"name": "Amity International School Vasundhara Sec 1",
"recharge1": "AMIFEE000UTP07"
},
{
"id": 206,
"name": "Amity International School Noida",
"recharge1": "AMIFEE000UTP08"
},
{
"id": 207,
"name": "Amity International School Lucknow",
"recharge1": "AMIFEE000UTP09"
}]
{
"code": "0x0201",
"message": "Unauthorized IP used.",
"status": "FAILURE",
"ip": "152.58.32.60"
}
{
"code": "0x0203",
"status": "MISSING_PARAMETER",
"message": "contactId is not valid"
}
Response Codes
The API uses the following response codes to indicate the status of requests:
| Code | Description | Meaning |
|---|---|---|
0x0200 | SUCCESS | The request was processed successfully. |
0x0201 | UNAUTHORIZED | Authentication failed or insufficient permissions. |
0x0202 | FAILED | The request processing failed for a reason other than those specifically identified. |
0x0203 | MISSING_PARAMETER | The request is missing one or more required parameters. |
0x0206 | PENDING | The request has been received and is being processed, but processing has not yet completed. |
0x0205 | SOMETHING_WENT_WRONG | A server error occurred during processing of the request. |