REST API · Version 2001

Shipra API documentation

Use these endpoints to manage products, warehouses, orders, rates, shipments, and shipping labels from your application.

Base URL 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.

POST/api/AuthTokens

Request fields

FieldTypeRequirementValidationDescription
emailstringRequiredMust not be empty.Email address of the vendor account used to sign in.
passwordstringRequiredMust 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.

GET/api/2001/GetUserData

No request parameters are required.

Response fields

FieldTypeDescription
messagestringHuman-readable result message.
user_dataobjectAuthenticated user’s account details.
company_dataobjectCompany associated with the authenticated user.
dashboard_dataobjectCompany dashboard summary.
dashboard_data.orders_7daysobjectOrder-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.

GET/api/2001/GetState

No request parameters are required.

Response fields

FieldTypeDescription
messagestringHuman-readable result message.
dataobjectMap 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.

GET/api/2001/GetCarriers

No request parameters are required.

Response fields

FieldTypeDescription
messagestringHuman-readable result message.
dataarrayActive forward carriers available to the authenticated company.
data[].idintegerCarrier ID used by Rate calculator and Create shipment.
data[].carrierstringDisplay name of the carrier.
data[].modestringCarrier 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.

GET/api/2001/GetWarehouses

Query parameters

FieldTypeRequirementValidationDescription
pageintegerOptionalMust be numeric when supplied.Page number to return.
items_per_pageintegerOptionalLimited to 1–100; default 20.Maximum warehouses returned on one page.
warehouse_idintegerPath parameterMust 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.

POST/api/2001/CreateWarehouse

Request fields

FieldTypeRequirementValidationDescription
namestringRequiredMust not be empty.Name used to identify the warehouse.
pickup_addressstringRequiredMust not be empty.Primary pickup address line.
pickup_address2stringOptionalNo additional format validation.Apartment, building, landmark, or secondary address.
pincodestringRequiredExactly 6 numeric digits; must exist in Shipra.Pickup location postal code.
citystringRequiredMust not be empty.Pickup city.
statestringRequiredMaximum 32 characters; state code must match the pincode.Indian state code, for example MH.
countrystringRequiredExactly 2 characters; must match the pincode country.ISO country code, for example IN.
pickup_phonestringRequiredExactly 10 digits and must start with 6, 7, 8, or 9.Warehouse contact phone number.
emailstringRequiredMust be a valid email address.Warehouse contact email.
pickup_timestringOptionalNo additional format validation.Preferred pickup timing information.
descriptionstringOptionalNo additional format validation.Internal warehouse description.
gstinstringOptionalMust be a valid GSTIN when supplied.GST registration number for this location.
latitudedecimalOptionalBetween -90 and 90.Warehouse latitude.
longitudedecimalOptionalBetween -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.

POST/api/2001/UpdateWarehouse

Send the complete warehouse record. Omitted optional fields are stored with their default empty values.

Request fields

FieldTypeRequirementValidationDescription
warehouse_idintegerRequiredNumeric; must belong to the authenticated company.ID of the warehouse to update.
namestringRequiredMust not be empty.Updated warehouse name.
pickup_addressstringRequiredMust not be empty.Primary pickup address line.
pickup_address2stringOptionalNo additional format validation.Secondary address or landmark.
pincodestringRequiredExactly 6 numeric digits.Pickup location postal code.
citystringRequiredMust not be empty.Pickup city.
statestringRequiredMaximum 32 characters.Indian state code, for example MH.
countrystringRequiredExactly 2 characters.ISO country code, for example IN.
pickup_phonestringRequiredExactly 10 digits; starts with 6, 7, 8, or 9.Warehouse contact phone number.
emailstringRequiredMust be a valid email address.Warehouse contact email.
pickup_timestringOptionalNo additional format validation.Preferred pickup timing information.
descriptionstringOptionalNo additional format validation.Internal warehouse description.
gstinstringOptionalMust be a valid GSTIN when supplied.GST registration number for this location.
latitudedecimalOptionalBetween -90 and 90.Warehouse latitude.
longitudedecimalOptionalBetween -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.

GET/api/2001/GetProducts

Query parameters

FieldTypeRequirementValidationDescription
pageintegerOptionalPositive page number.Page of products to return.
items_per_pageintegerOptionalLimited to 1–100; default 20.Maximum products returned on one page.
product_idintegerPath parameterMust 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

FieldTypeDescription
product_idintegerInternal product ID.
productstringProduct name.
product_codestringSKU or product reference code.
statusstringProduct status; A means active.
list_pricedecimal stringProduct list price.
amountintegerAvailable inventory quantity.
weightdecimal stringStored product weight.
lengthdecimalStored package length.
widthdecimalStored package width.
heightdecimalStored package height.
pricedecimal stringCurrent selling price.
descriptionstringFull 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.

POST/api/2001/CreateProducts

Request fields

FieldTypeRequirementValidationDescription
productstringRequiredMust not be empty.Name displayed for the product.
pricedecimalRequiredMinimum 0.01.Selling price of one product unit.
amountintegerRequiredWhole number; minimum 1.Available inventory quantity.
descriptionstringOptionalNo additional format validation.Full product description.
product_codestringOptionalNo additional format validation.Your SKU or product reference code.
taxesinteger[]OptionalMust be an array of unique, existing tax IDs.Tax rules assigned to the product.
weightdecimalOptionalMinimum 0.001.Product weight used for shipping calculations.
lengthdecimalConditionalMinimum 1; required when any dimension is supplied.Package length.
widthdecimalConditionalMinimum 1; required when any dimension is supplied.Package width.
heightdecimalConditionalMinimum 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.

POST/api/2001/UpdateProducts

Optional fields may be sent as empty values to clear them.

Request fields

FieldTypeRequirementValidationDescription
product_idintegerRequiredMinimum 1; must belong to the authenticated company.ID of the product to update.
productstringRequiredMust not be empty.Updated product name.
pricedecimalRequiredMinimum 0.01.Updated selling price per unit.
amountintegerRequiredWhole number; minimum 1.Updated inventory quantity.
descriptionstringOptionalMay be empty to clear it.Full product description.
product_codestringOptionalMay be empty to clear it.Your SKU or product reference code.
taxesinteger[]OptionalMust contain unique, existing tax IDs; an empty array clears taxes.Tax rules assigned to the product.
weightdecimalOptionalMinimum 0; an empty value clears it.Product weight used for shipping calculations.
lengthdecimalConditionalMinimum 0; all dimensions required when any one is supplied.Updated package length.
widthdecimalConditionalMinimum 0; all dimensions required when any one is supplied.Updated package width.
heightdecimalConditionalMinimum 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.

POST/api/2001/CreateOrders

Request fields

FieldTypeRequirementValidationDescription
order_namestringRequiredMust not be empty.Your unique order reference. An existing open order with this reference is updated.
order_weightdecimalRequiredMinimum 0.001.Total order dead weight used for shipping.
payment_idstringRequiredOnly COD or PrePaid.Order payment mode.
shipping_costdecimalOptionalMinimum 1 when supplied.Shipping amount charged to the customer.
subtotal_discountdecimalOptionalMinimum 1 when supplied.Discount applied to the product subtotal.
customer_notesstringOptionalLetters, numbers, and spaces only; maximum 200 characters.Customer’s instructions for the order.
lr_numberstringOptionalLetters and numbers only; maximum 200 characters.Lorry receipt or logistics reference number.
ref_po_numberstringOptionalLetters and numbers only; maximum 200 characters.Purchase-order reference number.
emailstringRequiredMust be a valid email address.Customer email address.
b_firstnamestringRequiredLetters, numbers, and spaces only.Billing first name.
b_lastnamestringOptionalLetters, numbers, and spaces only.Billing last name.
b_addressstringRequiredLetters, numbers, and spaces only.Primary billing address.
b_address2stringOptionalLetters, numbers, and spaces only.Secondary billing address or landmark.
b_citystringRequiredLetters, numbers, and spaces only.Billing city.
b_statestringRequiredMust match the billing pincode.Billing state code, for example MH.
b_countrystringRequiredMust match the billing pincode.Billing country code, for example IN.
b_zipcodestringRequiredExactly 6 numeric digits; must exist in Shipra.Billing postal code.
b_phonestringRequiredExactly 10 digits and starts with 6, 7, 8, or 9.Billing contact phone number.
s_firstnamestringRequiredLetters, numbers, and spaces only.Shipping first name.
s_lastnamestringOptionalLetters, numbers, and spaces only.Shipping last name.
s_addressstringRequiredLetters, numbers, and spaces only.Primary delivery address.
s_address2stringOptionalLetters, numbers, and spaces only.Secondary delivery address or landmark.
s_citystringRequiredLetters, numbers, and spaces only.Delivery city.
s_statestringRequiredMust match the shipping pincode.Delivery state code, for example DL.
s_countrystringRequiredMust match the shipping pincode.Delivery country code, for example IN.
s_zipcodestringRequiredExactly 6 numeric digits; must exist in Shipra.Delivery postal code.
s_phonestringRequiredExactly 10 numeric digits.Delivery contact phone number.
product_idintegerRequiredNumeric product ID.Product to add to the order.
product_codestringOptionalLetters, numbers, and spaces only.SKU used as an additional product reference.
amountintegerRequiredWhole number; minimum 1.Quantity of the product in the order.
custom_tax_idsmixedOptionalNo 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.

GET/api/2001/GetOrders?status=O

Query parameters

FieldTypeRequirementValidationDescription
statusstringRequiredOnly O, A, P, or S.Filters open, allocated, processed, or shipped orders.
pageintegerOptionalPositive page number.Page of results to return.
items_per_pageintegerOptionalLimited 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.

POST/api/2001/RateCalculator

Request fields

FieldTypeRequirementValidationDescription
pickup_pincodestringRequiredExactly 6 numeric digits.Origin warehouse pincode.
destination_pincodestringRequiredExactly 6 numeric digits.Customer delivery pincode.
weightdecimalRequiredMinimum 0.001.Total package dead weight in grams.
lengthdecimalConditionalMinimum 0.01; required when any dimension is supplied.Package length in centimetres.
widthdecimalConditionalMinimum 0.01; required when any dimension is supplied.Package width in centimetres.
heightdecimalConditionalMinimum 0.01; required when any dimension is supplied.Package height in centimetres.
payment_typestringRequiredOnly prepaid or cod, case-insensitive.Shipment payment mode.
cod_amountdecimalConditionalRequired 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.

POST/api/2001/CreateShipment

Request fields

FieldTypeRequirementValidationDescription
order_namestringRequiredMust identify an existing order owned by the authenticated company.Order reference to book.
carrier_idintegerRequiredMust be an active forward carrier available to the company.Carrier ID returned by Get carriers.
warehouse_idintegerRequiredMust identify a warehouse owned by the company.Warehouse from which the carrier collects the shipment.
return_warehouse_idintegerOptionalMust identify a company warehouse when supplied.Destination for returned shipments; defaults to the pickup warehouse.
commentsstringOptionalNo 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.

POST/api/2001/CancelShipment

Request fields

FieldTypeRequirementValidationDescription
tracking_numberstringRequiredMust 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.

GET/api/2001/GetLabel?tracking_number=AWB123456789

Query parameters

FieldTypeRequirementValidationDescription
tracking_numberstringRequiredMust identify an existing shipment owned by the authenticated company.Carrier tracking or AWB number whose PDF label is required.
typestringOptionalPassed 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"
}