Batch Status API
When conducting large-scale SMS or marketing campaigns using the PaaSoo platform, you may need to query the statistical data of the entire batch after sending, such as: total Submitted, Billing Count, actual Delivered count, Rejected count, etc. Through this API, you can retrieve data at the batch level to grasp the overall delivery performance and Delivery Rate for further statistics or analysis.
1. Invocation Method
- HTTP Method:
GET - Endpoint:
https://api.paasoo.com/batchReport - Usage Scenario: After triggering a batch SMS via the Batch SMS API, you can use this API to obtain the statistical report for that batch; the report includes the Delivery Rate, Operator returns, and other information.
2. Request Example
GET https://api.paasoo.com/batchReport?key=API_KEY&secret=API_SECRET&batchId=Batch_ID
3. Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| key | string | Yes | API Key (composed of 8 alphanumeric characters), used to uniquely identify your account. Can be obtained in the PaaSoo dashboard. | Abcdefgh |
| secret | string | Yes | API Secret (composed of 8 alphanumeric characters), used in conjunction with key for authentication. Can be obtained in the PaaSoo dashboard. | Abc123EF |
| batchId | string | Yes | The batch ID to be queried, used to uniquely identify a batch SMS sending task. | a0018f-e4bf51-e000 |
4. Response Example
The following examples illustrate typical return results for successful and failed queries.
4.1 Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| code | integer | Response status code submitted to the PaaSoo cloud communication platform:
| 0 |
| batchId | string | Batch ID. | a0018f-e4bf51-e000 |
| descr | string | Text description corresponding to the code. | Missing parameters |
| submitted | integer | Total number of SMS Submitted in this batch (total number queuing to be sent). | 10000 |
| charged | integer | Billing Count, representing the total number of parts billed for this batch sending. | 10000 |
| pending | integer | Number of SMS currently unsent or Pending to be processed. | 0 |
| rejected | integer | Number of SMS Rejected at the platform or Operator level (send requests explicitly rejected). | 0 |
| deliveryRate | string | Delivery Rate, usually calculated by (delivered + accepted) / submitted, and displayed as a percentage. | 100% |
| delivered | integer | Total number of SMS returned with a "Delivered" status by the Operator. | 10000 |
| accepted | integer | Number of SMS Accepted by the Operator but not yet or unable to be confirmed as finally delivered. | 0 |
| failed | integer | Total number of SMS returned with a "Failed" status by the Operator. | 0 |
| unreachable | integer | Total number of SMS returned as "Unreachable" by the Operator (may include powered off, suspended service, no signal, etc.). | 0 |
| expired | integer | Total number of SMS returned as "Expired" by the Operator due to timeout. | 0 |
| deleted | integer | Total number of SMS returned as "Deleted" by the Operator (usually means not successfully sent within the Operator's storage validity period). | 0 |
| usage | string | Total consumed amount. | 100 |
4.2 Success Response Example
{
"submitted": 10000,
"charged": 10000,
"pending": 0,
"rejected": 0,
"deliveryRate": "100%",
"delivered": 10000,
"accepted": 0,
"failed": 0,
"unreachable": 0,
"expired": 0,
"deleted": 0
}
4.3 Failure Response Example
{
"code": 2,
"descr": "Missing parameters."
}
5. Best Practices and Precautions
- API Security:
- Authentication is performed via
keyandsecret; please ensure they are kept safely in a secure environment. - It is recommended to call the API using HTTPS to prevent sensitive information from being stolen during transmission.
- Authentication is performed via
- Sending Strategy and Reconciliation:
- A unique
batchIdcan be generated during batch sending for subsequent statistics and reconciliation. - If a more granular report (individual SMS status) is required, it can be used in combination with single DLR queries or the Callback URL For Delivery Receipts mechanism.
- A unique
- Compensatory Queries:
- Some Operators may have a certain delay in status feedback. If the query result does not match expectations, it is recommended to query again later.
- Set reasonable polling intervals and counts based on business needs to avoid overly frequent invocations.
- Data Accuracy:
- Since the reports rely on Operator receipts, Operators in different regions will vary in timeliness and accuracy.
- If you notice significant data anomalies or mismatches with actual business conditions, contact PaaSoo technical support for further troubleshooting.
6. Summary
The Batch Status API allows you to compute and analyze the Delivery Rate, Failed count, Billing Count, etc., of large-scale SMS within a short time. Combined with other PaaSoo querying and callback features, you can comprehensively grasp the status information of the entire SMS sending process, improving the efficiency of tracking and managing large-scale campaigns or promotions.
If you encounter any technical issues or have business inquiries during the API integration, please do not hesitate to contact our Support team at support@paasoo.com. We are always here to assist you.