Skip to content

Suppliers

Returns a list of suppliers configured for your account.

GET/api/v1/suppliers
Parameter Type Default Description
name string - Filter suppliers by name (case-insensitive substring match). For example, name=acme matches “Acme Corp”, “ACME Supplies”, etc.
Terminal window
curl -X GET "https://api.prediko.io/api/v1/suppliers" \
-H "Authorization: Bearer YOUR_API_KEY"
# With name filter
curl -X GET "https://api.prediko.io/api/v1/suppliers?name=acme" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Acme Corp",
"emails": ["contact@acmecorp.com"],
"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": "QUANTITY",
"moqs": [
{
"warehouse_name": "Main Warehouse",
"minimum_order_quantity": 100,
"minimum_order_type": "QUANTITY"
}
],
"lead_times": [
{
"warehouse_name": "Main Warehouse",
"lead_time": 14
}
]
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Global Supplies Ltd",
"emails": null,
"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": "VALUE",
"moqs": [],
"lead_times": []
}
],
"total": 2
}
Field Type Description
data array List of supplier objects
total integer Total number of suppliers
Field Type Description
id string Unique supplier identifier (UUID)
name string Supplier name (unique identifier)
emails array Supplier contact emails (may be null if not configured in the Prediko app)
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: QUANTITY (units) or VALUE (order value)
moqs array Warehouse-specific MOQs (see MOQ Object below)
lead_times array Warehouse-specific lead times (see Lead Time Object below)
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
Field Type Description
warehouse_name string Warehouse name
minimum_order_quantity number Minimum order quantity for this warehouse
minimum_order_type string MOQ type: QUANTITY (units) or VALUE (order value)
Field Type Description
warehouse_name string Warehouse name
lead_time integer Lead time in days for this warehouse
Status Description
401 Invalid or missing API key
500 Internal server error

Creates a supplier.

POST/api/v1/suppliers
Field Type Required Description
name string yes Supplier name. Must be unique (case-insensitive)
emails string[] no Contact emails
address object no number, line1, city, zip_code, province, country (all optional)
currency string no ISO 4217 code, e.g. USD
lead_time integer no Default lead time in days
minimum_order_quantity integer no MOQ
minimum_order_type string no QUANTITY (units) or VALUE (order value)
notes string no Free-text notes
Terminal window
curl -X POST "https://api.prediko.io/api/v1/suppliers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Distribution",
"emails": ["orders@acme.com"],
"currency": "USD",
"lead_time": 14,
"minimum_order_quantity": 100,
"minimum_order_type": "QUANTITY"
}'

201 Created with the supplier object (see Supplier Object), including its id.

Status Description
409 A supplier with the same name already exists. Nothing is created
422 Invalid body (for example an unknown currency)

To link SKUs to the new supplier, use patch.supplier_id on Update SKUs.

Updates a supplier. Omitted fields are left untouched; at least one field must be supplied.

PATCH/api/v1/suppliers/{supplier_id}

The body takes the same fields as Create Supplier, all optional. address is merged field by field.

Terminal window
curl -X PATCH "https://api.prediko.io/api/v1/suppliers/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"lead_time": 21}'

Returns the updated supplier. 404 if the supplier does not exist, 409 if the new name is taken.