Skip to main content

Warehouses

client.warehouses

Warehouses (also called pickup locations) are the origin addresses for your shipments. The pickup_location field in order creation must match an existing warehouse name.

create(params)

Create a new warehouse/pickup location.

Parameters

NameTypeRequiredDescription
namestringYesUnique warehouse name
addressstringYesAddress line 1
citystringYesCity
statestringYesState
countrystringYesCountry (e.g. "India")
pinstringYesPincode
phonestringYesContact phone
address2stringNoAddress line 2
emailstringNoContact email
return_addressstringNoReturn address (if different)
return_citystringNoReturn city
return_pinstringNoReturn pincode
gst_nostringNoGSTIN

Example

const result = await client.warehouses.create({
name: "Mumbai Warehouse",
address: "Plot 7, Andheri Industrial Estate",
city: "Mumbai",
state: "Maharashtra",
country: "India",
pin: "400093",
phone: "9876543210",
email: "ops@example.com",
});

console.log("Warehouse created:", result.status);

update(params)

Update an existing warehouse by name. Only pass the fields you want to change.

await client.warehouses.update({
name: "Mumbai Warehouse",
phone: "9999999999",
email: "newops@example.com",
});