> ## 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.

# Replace an invite's product list

> Replaces the invite's own product list (`pricing.products`). On a **pending** invite it changes what the practice gets when it signs up. On an **accepted** invite it is applied to the practice's account right away, so it then sees only this list at these prices; this is how a list reaches a practice that already joined. Prices cannot be below VitaRelay's price. Needs `invites:write` and "set my own pricing" enabled on your account. `409 invite_expired` for an expired invite.



## OpenAPI

````yaml /partner-api/openapi.yaml patch /invites/{id}
openapi: 3.1.0
info:
  title: VitaRelay Partner API
  version: 1.0.0
  description: >-
    The Partner API is for rep organizations (a Vita Rep, or a dual Rep + Clinic
    account) that recruit clinics and other reps. Create the invite you would
    otherwise send from the "Refer a Tele Clinic" form, get the signup link
    back, track whether it was accepted, and revoke it.
servers:
  - url: https://vitarelay.com/api/public/partner/v1
security:
  - bearerAuth: []
tags:
  - name: Wholesale
    description: >-
      Order research-use products for your own customers at VitaRelay's
      wholesale price, charged to your card on file. You show your own prices
      and collect from your customer yourself. Rep accounts only.
  - name: Store
    description: >-
      Sell research-use products to your own customers from your own landing
      page, using VitaRelay for fulfillment and payment processing. Customers
      are not patients: no patient, intake or prescription is created. Rep
      accounts only. Needs `store:read` / `store:write`.
  - name: Invites
    description: Clinic and rep invites sent by your organization.
  - name: Network
    description: Read the orders of the accounts in your network. Rep accounts only.
paths:
  /invites/{id}:
    patch:
      tags:
        - Invites
      summary: Replace an invite's product list
      description: >-
        Replaces the invite's own product list (`pricing.products`). On a
        **pending** invite it changes what the practice gets when it signs up.
        On an **accepted** invite it is applied to the practice's account right
        away, so it then sees only this list at these prices; this is how a list
        reaches a practice that already joined. Prices cannot be below
        VitaRelay's price. Needs `invites:write` and "set my own pricing"
        enabled on your account. `409 invite_expired` for an expired invite.
      operationId: updateInvite
      parameters:
        - $ref: '#/components/parameters/InviteId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - pricing
              properties:
                pricing:
                  type: object
                  additionalProperties: false
                  required:
                    - products
                  properties:
                    products:
                      type: array
                      minItems: 1
                      maxItems: 2000
                      items:
                        type: object
                        additionalProperties: false
                        required:
                          - product_id
                          - price_cents
                        properties:
                          product_id:
                            type: string
                            format: uuid
                          price_cents:
                            type: integer
                            minimum: 1
      responses:
        '200':
          description: The invite with its new list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Invite'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/InviteNotFound'
        '409':
          description: '`invite_expired`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: '`validation_failed`, `product_unavailable` or `price_below_cost`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    InviteId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Invite:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - clinic
            - practice
            - pharmacy
            - rep
        status:
          type: string
          enum:
            - pending
            - accepted
            - expired
        prefilled:
          type: boolean
          description: >-
            True when the invite carries `practice` details that fill in the
            sign-up form.
        crm:
          type: object
          nullable: true
          description: >-
            The CRM facts sent when the invite was created (`consent`,
            `attribution`, `booking_ref`), or `null`.
        invite_code:
          type: string
        invite_url:
          type: string
          description: The signup link, on your own branded domain when you have one.
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        product_types:
          type: array
          nullable: true
          items:
            type: string
        external_invite_id:
          type: string
          nullable: true
          description: >-
            The id you sent when you created the invite. Returned on create, on
            a retry, and on every later read (`GET /invites`, `GET
            /invites/{id}`, revoke). `null` for an invite created without one.
        accepted_org_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            The organization id of the account that accepted the invite. `null`
            until it is accepted. It matches `account.id` on `GET
            /network/orders`.
        accepted_at:
          type: string
          format: date-time
          nullable: true
        account_status:
          type: string
          nullable: true
          enum:
            - pending
            - approved
            - rejected
            - suspended
          description: >-
            Whether VitaRelay has approved the account that accepted the invite.
            `null` until it is accepted. A webhook (`practice.approved` /
            `practice.rejected`) is sent when it changes.
        on_behalf_of:
          type: string
          format: uuid
          nullable: true
          description: >-
            The Rep Partner the invite was made for, or `null` when it is your
            own.
        pricing:
          type: object
          description: >-
            How the invited account will be priced. `mode` is `commission`
            (standard) or `own` (your markup, with the category and per-product
            markups you set).
          properties:
            mode:
              type: string
              enum:
                - commission
                - own
            category_markup_pct:
              type: object
              additionalProperties:
                type: number
            product_markups:
              type: object
              additionalProperties: true
        expires_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  responses:
    Forbidden:
      description: >-
        `insufficient_scope` (the key lacks the scope) or `not_available` (your
        organization is not a rep or dual Rep + Clinic account).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InviteNotFound:
      description: >-
        `invite_not_found` — no invite with that id belongs to your
        organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        VitaRelay API key (`vr_live_...` or `vr_test_...`) with the `invites:*`
        scopes.

````

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