Logistics API Documentation
Overview
The Logistics API allows vendors to manage orders and retrieve branch information securely using token-based authentication and JSON data.- Base URL:
https://your-api-domain.com - API Version:
v1
๐ Authentication
API Credentials
Each vendor receives:- API Key: Unique account identifier
- Secret Key: Private key for secure access
Token Generation
Before making API calls, generate an access token. Endpoint:POST /v1/token
Headers:
Using the Token
Add the token to theAuthorization header:
Orders
Get Orders List
Retrieve a paginated list of orders. Endpoint:GET /v1/orders
Headers:
page(optional): Page number (default: 1)limit(optional): Items per page (default: 20, max: 100)status(optional): Filter by status (pending,confirmed,in_transit,delivered,cancelled)fromDate(optional): Filter start date (YYYY-MM-DD)toDate(optional): Filter end date (YYYY-MM-DD)
Create New Order
Endpoint:POST /v1/order
Headers:
Add Comment to Order
POST /v1/orders/:orderId/comments
Add a new text comment to a specific order.
๐งพ Path Parameters
| Name | Type | Description |
|---|---|---|
orderId | string | Unique ID of order |
Request Body
Branches
Get Provider Branches
Endpoint:GET /v1/branches/:providerId
Headers:
active(optional):trueorfalsesearch(optional): Search by branch name, city, district, address
Get Branch Details
Endpoint:GET /v1/branch/:providerId/:branchId
Response:
Error Handling
Error Format:| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Request validation failed |
| 401 | UNAUTHORIZED | Invalid or missing token |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | NOT_FOUND | Resource not found |
| 409 | CONFLICT | Resource conflict |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |
Rate Limiting
- Rate Limit: 1000 requests per hour per API key
- Burst Limit: 50 requests per minute
X-RateLimit-Limit: Max requests per hourX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Reset time (Unix timestamp)
๐ Support
- Email: [email protected]
- Docs: https://docs.logistics.com
- Status: https://status.logistics.com
Changelog
Version 1.0.0
- Initial API release
- Order management endpoints
- Branch information endpoints
- Token-based authentication