Skip to content

Shiprocket orders ​

ShiprocketClient exposes order creation, listing, lookup, and cancellation methods. Each method returns the parsed Shiprocket response.

Methods ​

MethodReturns
createOrder(payload)OrderResponse
listOrders(page = 1, perPage = 20)PaginatedResponse<OrderResponse>
getOrder(orderId)OrderResponse
cancelOrders(ids){ message: string }

createOrder(payload) ​

Sends an ad hoc order to Shiprocket's orders/create/adhoc endpoint.

FieldTypeRequiredNotes
order_idstringyesYour order reference
order_datestringyesYYYY-MM-DD HH:mm
pickup_locationstringyesRegistered pickup location
billing_customer_namestringyesCustomer name
billing_addressstringyesBilling address
billing_citystringyesBilling city
billing_pincodestringyesBilling pincode
billing_statestringyesBilling state
billing_countrystringyesBilling country
billing_emailstringyesBilling email
billing_phonestringyesBilling phone
shipping_is_billingbooleanyesReuse billing details for shipping
order_itemsOrderItem[]yesName, SKU, units, and selling price
payment_method"prepaid" | "COD"yesUse the exact casing shown
sub_totalnumberyesOrder subtotal
length / breadth / height / weightnumberyesPackage dimensions and weight
ts
const order = await sdk.createOrder({
  order_id: "ORD-001",
  order_date: "2026-01-01 10:00",
  pickup_location: "Primary",
  billing_customer_name: "John",
  billing_address: "123 Street",
  billing_city: "Mumbai",
  billing_pincode: "400001",
  billing_state: "Maharashtra",
  billing_country: "India",
  billing_email: "john@example.com",
  billing_phone: "9999999999",
  shipping_is_billing: true,
  order_items: [{ name: "Item", sku: "SKU1", units: 1, selling_price: 500 }],
  payment_method: "prepaid",
  sub_total: 500,
  length: 10,
  breadth: 10,
  height: 10,
  weight: 0.5,
});

listOrders(page, perPage) ​

Returns data plus meta.pagination with total, count, per_page, current_page, and total_pages.

getOrder(orderId) and cancelOrders(ids) ​

getOrder takes a numeric order id. cancelOrders accepts an array of numeric order ids and returns a message from Shiprocket.

See Create order example and the orders guide for the full flow.