API Reference & Documentation
Build seamless shipping experiences. Automate rate calculation, book consignments, generate AWB tracking numbers, and receive real-time courier webhooks.
https://www.onestallcargo.com/api
Getting Started
API Endpoints
Need help integrating the API or custom webhook setup? Our logistics engineering team is available 24/7.
Welcome to OneStall Cargo APIs
The OneStall Cargo API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Calculate & Quote
Get real-time rates and courier SLAs based on weight and pincodes.
Instant AWB Booking
One-click consignment creation with wallet deduction and label generation.
Track & Webhooks
Automated milestone push updates and status tracking for customers.
Bearer Token Authentication
To interact with secure endpoints (booking shipments, rates, tracking account orders), you must authenticate requests using an HTTP Bearer Token in the Authorization header.
Authorization: Bearer OSC_sec_984f8a37b120c4e789...
Accept: application/json
Content-Type: application/json
How to obtain your API Token:
- Register or log in to your merchant account at OneStall Cargo Seller Portal.
- Ensure your account KYC has been submitted and approved.
- Navigate to Dashboard → Settings → API & Webhooks.
- Click Generate New API Key and copy your secret key securely.
HTTP Status Codes & Rate Limits
OneStall Cargo uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided, and codes in the 5xx range indicate an internal server error.
| Code | Status | Meaning & Recommended Action |
|---|---|---|
| 200 OK | Success | The request succeeded. |
| 201 Created | Resource Created | Consignment booked and AWB assigned. |
| 400 Bad Request | Validation Error | Required parameter missing (e.g. invalid pincode or negative weight). |
| 401 Unauthorized | Invalid Token | No valid API Key provided in Authorization header. |
| 402 Payment Required | Insufficient Balance | Merchant wallet balance is lower than consignment freight charge. |
| 403 Forbidden | KYC Incomplete | Account KYC pending verification before live shipment dispatch is permitted. |
| 429 Too Many Requests | Rate Limited | Standard tier limit of 100 requests per minute exceeded. Retry after 60s. |
Headers & Payload Attributes
Content-Type: application/json| Field / Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Pass as Bearer <API_KEY> in header. |
| Accept | string | Required | application/json |