List All Suppliers
Retrieve a list of all suppliers in the system.
Endpoint
Response
Returns an array of supplier objects.
Array of supplier objectsUnique identifier for the supplier
Whether the supplier is currently active
Example Request
curl https://api.example.com/api/v1/suppliers
Example Response
[
{
"id": 1,
"name": "Premium Furniture Co.",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0100",
"isActive": true
},
{
"id": 2,
"name": "Modern Design Suppliers",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0200",
"isActive": true
},
{
"id": 3,
"name": "Classic Wood Inc.",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0300",
"isActive": false
}
]
Status Codes
200 OK - Successfully retrieved the list of suppliers
Retrieve suppliers with pagination support for better performance with large datasets.
Endpoint
GET /api/v1/suppliers/pagination
Query Parameters
Page number (zero-based index)
Number of suppliers to return per page
Response
Returns an array of supplier objects for the requested page.
Array of supplier objects for the specified pageUnique identifier for the supplier
Whether the supplier is currently active
Example Request
curl "https://api.example.com/api/v1/suppliers/pagination?page=0&pageSize=10"
Example Response
[
{
"id": 1,
"name": "Premium Furniture Co.",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0100",
"isActive": true
},
{
"id": 2,
"name": "Modern Design Suppliers",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0200",
"isActive": true
}
]
Status Codes
200 OK - Successfully retrieved the paginated list of suppliers
Get Active Suppliers Only
Retrieve only suppliers that are currently active.
Endpoint
GET /api/v1/suppliers/active
Response
Returns an array of active supplier objects.
Array of active supplier objectsUnique identifier for the supplier
Always true for this endpoint
Example Request
curl https://api.example.com/api/v1/suppliers/active
Example Response
[
{
"id": 1,
"name": "Premium Furniture Co.",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0100",
"isActive": true
},
{
"id": 2,
"name": "Modern Design Suppliers",
"contactEmail": "[email protected]",
"contactPhone": "+1-555-0200",
"isActive": true
}
]
Status Codes
200 OK - Successfully retrieved the list of active suppliers