Get All Suppliers
Retrieve a list of all suppliers with optional filtering and pagination.GET
Endpoint: /suppliers
Query Parameters
Search term to filter suppliers by name or contact
Filter by active status (true/false)
Page number for pagination
Number of suppliers per page
Response
Indicates if the request was successful
Array of supplier objects
Total number of suppliers
Response message
Create Supplier
Create a new supplier.POST
Endpoint: /suppliers
Request Body
Supplier’s business name (max 100 characters)
Description of the supplier (max 500 characters)
Primary contact person name (max 100 characters)
Supplier’s email address (valid email format)
Supplier’s phone number (max 20 characters)
Supplier’s physical address (max 500 characters)
Response
Indicates if the supplier was created successfully
Created supplier object
Success message
Update Supplier
Update an existing supplier’s information.PUT
Endpoint: /suppliers/{supplierId}
Path Parameters
Unique identifier of the supplier
Request Body
Updated supplier name (max 100 characters)
Updated description (max 500 characters)
Updated contact name (max 100 characters)
Updated email address
Updated phone number (max 20 characters)
Updated address (max 500 characters)
Updated active status
Response
Indicates if the supplier was updated successfully
Updated supplier object
Success message
Delete Supplier
Delete a supplier from the system.DELETE
Endpoint: /suppliers/{supplierId}
Path Parameters
Unique identifier of the supplier to delete
Response
Indicates if the supplier was deleted successfully
ID of the deleted supplier
Success message
Get Supplier Statistics
Retrieve detailed statistics for a specific supplier.GET
Endpoint: /suppliers/{supplierId}/stats
Path Parameters
Unique identifier of the supplier
Response
Indicates if the request was successful
Supplier details
Supplier statistics
Response message