Warehouses
List Warehouses
Section titled “List Warehouses”Returns a list of active warehouses configured for your account.
GET
/api/v1/warehousesQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
include_raw_material | boolean | true | Include raw material warehouses |
Example Request
Section titled “Example Request”curl -X GET "https://api.prediko.io/api/v1/warehouses" \ -H "Authorization: Bearer YOUR_API_KEY"import requests
response = requests.get( "https://api.prediko.io/api/v1/warehouses", headers={"Authorization": "Bearer YOUR_API_KEY"})warehouses = response.json()const response = await fetch( "https://api.prediko.io/api/v1/warehouses", { headers: { "Authorization": "Bearer YOUR_API_KEY" } });const warehouses = await response.json();Response
Section titled “Response”{ "data": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Main Warehouse", "active": true, "address": { "address1": "123 Warehouse Blvd", "address2": null, "city": "Los Angeles", "province": "CA", "country": "US", "zip": "90001" }, "store_name": "My Store", "is_combined": false, "child_warehouses": [] }, { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "name": "Combined Warehouse", "active": true, "address": { "address1": "456 Distribution Dr", "address2": "Suite 100", "city": "New York", "province": "NY", "country": "US", "zip": "10001" }, "store_name": "My Store", "is_combined": true, "child_warehouses": ["East Warehouse", "West Warehouse"] } ], "total": 2}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
data | array | List of warehouse objects |
total | integer | Total number of warehouses |
Warehouse Object
Section titled “Warehouse Object”| Field | Type | Description |
|---|---|---|
id | string | Unique warehouse identifier (UUID) |
name | string | Warehouse name (unique identifier) |
active | boolean | Whether the warehouse is active |
address | object | Address details (see Address Object below) |
store_name | string | Associated store name |
is_combined | boolean | Whether this is a combined warehouse |
child_warehouses | array | List of child warehouse names (if combined) |
Address Object
Section titled “Address Object”| Field | Type | Description |
|---|---|---|
address1 | string | Primary address line |
address2 | string | Secondary address line |
city | string | City name |
province | string | State/province code |
country | string | Country code |
zip | string | Postal/ZIP code |
Filtering Examples
Section titled “Filtering Examples”Exclude raw material warehouses
Section titled “Exclude raw material warehouses”curl -X GET "https://api.prediko.io/api/v1/warehouses?include_raw_material=false" \ -H "Authorization: Bearer YOUR_API_KEY"Error Responses
Section titled “Error Responses”| Status | Description |
|---|---|
| 401 | Invalid or missing API key |
| 500 | Internal server error |