Suppliers
List Suppliers
Section titled “List Suppliers”Returns a list of suppliers configured for your account.
GET
/api/v1/suppliersQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | - | Filter suppliers by name (case-insensitive substring match). For example, name=acme matches “Acme Corp”, “ACME Supplies”, etc. |
Example Request
Section titled “Example Request”curl -X GET "https://api.prediko.io/api/v1/suppliers" \ -H "Authorization: Bearer YOUR_API_KEY"
# With name filtercurl -X GET "https://api.prediko.io/api/v1/suppliers?name=acme" \ -H "Authorization: Bearer YOUR_API_KEY"import requests
# All suppliersresponse = requests.get( "https://api.prediko.io/api/v1/suppliers", headers={"Authorization": "Bearer YOUR_API_KEY"})suppliers = response.json()
# With name filterresponse = requests.get( "https://api.prediko.io/api/v1/suppliers", headers={"Authorization": "Bearer YOUR_API_KEY"}, params={"name": "acme"})suppliers = response.json()const response = await fetch( "https://api.prediko.io/api/v1/suppliers", { headers: { "Authorization": "Bearer YOUR_API_KEY" } });const suppliers = await response.json();
// With name filterconst filtered = await fetch( "https://api.prediko.io/api/v1/suppliers?name=acme", { headers: { "Authorization": "Bearer YOUR_API_KEY" } });const filteredSuppliers = await filtered.json();Response
Section titled “Response”{ "data": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Acme Corp", "address": { "address1": "123 Supplier St", "address2": null, "city": "Shenzhen", "province": "Guangdong", "country": "CN", "zip": "518000" }, "lead_time": 14, "currency": "USD", "minimum_order_quantity": 100, "minimum_order_type": "units", "moqs": [ { "warehouse_name": "Main Warehouse", "minimum_order_quantity": 100, "minimum_order_type": "units" } ], "lead_times": [ { "warehouse_name": "Main Warehouse", "lead_time": 14 } ] }, { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "name": "Global Supplies Ltd", "address": { "address1": "456 Trade Ave", "address2": "Building B", "city": "London", "province": null, "country": "GB", "zip": "EC1A 1BB" }, "lead_time": 21, "currency": "GBP", "minimum_order_quantity": 500, "minimum_order_type": "currency", "moqs": [], "lead_times": [] } ], "total": 2}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
data | array | List of supplier objects |
total | integer | Total number of suppliers |
Supplier Object
Section titled “Supplier Object”| Field | Type | Description |
|---|---|---|
id | string | Unique supplier identifier (UUID) |
name | string | Supplier name (unique identifier) |
address | object | Address details (see Address Object below) |
lead_time | integer | Default lead time in days |
currency | string | Default currency for transactions |
minimum_order_quantity | number | Default minimum order quantity |
minimum_order_type | string | MOQ type: units or currency |
moqs | array | Warehouse-specific MOQs (see MOQ Object below) |
lead_times | array | Warehouse-specific lead times (see Lead Time Object below) |
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 |
country | string | Country code |
zip | string | Postal/ZIP code |
MOQ Object
Section titled “MOQ Object”| Field | Type | Description |
|---|---|---|
warehouse_name | string | Warehouse name |
minimum_order_quantity | number | Minimum order quantity for this warehouse |
minimum_order_type | string | MOQ type: units or currency |
Lead Time Object
Section titled “Lead Time Object”| Field | Type | Description |
|---|---|---|
warehouse_name | string | Warehouse name |
lead_time | integer | Lead time in days for this warehouse |
Error Responses
Section titled “Error Responses”| Status | Description |
|---|---|
| 401 | Invalid or missing API key |
| 500 | Internal server error |