Skip to main content

List All Suppliers

Retrieve a list of all suppliers in the system.

Endpoint

GET /api/v1/suppliers

Response

Returns an array of supplier objects.
suppliers
array
Array of supplier objects
id
integer
required
Unique identifier for the supplier
name
string
required
Name of the supplier
contactEmail
string
required
Contact email address
contactPhone
string
required
Contact phone number
isActive
boolean
required
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

List Suppliers with Pagination

Retrieve suppliers with pagination support for better performance with large datasets.

Endpoint

GET /api/v1/suppliers/pagination

Query Parameters

page
integer
default:"0"
Page number (zero-based index)
pageSize
integer
default:"10"
Number of suppliers to return per page

Response

Returns an array of supplier objects for the requested page.
suppliers
array
Array of supplier objects for the specified page
id
integer
required
Unique identifier for the supplier
name
string
required
Name of the supplier
contactEmail
string
required
Contact email address
contactPhone
string
required
Contact phone number
isActive
boolean
required
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.
suppliers
array
Array of active supplier objects
id
integer
required
Unique identifier for the supplier
name
string
required
Name of the supplier
contactEmail
string
required
Contact email address
contactPhone
string
required
Contact phone number
isActive
boolean
required
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

Build docs developers (and LLMs) love