Supplier API
The Supplier API provides endpoints for managing suppliers and their relations to stores, groups, addresses, and contacts.All Supplier API endpoints require authentication and a valid
x-store-id header to identify the store context, unless stated otherwise.Overview
Suppliers can be:- Linked to one or more stores
- Assigned to one or more supplier groups
- Created with optional address and contact information
- Assigned or updated with a default price list
- Filtered and sorted by various criteria
- Retrieved in paginated lists
- Deleted individually or in bulk
Endpoint Details
Base URL:/suppliersContent-Type:
application/json
Required Headers
Get Suppliers
GET/suppliers
Retrieve a paginated list of suppliers linked to the store that the authenticated user has access to.
Requires Authentication: Bearer token in Authorization header
Required Headers
Query Parameters
Success Response
Status Code:200 OK
Response Fields
Supplier Object
Address
Contact
Pagination Object
Possible Errors
Example Requests
Get all suppliers with default pagination:Get Supplier by ID
GET/suppliers/:id
Retrieve a single supplier by ID. The supplier must be linked to the current store.
Requires Authentication: Bearer token in Authorization header
Required Headers
Path Parameters
Success Response
Status Code:200 OK
Possible Errors
Example Request
Create Supplier
POST/suppliers
Create a new supplier and link it to the current store. You can optionally assign supplier groups, a default price list, address, and contact information.
Requires Authentication: Bearer token in Authorization header
Required Headers
Request Body
Request Body Fields
AddressInput
ContactInput
Success Response
Status Code:200 OK
Possible Errors
Example Request
Update Supplier
PUT/suppliers/:id
Update an existing supplier. You may update core fields, default price list, address, and contact. If address/contact do not exist, they will be created.
Requires Authentication: Bearer token in Authorization header
Required Headers
Path Parameters
Request Body
Request Body Fields
Success Response
Status Code:200 OK
Returns the updated Supplier object (same shape as in “Get Supplier by ID”).
Possible Errors
Example Request
Delete Supplier
DELETE/suppliers/:id
Delete a supplier by ID.
Path Parameters
Success Response
Status Code:200 OK
Possible Errors
Example Request
Bulk Delete Suppliers
DELETE/suppliers
Delete multiple suppliers by IDs in a single request.
Requires Authentication: Bearer token in Authorization header
Required Headers
Request Body
Request Body Fields
Success Response
Status Code:200 OK
Possible Errors
Example Request
Data Models
SupplierResponseDto
PaginationDto
PaginatedSuppliersResponseDto
Summary
Security & Validation
- All routes require a valid
x-store-idheader (except single delete which still requires auth) - User must have an active relation with the store to access its suppliers
- Pagination limits should be respected (max 100 per page)
- SortBy must be one of:
name,isActive,updatedAt,createdAt - SortOrder must be either
ascordesc idsin bulk delete must be valid UUIDs- Price list and supplier group IDs must exist when provided