Retrieve Test Providers
GET /api/v1/test-providers
Description
Retrieves a list of all test providers registered in the system. This endpoint is used to obtain detailed information about each provider, including their names, descriptions, and addresses, which can be essential for managing testing services across different products or industries.
Example Request:
curl -G "http://[base_url]/api/v1/test-providers" \
-H "Authorization: Bearer [access_token]"
Responses:
- 200 OK: Successfully retrieved the list of test providers. The response includes detailed information about each test provider.
Example Response:
{
"providers": [
{
"providerId": "123",
"name": "Quality Labs",
"description": "Provides comprehensive and accredited quality testing for agricultural products.",
"address": "123 Lab Street, Metro City"
},
{
"providerId": "456",
"name": "Safety Check Inc.",
"description": "Specializes in safety and compliance testing for industrial products.",
"address": "456 Safety Blvd, Industrial Park"
}
]
}
Error Responses:
- 400 Bad Request: Incorrect request format.
- 404 Not Found: No test providers found in the system.
- 403 Forbidden: The user does not have permission to view the list of test providers.
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/test-providers \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!