Suppliers Management
4 API calls in this section.
List Suppliers
/warehousing/suppliersRetrieves a paginated list of suppliers with optional filtering by name and supplier type.
User must have 'view:tenant', 'manage:operations:tenant' permission, or be a system admin
Response
Returns a paginated list of suppliers with their details
Includes related tenant user information
Provides filter options for supplier types
Includes pagination metadata (total count, current page, limit)
Pagination applies the requested or default sort followed by a unique ID tie-breaker, so tied values do not overlap between export pages. Export requests may send include_stats=false to skip unused summary queries and omit stats; the default remains true. Row fields, filters, and filtered totals are unchanged.
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
nameOptional | string | Filter suppliers by name (optional) Filter suppliers by name (partial match) |
supplier_typeOptional | string | Filter by supplier type ( |
pageOptional | string | Page number for pagination (optional, default: 1) Page number for pagination (default: 1) Example: |
limitOptional | string | Number of records per page (optional, default: 20) Number of records per page (default: 20) Example: |
include_statsOptional | string | Set false for table exports to skip summary statistics (default true). Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/warehousing/suppliers?tenant_id=${TENANT_ID}&name=&supplier_type=&page=1&limit=20" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json"Response examples
1{2 "success": true,3 "message": "Suppliers retrieved successfully",4 "suppliers": [5 {6 "id": "supplier-uuid-1",7 "tenant_id": "tenant-uuid",8 "name": "ABC Manufacturing",9 "tenant_user_id": "tenant-user-uuid-1",10 "supplier_type": "manufacturer",11 "tenant_user": {12 "id": "tenant-user-uuid-1",13 "user_id": {14 "first_name": "John",15 "last_name": "Doe",16 "email": "john.doe@example.com"17 }18 }19 },20 {21 "id": "supplier-uuid-2",22 "tenant_id": "tenant-uuid",23 "name": "XYZ Distributors",24 "tenant_user_id": "tenant-user-uuid-2",25 "supplier_type": "distributor",26 "tenant_user": {27 "id": "tenant-user-uuid-2",28 "user_id": {29 "first_name": "Jane",30 "last_name": "Smith",31 "email": "jane.smith@example.com"32 }33 }34 }35 ],36 "stats": {37 "total": 2,38 "distributor": 1,39 "manufacturer": 1,40 "wholesaler": 041 },42 "filter_options": {43 "supplier_types": [44 "manufacturer",45 "distributor",46 "wholesaler"47 ]48 },49 "page": 1,50 "limit": 20,51 "total": 252}Create Supplier
/warehousing/suppliersCreates a new supplier with the specified name, tenant user, and supplier type.
User must have 'manage:operations:tenant' permission or be a system admin
Business Rules
All fields are required
Tenant user must exist and belong to the specified tenant
The operation creates a new supplier record in the system
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | string | — |
tenant_user_id | string | — |
supplier_type | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/warehousing/suppliers?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": "New Supplier Inc.",6 "tenant_user_id": "{{tenant_user_id}}",7 "supplier_type": "manufacturer"8}'Replace {{placeholders}} with your own values before sending.
Other request examples (1)
1{2 "name": "string", // required - Name of the supplier3 "tenant_user_id": "uuid", // required - UUID of the tenant user associated with this supplier4 "supplier_type": "string" // required - Type of supplier (e.g., "manufacturer", "distributor", "wholesaler")5}Response examples
1{2 "success": true,3 "message": "Supplier created successfully",4 "supplier": {5 "id": "supplier-uuid-new",6 "tenant_id": "tenant-uuid",7 "name": "New Supplier Inc.",8 "tenant_user_id": "tenant-user-uuid",9 "supplier_type": "manufacturer",10 "tenant_user": {11 "id": "tenant-user-uuid",12 "user_id": {13 "first_name": "John",14 "last_name": "Doe",15 "email": "john.doe@example.com"16 }17 }18 }19}Get Supplier
/warehousing/suppliers/:idRetrieves detailed information about a specific supplier, including associated tenant user details.
User must have 'view:tenant', 'manage:operations:tenant' permission, or be a system admin
Response
Returns complete supplier information
Includes related tenant user details
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | UUID of the supplier to retrieve (required) Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/warehousing/suppliers/${ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json"Response examples
1{2 "success": true,3 "message": "Supplier retrieved successfully",4 "supplier": {5 "id": "supplier-uuid-1",6 "tenant_id": "tenant-uuid",7 "name": "ABC Manufacturing",8 "tenant_user_id": "tenant-user-uuid-1",9 "supplier_type": "manufacturer",10 "tenant_user": {11 "id": "tenant-user-uuid-1",12 "user_id": {13 "first_name": "John",14 "last_name": "Doe",15 "email": "john.doe@example.com"16 }17 }18 }19}Update Supplier
/warehousing/suppliers/:idUpdates an existing supplier with new information provided in the request body.
User must have 'manage:operations:tenant' permission or be a system admin
Business Rules
At least one field must be provided for update
If
tenant_user_idis provided, it must be a valid tenant user belonging to the tenantOnly provided fields will be updated
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | UUID of the supplier to update (required) Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | string | — |
tenant_user_id | string | — |
supplier_type | string | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/warehousing/suppliers/${ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": "Updated Supplier Name",6 "tenant_user_id": "{{tenant_user_id}}",7 "supplier_type": "distributor"8}'Replace {{placeholders}} with your own values before sending.
Other request examples (1)
1{2 "name": "string", // optional - New name for the supplier3 "tenant_user_id": "uuid", // optional - New tenant user UUID4 "supplier_type": "string" // optional - New supplier type5}Response examples
1{2 "success": true,3 "message": "Supplier updated successfully",4 "supplier": {5 "id": "supplier-uuid-1",6 "tenant_id": "tenant-uuid",7 "name": "Updated Supplier Name",8 "tenant_user_id": "tenant-user-uuid-2",9 "supplier_type": "distributor",10 "tenant_user": {11 "id": "tenant-user-uuid-2",12 "user_id": {13 "first_name": "Jane",14 "last_name": "Smith",15 "email": "jane.smith@example.com"16 }17 }18 }19}