---
agentTools:
  projectIndex: https://pneumacare.readme.io/llms.txt
---

# Fetch a list of service providers

Fetch a list of all the service providers on the platform

[block:callout]
{
  "type": "warning",
  "title": "This endpoint is authenticated by the public API key"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "PneumaCare API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.pneumahealth.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "j72nw6niu527coanz7b8"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/services/providers": {
      "get": {
        "summary": "Fetch a list of service providers",
        "description": "Fetch a list of all the service providers on the platform",
        "operationId": "fetch-a-list-of-service-providers",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "ID of the service provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Type of service provided",
            "schema": {
              "type": "string",
              "enum": [
                "fitness_instructor",
                "ambulance",
                "dietician",
                "wellness",
                "adult_care"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"message\": \"Service providers retrieved successfully\",\n  \"data\": [\n    {\n      \"id\": \"dj8oivaf1ffqw6j\",\n      \"name\": \"Lukman Sanni\",\n      \"email\": \"service+testings@pneuma.care\",\n      \"phone\": \"09087645321\",\n      \"business_name\": \"Viva Gym\",\n      \"type\": \"dietitian\",\n      \"description\": \"Cool fitness instructor test update.\",\n      \"address\": {\n        \"street_line_one\": \"76, Olagunju Street\",\n        \"street_line_two\": \"Behind shawarma plaza\",\n        \"post_code\": \"900108\",\n        \"type\": \"office\",\n        \"city\": \"Ikeja\",\n        \"state\": \"Lagos\",\n        \"country\": \"Nigeria\"\n      },\n      \"website_url\": null,\n      \"created_at\": \"2021-11-19T11:10:12.000Z\",\n      \"updated_at\": \"2021-11-23T19:42:07.000Z\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Service providers retrieved successfully"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "dj8oivaf1ffqw6j"
                          },
                          "name": {
                            "type": "string",
                            "example": "Lukman Sanni"
                          },
                          "email": {
                            "type": "string",
                            "example": "service+testings@pneuma.care"
                          },
                          "phone": {
                            "type": "string",
                            "example": "09087645321"
                          },
                          "business_name": {
                            "type": "string",
                            "example": "Viva Gym"
                          },
                          "type": {
                            "type": "string",
                            "example": "dietitian"
                          },
                          "description": {
                            "type": "string",
                            "example": "Cool fitness instructor test update."
                          },
                          "address": {
                            "type": "object",
                            "properties": {
                              "street_line_one": {
                                "type": "string",
                                "example": "76, Olagunju Street"
                              },
                              "street_line_two": {
                                "type": "string",
                                "example": "Behind shawarma plaza"
                              },
                              "post_code": {
                                "type": "string",
                                "example": "900108"
                              },
                              "type": {
                                "type": "string",
                                "example": "office"
                              },
                              "city": {
                                "type": "string",
                                "example": "Ikeja"
                              },
                              "state": {
                                "type": "string",
                                "example": "Lagos"
                              },
                              "country": {
                                "type": "string",
                                "example": "Nigeria"
                              }
                            }
                          },
                          "website_url": {},
                          "created_at": {
                            "type": "string",
                            "example": "2021-11-19T11:10:12.000Z"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2021-11-23T19:42:07.000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "61332d511b787e0026bea8d5:6198a0c82b60d9003f18c8f3"
}
```