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

# Fetch a list of laboratories

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

[block:callout]
{
  "type": "info",
  "title": "Response codes",
  "body": "200: Laboratories retrieved successfully\n500: Internal server error"
}
[/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": {
    "/diagnostics/laboratories": {
      "get": {
        "summary": "Fetch a list of laboratories",
        "description": "",
        "operationId": "get-the-list-of-laboratories",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "ID of the lab",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "imaging",
            "in": "query",
            "description": "Fetch only labs with imaging capability",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "investigations",
            "in": "query",
            "description": "ID of the investigations of interest",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"message\": \"Laboratories retrieved successfully\",\n  \"data\": [\n    {\n      \"id\": \"r86swhlozx2h10q\",\n      \"name\": \"Active Medicals 2\",\n      \"rating\": 0,\n      \"imaging\": false,\n      \"phone\": \"08141128249\",\n      \"email\": \"johndamilola03+15@gmail.com\",\n      \"address\": {\n        \"street_line_one\": \"FUTA, Akure, Ondo State\",\n        \"street_line_two\": null,\n        \"city\": \"Akure\",\n        \"state\": \"Ondo\",\n        \"country\": \"Nigeria\"\n      }\n    },\n    {\n      \"id\": \"y3y1gbgvbzku5s0\",\n      \"name\": \"Biomedical Laboratory\",\n      \"rating\": 0,\n      \"imaging\": true,\n      \"phone\": \"09087654321\",\n      \"email\": \"service+labs@pneuma.care\",\n      \"address\": {\n        \"street_line_one\": \"39, Central Business District\",\n        \"street_line_two\": \"Bisau street\",\n        \"city\": \"Ikeja\",\n        \"state\": \"Lagos\",\n        \"country\": \"Nigeria\"\n      }\n    },\n    {\n      \"id\": \"u1jimm7lma4a6qt\",\n      \"name\": \"Apple Heights\",\n      \"rating\": 0,\n      \"imaging\": true,\n      \"phone\": \"08090999932\",\n      \"email\": \"johndamilola03+14@gmail.com\",\n      \"address\": {\n        \"street_line_one\": \"FUTA, Akure, Ondo State\",\n        \"street_line_two\": null,\n        \"city\": \"Akure\",\n        \"state\": \"Ondo\",\n        \"country\": \"Nigeria\"\n      }\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Laboratories retrieved successfully"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "r86swhlozx2h10q"
                          },
                          "name": {
                            "type": "string",
                            "example": "Active Medicals 2"
                          },
                          "rating": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "imaging": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "phone": {
                            "type": "string",
                            "example": "08141128249"
                          },
                          "email": {
                            "type": "string",
                            "example": "johndamilola03+15@gmail.com"
                          },
                          "address": {
                            "type": "object",
                            "properties": {
                              "street_line_one": {
                                "type": "string",
                                "example": "FUTA, Akure, Ondo State"
                              },
                              "street_line_two": {},
                              "city": {
                                "type": "string",
                                "example": "Akure"
                              },
                              "state": {
                                "type": "string",
                                "example": "Ondo"
                              },
                              "country": {
                                "type": "string",
                                "example": "Nigeria"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "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:6133ecdc6e0ab500714a3401"
}
```