Skip to main content

What is the Partner API?

The Partner API is for rep organizations — a Vita Rep, or a dual Rep + Clinic account — that recruit clinics and other reps. It does what the Refer a Tele Clinic form in the app does, but from your own system: create an invite, get the signup link back, check whether it was accepted, and revoke it. It is separate from the VitaClinic API, which is for a clinic placing orders and managing its patients. Every endpoint here lives only at /api/public/partner/v1: nothing is duplicated in the VitaClinic API.
Base URL: https://vitarelay.com/api/public/partner/v1. The old /api/public/rep/v1 path, and the invite paths that used to be under /api/public/v1, redirect here (307). Any other /api/public/partner/v1/... path still redirects to the VitaClinic API at /api/public/v1. Authenticate with a Bearer API key. Test keys (vr_test_…) run in a sandbox: nothing is created and no email is sent.

How it works

1

Get an API key

Ask VitaRelay for a key with invites:write (to create and revoke invites) and invites:read (to list and fetch them). See API keys. Your organization must be a rep or a dual Rep + Clinic account; any other organization gets 403 not_available.
2

Create an invite

POST /invites with the prospect’s details. The response includes an invite_url, which opens the signup page for that invite on your own branded domain when you have one. By default the invite is also emailed to the prospect.
3

The prospect signs up

They open the link and register as the kind of organization you invited (Tele Clinic, practice, pharmacy or Rep Partner). They join your network, and you earn commission on their orders as usual.
4

Track it

GET /invites or GET /invites/{id} shows whether each invite is pending, accepted or expired. POST /invites/{id}/revoke cancels one that has not been used.

Create an invite

Invites created through the API use your standard commission pricing. Setting your own per-clinic pricing is done in the dashboard. An invite link is valid for 5 days; after that its status is expired and you can create a new one.

Retries are safe

Send an external_invite_id and repeat the same request after a timeout: you get the same invite back (200), not a second one. Reusing an external_invite_id with a different body returns 409 duplicate_request. A request that failed creates nothing, so its id can be reused.

List, fetch and revoke

  • GET /invites — your invites, newest first. Filter with ?type=clinic|practice|pharmacy|rep and ?status=pending|accepted|expired, page with ?limit= (max 100) and ?cursor= (use next_cursor from the previous page).
  • GET /invites/{id} — one invite.
  • POST /invites/{id}/revoke — cancels a pending invite so the link stops working. Revoking an invite that is already revoked is fine and returns it unchanged. An accepted invite cannot be revoked (409 invite_already_accepted).
An invite you did not create — or that does not exist — returns 404 invite_not_found; you can never see another organization’s invites.

Access and scopes

Errors

Errors use the same shape as the rest of the platform: { "error": { "code": "…", "message": "…" } }.

Sell to your own customers (store)

Run your own landing page and let VitaRelay do fulfillment, payment processing and shipping. This is for research-use (R&D) products sold to customers, not patients: no patient, intake or prescription is created. You set the price your customers pay; the difference between your price and VitaRelay’s price is yours (your_markup_cents on each order). 503A and 503B products need a patient and a prescriber, so they stay on the VitaClinic API.
1

See what you can sell

GET /store/catalog lists every R&D product with VitaRelay’s price (base_price_cents), your current price (price_cents) and the shipping methods. Your store is created the first time you call any store endpoint; it stays private unless you publish it in the app.
2

Set your prices

PUT /store/products/{product_id} with price_cents (the exact price, never below VitaRelay’s), or markup_percent / markup_flat_cents, and listed: true. Show your customers price_cents.
3

Take the card on your page

GET /store/checkout-config returns the Accept.js keys. Load Accept.js from accept_js_url and turn the card into a single-use token in the customer’s browser.
4

Create the order

POST /store/orders with items, customer, shipping_address, the buyer’s attestation (21+, research use only, terms accepted) and your external_order_id. The order is unpaid and the response has the total.
5

Charge it

POST /store/orders/{id}/pay with the Accept.js token as opaque_data and the card’s billing details. On success VitaRelay fulfills and ships. A declined card returns 402 card_declined; the customer can retry on the same order.
6

Track it

GET /store/orders/{id} for status and payment, or GET /store/orders for the list.
Scopes: store:read (catalog and orders) and store:write (prices, orders, payment, checkout config). Store endpoints are for rep accounts and need the storefront enabled for your account; otherwise they return 403 not_available or 403 store_not_available. Test keys simulate everything and create nothing.