Shift Carrier - API Documentation
Integration Guide & Reference
1. Overview
The Shift Carrier API is a comprehensive integration suite that enables seamless shipping and logistics management across multiple courier partners. Using this API suite, you can:
- Fetch cost estimates from multiple courier partners
- Book forward shipments with your preferred carrier
- Create forward orders with detailed product and address information
- Track shipments in real-time
- Cancel shipments when needed
- Manage pickup and delivery addresses
- Simulate order flows for testing
Key Features
- Support for both new address creation and existing address reference using UIDs
- Detailed product information including HSN codes, dimensions, and values
- Multiple payment modes (Prepaid, Cash on Delivery)
- Comprehensive shipment details with weight and dimensions
- Real-time tracking with detailed event timeline
- Multiple courier partner options with ratings
2. Authentication
To access the API, you must include an authorization header with your request using HTTP Basic Authentication.
🔐 Basic Authentication Required
All API requests require the following authorization header:
Replace <your_api_key> with your actual API key generated
using your login credentials.
Credentials Required
-
Username: Your registered username
(e.g.,
[email protected]) - Password: Your secure password
Methods to Generate Basic Auth Header
Method 1: Using Online Tool (Blitter.se)
Use this online tool to generate your Basic Authentication header from your username and password:
👉 https://www.blitter.se/utils/basic-authentication-header-generator/
Method 2: Using Postman
You can also use Postman to authenicate APIs:
- Open Postman and create a new request
- Go to the Authorization tab
- Select Auth Type as Basic Auth
-
Enter your Username
(e.g.,
[email protected]) - Enter your Password
- The authorization header will be automatically generated when you send the request
📝 Postman Screenshot Reference:
3. Mandatory Account Setup Steps
Before you can start using the Shift Carrier Tracking API, the following setup steps must be completed in your account:
⚠️ Prerequisites for API Access
Ensure all the following steps are completed before making API calls:
| Step | Requirement | Description |
|---|---|---|
| 1 | Growth Plan or Above | Your account must be on the Growth plan or above to access the API. API access is not available on lower tier plans. |
| 2 | KYC Completion | Complete the KYC (Know Your Customer) verification process in your account setup. This is mandatory for all API operations. |
| 3 | Wallet Balance | Add sufficient amount to your wallet. Ensure adequate balance is maintained for booking shipments and covering shipping charges. |
| 4 | Courier Selection | Select and activate your preferred courier partners. In Setup and Manage, select Courier and choose your selected couriers. |
| 5 | Courier Priority | Configure and activate courier priority settings. This determines the order of preference when multiple carriers are available for a shipment. |
4. API Endpoints
🧪 QA Environment
https://carrier-qa.shift.in
🚀 Production Environment
https://carrier.shift.in
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/open/cost-estimates |
Fetch shipping cost estimates |
| POST | /api/v1/open/forward |
Book forward shipment |
| POST | /api/v1/open/forward/order |
Create forward order |
| GET | /api/v1/open/track |
Track an order |
| POST | /api/v1/open/forward/shipment/cancel |
Cancel shipment |
| POST | /api/v1/open/address |
Create new address |
| PUT | /api/v1/open/address |
Update address |
| GET | /api/v1/open/address/{addressId} |
Get address details |
| DELETE | /api/v1/open/address/{addressId} |
Delete address |
| POST | /api/v1/open/order/{orderId}/simulate/status/{endOrderStatus} |
Simulate order flow |
| POST | /api/v1/open/return |
Create return shipment |
| GET | /api/v1/open/return/track |
Track return shipment |
| POST | /api/v1/open/return/shipment/cancel |
Cancel return shipment |
5. Fetch Cost Estimates
Headers
| Header | Value | Description |
|---|---|---|
| Authorization | Basic <api_key> | Base64-encoded credentials |
| Content-Type | application/json | Request body format |
| siteCode | CARRIER | Site identifier |
Request Example
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| returnOrder | Boolean | Whether this is a return order |
| codOrder | Boolean | Whether this is a COD order |
| destinationPin | Integer | Destination pincode |
| originPin | Integer | Origin pincode |
| weightInGrams | Integer | Package weight in grams |
| declaredValue | Integer | Declared value of shipment |
| packageLength | Integer | Package length in cm |
| packageBreadth | Integer | Package breadth in cm |
| packageHeight | Integer | Package height in cm |
Response Example
6. Book Forward Shipment
- It is mandatory to fetch cost estimates before booking any forward shipments.
- When cost estimates API is requested, in response you get all possible courier options along with key parameters like shipment price, expected delivery date, etc.
- Pick a courier partner of your choice, then note down the
carrierCodeandrequestIdfrom the response for that carrier. - When booking a shipment, use the same
carrierCodeandrequestIdto book shipment successfully with your desired courier partner.
Request Example
Payload Parameters Guide
| Parameter | Description |
|---|---|
| carrier_code, request_id | Obtained from cost estimates API response |
| order_number | Needs to be unique for each shipment |
| seller_details | Provide your GST details here. Use empty if non-GST client |
| pickup_location | Provide pickup address and contact details. Use either address or addressUid |
| delivery_location | Provide drop off (customer) address and contact details. Use either address or addressUid |
| shipment_id | Optional - unique identifier for the shipment. Not mandatory in shipment payload. |
| payment_mode | Valid values: PPD (Prepaid) or COD (Cash on Delivery) |
| reshipped | Optional - send as true if order is being reshipped after cancellation |
| label_preferences |
Optional – Configure and customize the shipping label generated for the shipment.
Supported label sizes:
|
Response Example
NOTE: The trackingNumber is the AWB number for the booked forward shipment. This can be used to track the shipment status.
7. Create Forward Order
The Create Forward Order API allows you to create new forward orders with comprehensive sender, receiver, product, and package details. This API supports various order types including prepaid (PPD) and Cash on Delivery (COD) orders.
Main Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| orderNumber | String | Required | Unique identifier for the order |
| pickupLocation | Object | Required | Sender/pickup address details |
| dropLocation | Object | Required | Receiver/delivery address details |
| shipments | Object | Required | Package and product details |
Location Object Structure
Each location (pickup/drop) can be specified in two ways:
Option 1: Using Address UID (Existing Address)
| Field | Type | Description |
|---|---|---|
| addressUid | Integer | Reference to existing address ID |
Option 2: Full Address Details (New Address)
| Field | Type | Required | Description |
|---|---|---|---|
| name | String | Required | Contact person name |
| phone | String | Required | Contact phone number |
| String | Required | Contact email address | |
| address | Object | Required | Address details object |
Address Object Structure
| Field | Type | Required | Description |
|---|---|---|---|
| addressLine1 | String | Required | Primary address line |
| addressLine2 | String | Optional | Secondary address line |
| city | String | Required | City name |
| state | String | Required | State name |
| pincode | Integer | Required | Postal code (6-digit Indian pincode) |
Shipments Object Structure
| Field | Type | Required | Description |
|---|---|---|---|
| weightInGrams | Integer | Required | Total package weight in grams |
| product_details | Array | Optional | Array of product detail objects |
| payment_details | Object | Optional | Payment information |
| dimensions | Object | Optional | Package dimensions (length_cm, breadth_cm, height_cm) |
Response Example
The data field contains the unique order ID generated for the created forward order.
8. Track an Order
Query Parameters
| Parameter | Required | Description |
|---|---|---|
| orderNumber | Required | The unique identifier of the order to track |
Request Example
Response Structure
Tracking Details Object
Each item in the trackingDetails array provides information about a specific event in the shipment's journey:
| Field | Description |
|---|---|
| scanStatus | The current status of the shipment |
| scanLocation | The location where the status was recorded |
| scanDateTime | The date and time when the status was updated |
9. Cancel Shipment
Request Parameters
| Parameter | Required | Description |
|---|---|---|
| carrier_code | Required | Carrier code for the shipment |
| tracking_number | Required | AWB number assigned by the courier partner |
| cancel_reason | Optional | Reason for shipment cancellation |
Request Example
Response Example
10. Return Order APIs
The Return Order APIs allow you to manage reverse logistics — including fetching cost estimates, creating return shipments, tracking them, and cancelling if needed. The flow mirrors the forward shipment flow: estimate → book → track → cancel.
10.1 Return Order Cost Estimate
This uses the same cost estimates endpoint as forward shipments. The key difference is setting "returnOrder": true in the request body.
Request Example
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| returnOrder | Boolean | Must be set to true for return shipments |
| codOrder | Boolean | Whether this is a COD order |
| destinationPin | Integer | Destination pincode (seller's pickup location) |
| originPin | Integer | Origin pincode (customer's location) |
| weightInGrams | Integer | Package weight in grams |
| declaredValue | Integer | Declared value of shipment |
| packageLength | Integer | Package length in cm |
| packageBreadth | Integer | Package breadth in cm |
| packageHeight | Integer | Package height in cm |
carrierCode and requestId from the response — you will need these to create the return shipment.
10.2 Create Return Shipment
- It is mandatory to fetch return cost estimates before creating a return shipment.
- Use the
carrierCodeandrequestIdfrom the cost estimates response. - For return shipments,
pickup_locationis the customer's address anddelivery_locationis the seller's address. - Both locations can be specified using an
addressUid(existing address) or full address details.
Request Example
Payload Parameters Guide
| Parameter | Required | Description |
|---|---|---|
| carrier_code | Required | Obtained from the return cost estimates API response |
| request_id | Required | Obtained from the return cost estimates API response |
| auto_carrier_selection_enabled | Optional | Set to true to let the system auto-select the best carrier. If false, carrier_code and request_id are used |
| pickup_location | Required | Customer's address (origin of return). Use either addressUid or full address details |
| delivery_location | Required | Seller's address (destination of return). Use either addressUid or full address details |
| shipment_value | Optional | Declared value of the return shipment |
| return_reason_code | Optional | Reason code for the return (e.g., CHNGDMND for Change of Mind) |
| qc_needed | Optional | Set to true if quality check is required upon return delivery |
| delivery_instructions | Optional | Special handling instructions for the courier |
| product_details | Optional | Array of product objects being returned (same structure as forward shipment) |
| dimensions | Optional | Package dimensions in cm (length_cm, breadth_cm, height_cm) |
Response Example
NOTE: The trackingNumber returned is the AWB number for the return shipment. Save this — it is required for tracking and cancellation.
10.3 Track Return Shipment
Query Parameters
| Parameter | Required | Description |
|---|---|---|
| returnAWBNumber | Required | The AWB/tracking number returned when the return shipment was created |
Request Example
trackingDetails array with scanStatus, scanLocation, and scanDateTime for each event.
10.4 Cancel Return Shipment
Request Parameters
| Parameter | Required | Description |
|---|---|---|
| carrier_code | Required | Carrier code used when the return shipment was created |
| tracking_number | Required | AWB number of the return shipment to cancel |
Request Example
Response Example
10. Address Management
Create a New Address
Request Parameters
| Parameter | Required | Description |
|---|---|---|
| addressName | Required | Name for the address |
| addressLine1 | Required | Max 60 chars – do not send garbage chars |
| addressLine2 | Required | Max 60 chars – do not send garbage chars |
| zipCode | Required | 6-digit Indian pincode only |
| addressType | Optional | SENDER (pickup) or RECEIVER (customer) |
| contactName | Required | Max 60 chars |
| Required | Proper email format is mandatory | |
| phoneNumber | Required | Used for SMS and WhatsApp communication |
| city | Optional | Auto-populated based on zipcode |
| state | Optional | Auto-populated based on zipcode |
Request Example
Response Example
The data field contains the unique address ID which can be used to create orders.
Update an Existing Address
Request Example
Response Example
Get Address Details
Request Example
Response Example
Delete an Address
Request Example
Response Example
11. Order Simulation API
Request Parameters
| Parameter | Description |
|---|---|
| orderId | Unique Order Id for testing order flow |
| endOrderStatus | Valid values: DLV (Delivered flow) or RTO_DLV (RTO flow) |
Request Example
The response will be of content type text/event-stream. The response is streamed to the caller with status updates for each stage of the simulation.
Sample Streamed Response
12. Status Codes Reference
The orderStatusCode can include the following values:
| Status Code | Status Description | Comments |
|---|---|---|
| NEW | New | When a new order is created, it is in New state |
| RTS | Ready To Ship | When a shipment is booked for an order. Implies waiting for pickup |
| INT | In Transit | Order moves to this state post successful pickup by courier partner |
| OFD | Out for Delivery | Order moves to this state when shipment is out for delivery |
| DLV | Delivered | Order moves to this state when shipment is delivered to buyer |
| RTO_INT | Returning to Origin | When shipment is rejected by buyer and is returning back to seller |
| RTO_DLV | Returned to Origin | When RTO is complete and shipment is delivered back to seller |
| CNX | Cancelled | When seller cancels the order through portal |
| UND | Undelivered | Could be an interim state during delivery attempts |
| LST | Lost/Damaged | When there is an issue with the shipment from courier partner |
| HLD | Hold | When seller archives the order from portal |
13. Use Cases & Examples
Use Case 1: Basic Forward Order
Creates a simple forward order with minimal required fields for quick order processing.
Use Case 2: Prepaid Order with Product Details
Creates a comprehensive prepaid order with detailed product information, ideal for e-commerce shipments.
Use Case 3: Cash on Delivery (COD) Order
Creates a COD order where payment is collected upon delivery, common for fashion and retail items.
Use Case 4: Using Existing Address UIDs
Efficiently creates orders using pre-registered address UIDs, reducing data redundancy and processing time.
Use Case 5: Mixed Address Order
Combines existing pickup address UID with new drop location details for flexible order processing.
14. Error Handling
The Shift Carrier Tracking API uses a consistent error structure to provide feedback on failed operations. When an API call fails, the response will include an errorMessage field with a descriptive message of what went wrong, while the data field will be null.
Error Response Structure
Common Error Messages
When an order number does not correspond to any existing order in the system:
When required fields are missing or invalid data is provided:
When city-state data is not available for the given pincode: