REST API · Version 2001
Shipra API documentation
Use these endpoints to manage products, warehouses, orders, rates, shipments, and shipping labels from your application.
https://app.shipra.org/api
Common headers
Accept: application/json
Content-Type: application/json
Authorization: Basic <base64(token:)>
First call the authentication endpoint. For protected requests, use the returned token as the HTTP Basic username and leave the password empty. With cURL, use -u "TOKEN_VALUE:". API responses always use JSON, except the label URL points to a PDF file.
Authentication
Exchange the vendor account credentials for an API token.
/api/AuthTokensRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
email | string | Required | Must not be empty. | Email address of the vendor account used to sign in. |
password | string | Required | Must not be empty. | Password belonging to the supplied vendor account. |
Example request
{
"email": "seller@example.com",
"password": "your-password"
}
Success response · 201
{
"token": "TOKEN_VALUE",
"ttl": 604800
}
Get user data
Returns the authenticated user, company, and dashboard summary.
/api/2001/GetUserDataNo request parameters are required.
Response fields
| Field | Type | Description |
|---|---|---|
message | string | Human-readable result message. |
user_data | object | Authenticated user’s account details. |
company_data | object | Company associated with the authenticated user. |
dashboard_data | object | Company dashboard summary. |
dashboard_data.orders_7days | object | Order-status totals for the latest seven-day period. |
Success response · 200
{
"message": "User data retrieved successfully.",
"user_data": {
"user_id": 123,
"email": "seller@example.com"
},
"company_data": {
"company_id": 45,
"company": "Example Seller"
},
"dashboard_data": {
"orders_7days": {}
}
}
Get states
Returns the available Indian states and their codes. Use the state code in address requests.
/api/2001/GetStateNo request parameters are required.
Response fields
| Field | Type | Description |
|---|---|---|
message | string | Human-readable result message. |
data | object | Map whose keys are state codes and values are state names. |
Success response · 200
{
"message": "States retrieved successfully.",
"data": {
"MH": "Maharashtra",
"DL": "Delhi"
}
}
Get carriers
Returns active forward-shipment carriers available to the authenticated company.
/api/2001/GetCarriersNo request parameters are required.
Response fields
| Field | Type | Description |
|---|---|---|
message | string | Human-readable result message. |
data | array | Active forward carriers available to the authenticated company. |
data[].id | integer | Carrier ID used by Rate calculator and Create shipment. |
data[].carrier | string | Display name of the carrier. |
data[].mode | string | Carrier transport mode, such as surface or air. |
Success response · 200
{
"message": "Carriers retrieved successfully.",
"data": [
{
"id": 12,
"carrier": "Example Carrier",
"mode": "S"
}
]
}
Get warehouses
Returns warehouses owned by the authenticated company.
/api/2001/GetWarehousesQuery parameters
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
page | integer | Optional | Must be numeric when supplied. | Page number to return. |
items_per_page | integer | Optional | Limited to 1–100; default 20. | Maximum warehouses returned on one page. |
warehouse_id | integer | Path parameter | Must identify a warehouse available to the company. | Append the ID to the URL to retrieve one warehouse. |
To retrieve one warehouse, append its ID: /api/2001/GetWarehouses/15.
Success response · 200
{
"message": "Warehouses retrieved successfully.",
"data": [
{
"store_location_id": 15,
"name": "Mumbai Warehouse"
}
]
}
Create warehouse
Creates an active pickup warehouse for the authenticated company.
/api/2001/CreateWarehouseRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
name | string | Required | Must not be empty. | Name used to identify the warehouse. |
pickup_address | string | Required | Must not be empty. | Primary pickup address line. |
pickup_address2 | string | Optional | No additional format validation. | Apartment, building, landmark, or secondary address. |
pincode | string | Required | Exactly 6 numeric digits; must exist in Shipra. | Pickup location postal code. |
city | string | Required | Must not be empty. | Pickup city. |
state | string | Required | Maximum 32 characters; state code must match the pincode. | Indian state code, for example MH. |
country | string | Required | Exactly 2 characters; must match the pincode country. | ISO country code, for example IN. |
pickup_phone | string | Required | Exactly 10 digits and must start with 6, 7, 8, or 9. | Warehouse contact phone number. |
email | string | Required | Must be a valid email address. | Warehouse contact email. |
pickup_time | string | Optional | No additional format validation. | Preferred pickup timing information. |
description | string | Optional | No additional format validation. | Internal warehouse description. |
gstin | string | Optional | Must be a valid GSTIN when supplied. | GST registration number for this location. |
latitude | decimal | Optional | Between -90 and 90. | Warehouse latitude. |
longitude | decimal | Optional | Between -180 and 180. | Warehouse longitude. |
Example request
{
"name": "Mumbai Warehouse",
"pickup_address": "21 Industrial Estate",
"pincode": "400001",
"city": "Mumbai",
"state": "MH",
"country": "IN",
"pickup_phone": "9876543210",
"email": "warehouse@example.com"
}
Success response · 201
{
"message": "Warehouse created successfully.",
"warehouse_id": 15
}
Update warehouse
Updates a warehouse owned by the authenticated company. Send the complete warehouse record.
/api/2001/UpdateWarehouseSend the complete warehouse record. Omitted optional fields are stored with their default empty values.
Request fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
warehouse_id | integer | Required | Numeric; must belong to the authenticated company. | ID of the warehouse to update. |
name | string | Required | Must not be empty. | Updated warehouse name. |
pickup_address | string | Required | Must not be empty. | Primary pickup address line. |
pickup_address2 | string | Optional | No additional format validation. | Secondary address or landmark. |
pincode | string | Required | Exactly 6 numeric digits. | Pickup location postal code. |
city | string | Required | Must not be empty. | Pickup city. |
state | string | Required | Maximum 32 characters. | Indian state code, for example MH. |
country | string | Required | Exactly 2 characters. | ISO country code, for example IN. |
pickup_phone | string | Required | Exactly 10 digits; starts with 6, 7, 8, or 9. | Warehouse contact phone number. |
email | string | Required | Must be a valid email address. | Warehouse contact email. |
pickup_time | string | Optional | No additional format validation. | Preferred pickup timing information. |
description | string | Optional | No additional format validation. | Internal warehouse description. |
gstin | string | Optional | Must be a valid GSTIN when supplied. | GST registration number for this location. |
latitude | decimal | Optional | Between -90 and 90. | Warehouse latitude. |
longitude | decimal | Optional | Between -180 and 180. | Warehouse longitude. |
Example request
{
"warehouse_id": 15,
"name": "Mumbai Warehouse",
"pickup_address": "22 Industrial Estate",
"pincode": "400001",
"city": "Mumbai",
"state": "MH",
"country": "IN",
"pickup_phone": "9876543210",
"email": "warehouse@example.com"
}
Success response · 200
{
"message": "Warehouse updated successfully.",
"warehouse_id": 15
}
Get products
Returns the authenticated company’s products using a restricted response schema.
/api/2001/GetProductsQuery parameters
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
page | integer | Optional | Positive page number. | Page of products to return. |
items_per_page | integer | Optional | Limited to 1–100; default 20. | Maximum products returned on one page. |
product_id | integer | Path parameter | Must belong to the authenticated company. | Append the ID to retrieve one product. |
To retrieve one product, append its ID: /api/2001/GetProducts/2139.
Product response fields
| Field | Type | Description |
|---|---|---|
product_id | integer | Internal product ID. |
product | string | Product name. |
product_code | string | SKU or product reference code. |
status | string | Product status; A means active. |
list_price | decimal string | Product list price. |
amount | integer | Available inventory quantity. |
weight | decimal string | Stored product weight. |
length | decimal | Stored package length. |
width | decimal | Stored package width. |
height | decimal | Stored package height. |
price | decimal string | Current selling price. |
description | string | Full description, or short description when the full description is empty. |
Product fields
{
"product_id": 2139,
"product": "Example product",
"product_code": "SKU-001",
"status": "A",
"list_price": "0.00",
"amount": 100,
"weight": "210.000",
"length": 10,
"width": 8,
"height": 4,
"price": "280.00",
"description": "Product description"
}
Create product
Creates an active product for the authenticated company.
/api/2001/CreateProductsRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
product | string | Required | Must not be empty. | Name displayed for the product. |
price | decimal | Required | Minimum 0.01. | Selling price of one product unit. |
amount | integer | Required | Whole number; minimum 1. | Available inventory quantity. |
description | string | Optional | No additional format validation. | Full product description. |
product_code | string | Optional | No additional format validation. | Your SKU or product reference code. |
taxes | integer[] | Optional | Must be an array of unique, existing tax IDs. | Tax rules assigned to the product. |
weight | decimal | Optional | Minimum 0.001. | Product weight used for shipping calculations. |
length | decimal | Conditional | Minimum 1; required when any dimension is supplied. | Package length. |
width | decimal | Conditional | Minimum 1; required when any dimension is supplied. | Package width. |
height | decimal | Conditional | Minimum 1; required when any dimension is supplied. | Package height. |
Example request
{
"product": "Example product",
"price": 280,
"amount": 100,
"product_code": "SKU-001",
"weight": 210,
"length": 10,
"width": 8,
"height": 4,
"taxes": [6]
}
Success response · 201
{
"message": "Product created successfully.",
"product_id": 2139
}
Update product
Updates a product owned by the authenticated company. Product name, price, and amount remain required.
/api/2001/UpdateProductsOptional fields may be sent as empty values to clear them.
Request fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
product_id | integer | Required | Minimum 1; must belong to the authenticated company. | ID of the product to update. |
product | string | Required | Must not be empty. | Updated product name. |
price | decimal | Required | Minimum 0.01. | Updated selling price per unit. |
amount | integer | Required | Whole number; minimum 1. | Updated inventory quantity. |
description | string | Optional | May be empty to clear it. | Full product description. |
product_code | string | Optional | May be empty to clear it. | Your SKU or product reference code. |
taxes | integer[] | Optional | Must contain unique, existing tax IDs; an empty array clears taxes. | Tax rules assigned to the product. |
weight | decimal | Optional | Minimum 0; an empty value clears it. | Product weight used for shipping calculations. |
length | decimal | Conditional | Minimum 0; all dimensions required when any one is supplied. | Updated package length. |
width | decimal | Conditional | Minimum 0; all dimensions required when any one is supplied. | Updated package width. |
height | decimal | Conditional | Minimum 0; all dimensions required when any one is supplied. | Updated package height. |
Example request
{
"product_id": 2139,
"product": "Updated product name",
"price": 300,
"amount": 75,
"product_code": "SKU-001",
"description": "Updated description",
"weight": 210,
"length": 10,
"width": 8,
"height": 4
}
Success response · 200
{
"message": "Product updated successfully.",
"product_id": 2139
}
Create order
Creates a new order or updates an existing open order with the same order_name.
/api/2001/CreateOrdersRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
order_name | string | Required | Must not be empty. | Your unique order reference. An existing open order with this reference is updated. |
order_weight | decimal | Required | Minimum 0.001. | Total order dead weight used for shipping. |
payment_id | string | Required | Only COD or PrePaid. | Order payment mode. |
shipping_cost | decimal | Optional | Minimum 1 when supplied. | Shipping amount charged to the customer. |
subtotal_discount | decimal | Optional | Minimum 1 when supplied. | Discount applied to the product subtotal. |
customer_notes | string | Optional | Letters, numbers, and spaces only; maximum 200 characters. | Customer’s instructions for the order. |
lr_number | string | Optional | Letters and numbers only; maximum 200 characters. | Lorry receipt or logistics reference number. |
ref_po_number | string | Optional | Letters and numbers only; maximum 200 characters. | Purchase-order reference number. |
email | string | Required | Must be a valid email address. | Customer email address. |
b_firstname | string | Required | Letters, numbers, and spaces only. | Billing first name. |
b_lastname | string | Optional | Letters, numbers, and spaces only. | Billing last name. |
b_address | string | Required | Letters, numbers, and spaces only. | Primary billing address. |
b_address2 | string | Optional | Letters, numbers, and spaces only. | Secondary billing address or landmark. |
b_city | string | Required | Letters, numbers, and spaces only. | Billing city. |
b_state | string | Required | Must match the billing pincode. | Billing state code, for example MH. |
b_country | string | Required | Must match the billing pincode. | Billing country code, for example IN. |
b_zipcode | string | Required | Exactly 6 numeric digits; must exist in Shipra. | Billing postal code. |
b_phone | string | Required | Exactly 10 digits and starts with 6, 7, 8, or 9. | Billing contact phone number. |
s_firstname | string | Required | Letters, numbers, and spaces only. | Shipping first name. |
s_lastname | string | Optional | Letters, numbers, and spaces only. | Shipping last name. |
s_address | string | Required | Letters, numbers, and spaces only. | Primary delivery address. |
s_address2 | string | Optional | Letters, numbers, and spaces only. | Secondary delivery address or landmark. |
s_city | string | Required | Letters, numbers, and spaces only. | Delivery city. |
s_state | string | Required | Must match the shipping pincode. | Delivery state code, for example DL. |
s_country | string | Required | Must match the shipping pincode. | Delivery country code, for example IN. |
s_zipcode | string | Required | Exactly 6 numeric digits; must exist in Shipra. | Delivery postal code. |
s_phone | string | Required | Exactly 10 numeric digits. | Delivery contact phone number. |
product_id | integer | Required | Numeric product ID. | Product to add to the order. |
product_code | string | Optional | Letters, numbers, and spaces only. | SKU used as an additional product reference. |
amount | integer | Required | Whole number; minimum 1. | Quantity of the product in the order. |
custom_tax_ids | mixed | Optional | No API-level format validation. | Custom tax identifiers passed to the order creation flow. |
Example request
{
"order_name": "WEB-10001",
"order_weight": 750,
"payment_id": "PrePaid",
"email": "customer@example.com",
"b_firstname": "Aarav",
"b_address": "12 Market Road",
"b_city": "Mumbai",
"b_state": "MH",
"b_country": "IN",
"b_zipcode": "400001",
"b_phone": "9876543210",
"s_firstname": "Aarav",
"s_address": "12 Market Road",
"s_city": "Mumbai",
"s_state": "MH",
"s_country": "IN",
"s_zipcode": "400001",
"s_phone": "9876543210",
"product_id": 2139,
"amount": 1
}
Success response · 200
{
"message": "Order WEB-10001: has been created successfully."
}
Get orders
Returns orders or shipments for the authenticated company.
/api/2001/GetOrders?status=OQuery parameters
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
status | string | Required | Only O, A, P, or S. | Filters open, allocated, processed, or shipped orders. |
page | integer | Optional | Positive page number. | Page of results to return. |
items_per_page | integer | Optional | Limited to 1–100. | Maximum orders returned on one page. |
Success response · 200
{
"message": "Orders retrieved successfully.",
"orders": [],
"shipment_statuses": [],
"params": {
"status": "O",
"page": 1,
"items_per_page": 20
}
}
Rate calculator
Returns eligible carrier rates for a route and package.
/api/2001/RateCalculatorRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
pickup_pincode | string | Required | Exactly 6 numeric digits. | Origin warehouse pincode. |
destination_pincode | string | Required | Exactly 6 numeric digits. | Customer delivery pincode. |
weight | decimal | Required | Minimum 0.001. | Total package dead weight in grams. |
length | decimal | Conditional | Minimum 0.01; required when any dimension is supplied. | Package length in centimetres. |
width | decimal | Conditional | Minimum 0.01; required when any dimension is supplied. | Package width in centimetres. |
height | decimal | Conditional | Minimum 0.01; required when any dimension is supplied. | Package height in centimetres. |
payment_type | string | Required | Only prepaid or cod, case-insensitive. | Shipment payment mode. |
cod_amount | decimal | Conditional | Required for COD; minimum 0.01. | Amount the carrier must collect from the customer. |
Example request
{
"pickup_pincode": "400001",
"destination_pincode": "110001",
"weight": 750,
"length": 20,
"width": 15,
"height": 10,
"payment_type": "prepaid"
}
Success response · 200
{
"message": "Rates calculated successfully.",
"data": []
}
Create shipment
Books an order with the selected carrier and returns its tracking details. An existing shipment is returned instead of being recreated.
/api/2001/CreateShipmentRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
order_name | string | Required | Must identify an existing order owned by the authenticated company. | Order reference to book. |
carrier_id | integer | Required | Must be an active forward carrier available to the company. | Carrier ID returned by Get carriers. |
warehouse_id | integer | Required | Must identify a warehouse owned by the company. | Warehouse from which the carrier collects the shipment. |
return_warehouse_id | integer | Optional | Must identify a company warehouse when supplied. | Destination for returned shipments; defaults to the pickup warehouse. |
comments | string | Optional | No API-level format validation. | Additional shipment or handling instructions. |
Example request
{
"order_name": "WEB-10001",
"carrier_id": 12,
"warehouse_id": 15,
"return_warehouse_id": 15,
"comments": "Handle with care"
}
Success response · 200
{
"message": "Shipment created successfully.",
"data": {
"tracking_number": "AWB123456789",
"tracking_url": "https://example.com/track.view?tracking_number=AWB123456789",
"carrier_id": 12,
"shipment_status": ""
}
}
Cancel shipment
Cancels a shipment with the carrier, reverses applicable booking charges, and removes its cached API label.
/api/2001/CancelShipmentRequest fields
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
tracking_number | string | Required | Must identify an existing shipment owned by the authenticated company. | Carrier tracking or AWB number of the shipment to cancel. |
Example request
{
"tracking_number": "AWB123456789"
}
Success response · 200
{
"message": "Shipment cancelled successfully."
}
Get label
Returns a stable PDF URL for the shipment label. If the PDF already exists, the cached file is returned.
/api/2001/GetLabel?tracking_number=AWB123456789Query parameters
| Field | Type | Requirement | Validation | Description |
|---|---|---|---|---|
tracking_number | string | Required | Must identify an existing shipment owned by the authenticated company. | Carrier tracking or AWB number whose PDF label is required. |
type | string | Optional | Passed to the packing-slip PDF layout resolver; defaults to thermal. | Requested label layout. |
Success response · 200
{
"message": "Label retrieved successfully.",
"url": "https://example.com/shipping_labels/AWB123456789_label.pdf"
}