---
updatedAt: 2025-10-04T19:39:52.000Z
agentTools:
  projectIndex: https://famasiafrica.readme.io/llms.txt
---

# Fetch customers for a provider

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Provider API",
    "version": "1.1.4",
    "description": "API for managing providers, including creation, authentication, token management, analytics, orders, and user management"
  },
  "servers": [
    {
      "url": "http://localhost:5000/api/v1/providers",
      "description": "Test server"
    },
    {
      "url": "https://dispensaryapitest.famasi.africa/api/v1/providers",
      "description": "DEV server"
    },
    {
      "url": "https://dispensaryapi.famasi.africa/api/v1/providers",
      "description": "Live Server"
    }
  ],
  "tags": [
    {
      "name": "Customer Management",
      "description": "Endpoints for managing customers"
    }
  ],
  "components": {
    "securitySchemes": {
      "providerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "dial_code": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "sex": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "paths": {
    "/customers": {
      "get": {
        "summary": "Fetch customers for a provider",
        "tags": [
          "Customer Management"
        ],
        "operationId": "fetchCustomers",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "description": "Start date for filtering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End date for filtering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Search query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "providerAuth": []
          }
        ]
      }
    }
  }
}
```