> ## Documentation Index
> Fetch the complete documentation index at: https://api.vitarelay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List your providers

> Scope `customers:read`. Filter with `external_id` or `email`; page with `limit` (up to 100) and `cursor`.
Each provider carries its signup state, contact, address, consent, attribution, booking reference, last order and
`lifecycle_status` (`never_ordered`, `active`, `reorder_due`, `lapsed`).




## OpenAPI

````yaml /pharmacy-api/customers-openapi.yaml get /customers
openapi: 3.1.0
info:
  title: Pharmacy Customers API
  version: 1.0.0
  description: >
    Connect your CRM (GoHighLevel and similar) to your pharmacy's customers:
    send a provider when your CRM marks it as converted,

    get webhooks when its orders ship or deliver and when it needs a reorder,
    has lapsed or (for a partner rep) has gone

    dormant, and export your providers.


    **Authentication.** `Authorization: Bearer vr_live_...`. A key belongs to
    your pharmacy and carries `customers:read`

    and/or `customers:write` (create it under **Settings → API keys**). Test
    keys (`vr_test_...`) can read; their writes are

    acknowledged with `sandbox: true` and change nothing. Your pharmacy must
    have customers enabled.


    **Ids.** A customer's `id` is its VitaRelay organization id. `external_id`
    is your CRM's own id for the provider (the

    GoHighLevel contact id); sending the same `external_id` again updates the
    provider and never creates a second one.


    **Webhooks.** Subscribe with `POST /customers/webhooks`. Each request is
    signed:

    `X-Webhook-Signature: sha256=<hex HMAC-SHA256 of the exact request body,
    keyed with your endpoint secret>`, with

    `X-Webhook-Event`, `X-Webhook-Delivery` and `X-Webhook-Timestamp` headers.
    Delivery is at least once with exponential

    backoff for about a day; deduplicate on `X-Webhook-Delivery`. Events:
    `order.shipped`, `order.delivered`,

    `order.cancelled`, `customer.reorder_due`, `customer.lapsed`,
    `partner.dormant`. Use `POST /customers/webhooks/ping`

    to send yourself a test event.


    **Lifecycle windows** are days since a customer's last order (reorder due
    30, lapsed 60, partner dormant 90 by default;

    change them with `PUT /customers/settings`). Each event fires once per last
    order. Connecting a CRM does not send events

    for customers that are already past a window: read their `lifecycle_status`
    from `GET /customers`.
servers:
  - url: https://vitarelay.com/api/public/v1
    description: Production
security:
  - bearer: []
paths:
  /customers:
    get:
      summary: List your providers
      description: >
        Scope `customers:read`. Filter with `external_id` or `email`; page with
        `limit` (up to 100) and `cursor`.

        Each provider carries its signup state, contact, address, consent,
        attribution, booking reference, last order and

        `lifecycle_status` (`never_ordered`, `active`, `reorder_due`, `lapsed`).
      parameters:
        - name: external_id
          in: query
          schema:
            type: string
        - name: email
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: cursor
          in: query
          schema:
            type: string
      responses:
        '200':
          description: A page of providers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerList'
components:
  schemas:
    CustomerList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
        next_cursor:
          type: string
          nullable: true
    Customer:
      type: object
      properties:
        id:
          type: string
          format: uuid
        external_id:
          type: string
          nullable: true
        name:
          type: string
        kind:
          type: string
          enum:
            - practice
            - tele_clinic
        status:
          type: string
          enum:
            - invited
            - active
            - archived
        signup:
          type: object
          properties:
            status:
              type: string
              enum:
                - pending
                - accepted
            invite_emailed:
              type: boolean
        contact:
          type: object
        address:
          type: object
        prescribers:
          type: integer
        consent:
          type: object
        attribution:
          type: object
          nullable: true
        booking_ref:
          type: string
          nullable: true
        orders:
          type: object
          description: >-
            count, last_order_id, last_order_number, last_order_at,
            last_order_total_cents
        days_since_last_order:
          type: integer
          nullable: true
        lifecycle_status:
          type: string
          enum:
            - never_ordered
            - active
            - reorder_due
            - lapsed
        created_at:
          type: string
          format: date-time
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.