API Documentation
Welcome to the Fraud BD API documentation. This API allows you to check courier information and status programmatically.
Before you begin
You'll need an API key to access our endpoints. You can find your API key in your account settings.
Try it without registration
Want to test the API first? Use our Sandbox Environment to explore all endpoints without needing an API key or account. Perfect for testing your integration before going live!
Authentication
All API requests must include your API key in the headers. The API key is used to authenticate your requests and ensure that only authorized users can access the API.
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Yes | Your unique API key |
Content-Type |
string | Yes | Must be application/json |
Base URL
All API endpoints are relative to this base URL:
https://fraudbd.com
Example endpoint:
https://fraudbd.com/api/check-courier-info
Important
Always use HTTPS for all API requests. Unencrypted HTTP requests will be rejected.
Check Courier Info
Check courier information for a specific phone number across all supported couriers.
Request Headers
{
"Content-Type": "application/json",
"api_key": "your_api_key"
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone_number | string | Yes | Phone number to check (e.g. "017XXXXXXXX") |
Example Request
{
"phone_number": "017XXXXXXXX"
}
curl -X POST https://fraudbd.com/api/check-courier-info \
-H "Content-Type: application/json" \
-H "api_key: your_api_key" \
-d '{
"phone_number": "017XXXXXXXX"
}'
<?php
$url = 'https://fraudbd.com/api/check-courier-info';
$data = ["phone_number" => "017XXXXXXXX"];
$headers = [
"Content-Type: application/json",
"api_key: your_api_key"
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
const url = 'https://fraudbd.com/api/check-courier-info';
const data = { phone_number: '017XXXXXXXX' };
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'api_key': 'your_api_key'
},
body: JSON.stringify(data),
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error(error));
import requests
url = "https://fraudbd.com/api/check-courier-info"
headers = {
"Content-Type": "application/json",
"api_key": "your_api_key"
}
data = {"phone_number": "017XXXXXXXX"}
response = requests.post(url, headers=headers, json=data)
print(response.json())
OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create("{\"phone_number\": \"017XXXXXXXX\"}", MediaType.parse("application/json"));
Request request = new Request.Builder()
.url("https://fraudbd.com/api/check-courier-info")
.addHeader("Content-Type", "application/json")
.addHeader("api_key", "your_api_key")
.post(body)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
Response
{
"status": true,
"message": "Courier info retrieved successfully.",
"data": {
"Summaries": {
"Pathao": {
"logo": "https://example.com/pathao-logo.png",
"data_type": "rating",
"customer_rating": "excellent_customer",
"risk_level": "low",
"message": "Excellent Customer - Very High Success Rate",
"api_version": "v2",
"show_count": false,
"total": 0,
"success": 0,
"cancel": 0
},
"Steadfast": {
"logo": "https://example.com/steadfast-logo.png",
"data_type": "delivery",
"total": 8,
"success": 7,
"cancel": 1
},
"Paperfly": {
"logo": "https://example.com/paperfly-logo.png",
"data_type": "delivery",
"total": 5,
"success": 4,
"cancel": 1
},
"Redx": {
"logo": "https://example.com/redx-logo.png",
"data_type": "delivery",
"total": 3,
"success": 2,
"cancel": 1
}
},
"totalSummary": {
"total": 16,
"success": 13,
"cancel": 3,
"successRate": 81.25,
"cancelRate": 18.75
}
}
}
📊 New: Pathao Rating System
Pathao has updated their system to use customer ratings instead of delivery counts. You'll now receive:
data_type: "rating"- Indicates rating-based responsecustomer_rating- Values: excellent_customer, good_customer, moderate_customer, risky_customer, new_customerrisk_level- Assessment: low, medium, high, very_high, unknownsuccess_rate- Estimated success percentage based on ratingtotal/success/cancel: 0- No actual delivery counts in rating-based responses
Note: Rating-based data is excluded from totalSummary calculations to maintain accuracy.
Pro Tip
Use this endpoint when you need to check courier information across all supported services with a single request.
Individual Courier Info
Check courier information for a specific phone number with a particular courier service.
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| courier_name | string | Yes | Courier service name (e.g. "pathao", "steadfast") |
Example Endpoints
POST https://fraudbd.com/api/check-courier-info/pathao
POST https://fraudbd.com/api/check-courier-info/steadfast
Request Headers
{
"Content-Type": "application/json",
"api_key": "your_api_key"
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone_number | string | Yes | The phone number to check (e.g. "017XXXXXXXX") |
Example Request
{
"phone_number": "017XXXXXXXX"
}
curl -X POST https://fraudbd.com/api/check-courier-info/pathao \
-H "Content-Type: application/json" \
-H "api_key: your_api_key" \
-d '{
"phone_number": "017XXXXXXXX"
}'
<?php
$url = 'https://fraudbd.com/api/check-courier-info/pathao';
$data = ["phone_number" => "017XXXXXXXX"];
$headers = [
"Content-Type: application/json",
"api_key: your_api_key"
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
const url = 'https://fraudbd.com/api/check-courier-info/pathao';
const data = { phone_number: '017XXXXXXXX' };
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'api_key': 'your_api_key'
},
body: JSON.stringify(data),
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error(error));
import requests
url = "https://fraudbd.com/api/check-courier-info/pathao"
headers = {
"Content-Type": "application/json",
"api_key": "your_api_key"
}
data = {"phone_number": "017XXXXXXXX"}
response = requests.post(url, headers=headers, json=data)
print(response.json())
OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create("{\"phone_number\": \"017XXXXXXXX\"}", MediaType.parse("application/json"));
Request request = new Request.Builder()
.url("https://fraudbd.com/api/check-courier-info/pathao")
.addHeader("Content-Type", "application/json")
.addHeader("api_key", "your_api_key")
.post(body)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
Response
{
"status": true,
"message": "Courier info retrieved successfully.",
"data": {
"Summaries": {
"Pathao": {
"logo": "https://example.com/pathao-logo.png",
"data_type": "rating",
"customer_rating": "good_customer",
"risk_level": "low",
"message": "Good Customer - High Success Rate",
"api_version": "v2",
"show_count": false,
"total": 0,
"success": 0,
"cancel": 0
}
},
"totalSummary": {
"total": 0,
"success": 0,
"cancel": 0,
"successRate": 0,
"cancelRate": 0
}
}
}
Pro Tip
Use this endpoint when you need courier information from a specific service provider. The response includes detailed statistics for the requested courier only.
Bulk Check Courier Info
Check courier information for multiple phone numbers in a single request.
Request
Headers
{
"Content-Type": "application/json",
"api_key": "your_api_key"
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone_numbers |
string | Yes | Comma-separated list of phone numbers (e.g. "017XXXXXXXX,018XXXXXXXX") |
Example Request
{
"phone_numbers": "017XXXXXXXX,018XXXXXXXX,019XXXXXXXX"
}
cURL Example
curl -X POST https://fraudbd.com/api/bulk/check-courier-info \
-H "Content-Type: application/json" \
-H "api_key: your_api_key" \
-d '{
"phone_numbers": "017XXXXXXXX,018XXXXXXXX,019XXXXXXXX"
}'
Response
{
"status": true,
"message": "Courier info check has been queued. You can check the status later.",
"data": {
"process_id": "ABC123",
"status": "queued"
}
}
Limitations
Maximum 30 phone numbers per request. For larger batches, please contact support.
Check Process Status
Check the status of a bulk check process and retrieve the results when completed.
Request
Headers
{
"Content-Type": "application/json",
"api_key": "your_api_key"
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
process_id |
string | Yes | The process ID returned from the bulk check request |
Example Request
{
"process_id": "ABC123"
}
cURL Example
curl -X POST https://fraudbd.com/api/bulk/check-process-status \
-H "Content-Type: application/json" \
-H "api_key: your_api_key" \
-d '{
"process_id": "ABC123"
}'
Response
Possible status values:
- queued - The request is waiting to be processed
- processing - The request is currently being processed
- completed - The request has been processed successfully
- failed - The request failed to process
{
"status": true,
"message": "Process status retrieved successfully.",
"data": {
"status": "completed",
"message": "Processing completed",
"result": {
"017XXXXXXXX": {
"Summaries": {
"Pathao": {
"logo": "https://example.com/pathao-logo.png",
"data_type": "rating",
"customer_rating": "moderate_customer",
"risk_level": "medium",
"message": "Moderate Customer - Average Success Rate",
"api_version": "v2",
"show_count": false,
"total": 0,
"success": 0,
"cancel": 0
},
"Steadfast": {
"logo": "https://example.com/steadfast-logo.png",
"data_type": "delivery",
"total": 8,
"success": 7,
"cancel": 1
},
"Paperfly": {
"logo": "https://example.com/paperfly-logo.png",
"data_type": "delivery",
"total": 5,
"success": 4,
"cancel": 1
},
"Redx": {
"logo": "https://example.com/redx-logo.png",
"data_type": "delivery",
"total": 3,
"success": 2,
"cancel": 1
}
},
"totalSummary": {
"total": 16,
"success": 13,
"cancel": 3,
"successRate": 81.25,
"cancelRate": 18.75
}
},
"018XXXXXXXX": {
"Summaries": {
"Pathao": {
"logo": "https://example.com/pathao-logo.png",
"data_type": "rating",
"customer_rating": "risky_customer",
"risk_level": "high",
"message": "Risky Customer - High Risk Profile",
"api_version": "v2",
"show_count": false,
"total": 0,
"success": 0,
"cancel": 0
},
"Steadfast": {
"logo": "https://example.com/steadfast-logo.png",
"data_type": "delivery",
"total": 3,
"success": 2,
"cancel": 1
},
"Paperfly": {
"logo": "https://example.com/paperfly-logo.png",
"data_type": "delivery",
"total": 2,
"success": 2,
"cancel": 0
},
"Redx": {
"logo": "https://example.com/redx-logo.png",
"data_type": "delivery",
"total": 1,
"success": 1,
"cancel": 0
}
},
"totalSummary": {
"total": 6,
"success": 5,
"cancel": 1,
"successRate": 83.33,
"cancelRate": 16.67
}
}
}
}
}
Sandbox Environment
Use our sandbox environment to test your integration without affecting production data or requiring authentication. The sandbox provides realistic dummy data for all courier services.
Sandbox Benefits
- Dedicated API Key - Use sandbox-specific authentication
- Unlimited Requests - No rate limiting in sandbox
- Predictable Data - Same phone number returns same result
- Real Response Format - Matches production structure
- Rating System Demo - Test new Pathao rating responses
Sandbox Base URL
https://fraudbd.com/api/sandbox
Available Sandbox Endpoints
Test API connection with sandbox credentials.
cURL Example
curl -X POST https://fraudbd.com/api/sandbox/check-api-connection \
-H "Content-Type: application/json" \
-H "api_key: 1302e523911213bc507c3c6dd35ebdb908044b42982345012452ac8f86406cc9"
Check courier information across all services with dummy data.
Request Body
{
"phone_number": "01712345678"
}
cURL Example
curl -X POST https://fraudbd.com/api/sandbox/check-courier-info \
-H "Content-Type: application/json" \
-H "api_key: 1302e523911213bc507c3c6dd35ebdb908044b42982345012452ac8f86406cc9" \
-d '{
"phone_number": "01712345678"
}'
Check individual courier information. Supported couriers: pathao, steadfast, paperfly, redx
cURL Example
curl -X POST https://fraudbd.com/api/sandbox/check-courier-info/pathao \
-H "Content-Type: application/json" \
-H "api_key: 1302e523911213bc507c3c6dd35ebdb908044b42982345012452ac8f86406cc9" \
-d '{
"phone_number": "01812345679"
}'
Sandbox Response Examples
Rating-Based Response (Even Phone Numbers)
Phone numbers ending in 0, 2, 4, 6, 8 return Pathao rating responses:
{
"status": true,
"message": "Sandbox courier info retrieved successfully.",
"data": {
"Summaries": {
"Pathao": {
"logo": "https://example.com/pathao-logo.png",
"data_type": "rating",
"customer_rating": "excellent_customer",
"risk_level": "low",
"message": "Excellent Customer - Very High Success Rate",
"api_version": "v2",
"show_count": false,
"success_rate": 95,
"total": 0,
"success": 0,
"cancel": 0
},
"Steadfast": {
"logo": "https://example.com/steadfast-logo.png",
"data_type": "delivery",
"total": 10,
"success": 8,
"cancel": 2
}
},
"totalSummary": {
"total": 10,
"success": 8,
"cancel": 2,
"successRate": 80,
"cancelRate": 20
}
}
}
Delivery-Based Response (Odd Phone Numbers)
Phone numbers ending in 1, 3, 5, 7, 9 return traditional delivery count responses:
{
"status": true,
"message": "Sandbox courier info retrieved successfully.",
"data": {
"Summaries": {
"Pathao": {
"logo": "https://example.com/pathao-logo.png",
"data_type": "delivery",
"total": 15,
"success": 12,
"cancel": 3
},
"Steadfast": {
"logo": "https://example.com/steadfast-logo.png",
"data_type": "delivery",
"total": 9,
"success": 7,
"cancel": 2
}
},
"totalSummary": {
"total": 24,
"success": 19,
"cancel": 5,
"successRate": 79.17,
"cancelRate": 20.83
}
}
}
Sandbox Data Patterns
Pathao Rating Patterns
The sandbox generates Pathao ratings based on the last digit of the phone number:
- Last digit 0: excellent_customer (95% success, low risk)
- Last digit 2: good_customer (85% success, low risk)
- Last digit 4: moderate_customer (70% success, medium risk)
- Last digit 6: risky_customer (30% success, high risk)
- Last digit 8: new_customer (0% success, unknown risk)
- Odd digits (1,3,5,7,9): Traditional delivery counts
Other Courier Data
Steadfast, Paperfly, and RedX always return delivery count data in sandbox mode. The numbers are generated based on the phone number pattern to ensure consistent, predictable responses for testing.
Testing Tips
Test Rating Responses
Use phone numbers ending in even digits (0,2,4,6,8) to test the new Pathao rating system responses.
Example: 01712345678
Test Delivery Data
Use phone numbers ending in odd digits (1,3,5,7,9) to test traditional delivery count responses.
Example: 01812345679
Consistent Results
The same phone number will always return the same result, making it perfect for automated testing.
Individual Testing
Test individual courier responses by specifying the courier name in the endpoint path.
Sandbox API Key
Use the sandbox API key 1302e523911213bc507c3c6dd35ebdb908044b42982345012452ac8f86406cc9 for testing. This key is only valid for sandbox endpoints and returns dummy data. For production access, generate your API key from your dashboard.
Response Codes
The API uses standard HTTP status codes to indicate success or failure:
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request was successful |
| 201 | Created | The request was successful and a resource was created |
| 400 | Bad Request | The request was malformed or missing required parameters |
| 401 | Unauthorized | Authentication failed or user doesn't have permissions |
| 403 | Forbidden | Authenticated but not authorized to access the resource |
| 404 | Not Found | The requested resource was not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | An error occurred on the server |
Error Handling
When an error occurs, the API will return a JSON response with details about the error:
{
"status": false,
"message": "The phone number must be a valid Bangladeshi number starting with 01 and followed by 9 digits. For example: 01XXXXXXXXX.",
"data": null
}
{
"status": false,
"message": "Usage limit (daily) reached. Please upgrade your plan.",
"data": null
}
Common Errors
- Invalid API key - Check that your API key is correct
- Missing required headers - Ensure all required parameters are included
- Unauthorized - Your API Key, username or password is incorrect
- Email Unverified - Your email address is not verified
- Rate limit exceeded - You've made too many requests too quickly
- No active plan found - You don't have an active plan. Please go to your account settings to upgrade your plan.
- Usage limit (daily) reached. Please upgrade your plan - You've reached your daily usage limit. Please upgrade your plan to increase your limits.
Rate Limiting
To ensure fair usage and maintain service quality, the API has the following rate limits:
| Endpoint | Limit | Window |
|---|---|---|
| All endpoints | 60 requests | per minute |
| Bulk check | 5 requests | per minute |
When you exceed the rate limit, the API will return a 429 Too Many Requests response.
Need higher limits?
If you need higher rate limits for your application, please contact us about our premium plans.