API Version 1.0 (REST JSON)

API Reference & Documentation

Build seamless shipping experiences. Automate rate calculation, book consignments, generate AWB tracking numbers, and receive real-time courier webhooks.

Base Endpoint: https://www.onestallcargo.com/api
HTTPS / TLS 1.3 100 req/min Rate Limit JSON UTF-8

Getting Started

API Endpoints

Developer Support

Need help integrating the API or custom webhook setup? Our logistics engineering team is available 24/7.

Architecture Overview

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.

1

Calculate & Quote

Get real-time rates and courier SLAs based on weight and pincodes.

2

Instant AWB Booking

One-click consignment creation with wallet deduction and label generation.

3

Track & Webhooks

Automated milestone push updates and status tracking for customers.

Security & Authentication

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.

# Pass your token in the request header
Authorization: Bearer OSC_sec_984f8a37b120c4e789...
Accept: application/json
Content-Type: application/json

How to obtain your API Token:

  1. Register or log in to your merchant account at OneStall Cargo Seller Portal.
  2. Ensure your account KYC has been submitted and approved.
  3. Navigate to Dashboard → Settings → API & Webhooks.
  4. Click Generate New API Key and copy your secret key securely.
Security Notice: Keep your API keys confidential! Do not commit them into public GitHub repositories or client-side JavaScript apps. Always store them securely in server environment variables.
Response Standard

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.
Bearer Auth Required

HTTP Request

                            
Payload: JSON
Server Response
200 OK • JSON

                            
Content-Type: application/json

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