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

# Provider

> > 🚧 **Working in progress** — this endpoint is not live yet.

Registers a provider **under the clinic in your token**, so they can place orders under **their own NPI** instead of everything being attributed at the clinic level.

Duplicate rule mirrors [Create a patient](/api-reference/patients/create): re-registering an NPI that already exists in your clinic returns `409` carrying the existing `providerId`, so you reconcile instead of retrying.

> [!NOTE]
>
> 🚧 **Working in progress** — this endpoint is not live yet. Providers are set up in the Provider
> Portal today.

Registers a provider **under the clinic in your token**, so they can place orders under **their own
NPI** instead of everything being attributed at the clinic level.

## Duplicates return the existing provider

Re-registering an NPI that already exists in your clinic returns `409` **carrying the existing
`providerId`** — reconcile with that id instead of retrying. This mirrors
[Create a patient](https://developers.vibrant-wellness.com/api-reference/patients/create.md), which does the same with `patientId`.

## Then order under that NPI

[Place an order](https://developers.vibrant-wellness.com/api-reference/orders/place.md) takes an `orderingProviderId`. Once a provider is
registered, their orders carry their own identifier rather than the clinic's.


## OpenAPI

````yaml POST /providers
openapi: 3.1.0
info:
  title: Vibrant Wellness Portal API
  version: 2026-07-01-draft
  description: >-
    Order lab tests and retrieve results programmatically. Authenticate once
    with OAuth2 client credentials, browse the catalog, quote and
    eligibility-check an order, create patients, place orders, and pull results
    with their report status and issues.


    This reference documents the target external contract (v1).
  contact:
    name: Vibrant Wellness Developer Support
    email: portal-api@vibrant-wellness.com
    url: https://developers.vibrant-wellness.com
  license:
    name: Proprietary
servers:
  - url: https://api.vibrant-america.com/v1
    description: Production
  - url: https://api-sandbox.vibrant-america.com/v1
    description: Staging (sandbox)
security:
  - oauth2: []
tags:
  - name: Catalog
    description: Browse orderable tests and panels.
  - name: Pricing
    description: Get an authoritative price and eligibility check before ordering.
  - name: Patients
    description: Create patients.
  - name: Orders
    description: Place lab orders.
  - name: Reports
    description: Retrieve results, report status, and issues.
paths:
  /providers:
    post:
      tags:
        - Providers
      summary: Create a provider
      description: >-
        > 🚧 **Working in progress** — this endpoint is not live yet.


        Registers a provider **under the clinic in your token**, so they can
        place orders under **their own NPI** instead of everything being
        attributed at the clinic level.


        Duplicate rule mirrors [Create a
        patient](/api-reference/patients/create): re-registering an NPI that
        already exists in your clinic returns `409` carrying the existing
        `providerId`, so you reconcile instead of retrying.
      operationId: createProvider
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProviderRequest'
            example:
              npi: '1234567890'
              firstName: Alex
              lastName: Chen
              email: alex.chen@clinic.example
              licenseState: CA
              specialty: Functional Medicine
      responses:
        '201':
          description: Provider created under your clinic.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Provider'
              example:
                providerId: 4471
                npi: '1234567890'
                firstName: Alex
                lastName: Chen
                status: active
                clinicId: 88
                createdAt: '2026-07-14T10:04:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: >-
            A provider with this NPI already exists in your clinic — the
            existing `providerId` is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: duplicate_provider
                  message: A provider with this NPI already exists in your clinic.
                  details:
                    - providerId: 4471
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateProviderRequest:
      type: object
      required:
        - npi
        - firstName
        - lastName
      properties:
        npi:
          type: string
          description: >-
            The provider's own 10-digit National Provider Identifier. Unique
            within your clinic.
          example: '1234567890'
        firstName:
          type: string
          example: Alex
        lastName:
          type: string
          example: Chen
        email:
          type: string
          example: alex.chen@clinic.example
        phone:
          type: string
          example: 415-555-0143
        licenseState:
          type: string
          description: Two-letter state of the provider's medical license.
          example: CA
        licenseNumber:
          type: string
          example: A12345
        specialty:
          type: string
          example: Functional Medicine
    Provider:
      type: object
      properties:
        providerId:
          type: integer
          description: Vibrant's id for the provider.
          example: 4471
        npi:
          type: string
          example: '1234567890'
        firstName:
          type: string
          example: Alex
        lastName:
          type: string
          example: Chen
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        clinicId:
          type: integer
          description: The clinic the provider belongs to — taken from your token.
          example: 88
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      description: >-
        🚧 Working in progress — this envelope is the contract; not yet returned
        by every endpoint.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
              description: Human-readable explanation.
            requestId:
              type: string
              description: >-
                Identifier for this request. Include it when contacting support.
                Also returned on every response as the X-Request-Id header.
              example: req_01JQ8ZC5X9K2MN
            details:
              type: array
              items:
                type: object
                additionalProperties: true
              description: Optional structured context.
          required:
            - code
            - message
            - requestId
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: One or more testCodes were not recognized.
              requestId: req_01JQ8ZC5X9K2MN
              details:
                - unknownCodes:
                    - FOO_BAR
    Unauthorized:
      description: Not authenticated. See Authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Not authenticated.
              requestId: req_01JQ8ZC5X9K2MN
    InternalError:
      description: >-
        Something went wrong on our side. Safe to retry (idempotent endpoints:
        reuse the same placerId).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: Unexpected error.
              requestId: req_01JQ8ZC5X9K2MN
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 client credentials. Generate a client ID and client secret in the
        Portal, exchange them for an access token, then send `Authorization:
        Bearer <access_token>`. Request the `result` and `report` scopes to read
        results.
      flows:
        clientCredentials:
          tokenUrl: https://api.vibrant-america.com/v1/oauth2/token
          scopes:
            result: Read finalized lab results
            report: Read report status and issues

````

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