Warehouses
POST
/v1/warehousesCreate a warehouse
The validation here is the courier's, not ours: Delhivery rejects a name under three characters and a sparse address, and a warehouse that passes here but fails there is one no courier will collect from.
Set is_return_same truthy to mirror the forward address onto the return leg; otherwise every return_* field is required and validated the same way. Creating a warehouse also adopts any orders that arrived before you had one.
Refused for
merchant_finance · merchant_support · merchant_staff — these are read-only roles, and the refusal happens before the handler runs.Request body
| Field | Type | Description |
|---|---|---|
| warehouse_namerequired | string | Unique to you. 3–191 characters. |
| contact_person_namerequired | string | Who the courier asks for. |
| contact_norequired | string | Collection contact. Must match ^\d{10}$. |
| address_line_1required | string | Street address. |
| cityrequired | string | City. |
| staterequired | string | State. |
| pincoderequired | string | Pickup pincode. Must match ^\d{6}$. |
| contact_email | string | Optional, validated when present. |
| gstin | string | GSTIN for the state the goods are stocked in. Must match ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$. |
| warehouse_type | string | Defaults to fulfillment_pickup. One of fulfillment_pickup · pickup · fulfillment. |
| is_return_same | boolean | Mirror the forward address onto the return leg. |
Responses
| Status | Meaning |
|---|---|
| 201 | {data:{id, orders_repaired}} — orders_repaired is how many stranded orders were adopted. |
400validation_failed | details names every failure; return-leg messages are prefixed return_. |