curl --request GET \
--url https://vitarelay.com/api/public/partner/v1/network/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://vitarelay.com/api/public/partner/v1/network/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vitarelay.com/api/public/partner/v1/network/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vitarelay.com/api/public/partner/v1/network/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vitarelay.com/api/public/partner/v1/network/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vitarelay.com/api/public/partner/v1/network/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/partner/v1/network/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"status": "<string>",
"payment_status": "<string>",
"channel": "<string>",
"external_order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_you": true
},
"rep": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_you": true
},
"invite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_invite_id": "<string>",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"product_type": "<string>",
"quantity": 123,
"unit_price_cents": 123
}
],
"subtotal_cents": 123,
"shipping_cents": 123,
"tax_cents": 123,
"total_cents": 123,
"currency": "<string>",
"earnings": [
{
"type": "<string>",
"amount_cents": 123,
"status": "<string>"
}
],
"earnings_cents": 123
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}List your network's orders
Every order placed by, or credited to, the accounts in your network: the practices and clinics you invited, your Rep Partners and theirs, plus orders you placed yourself and credited to a Rep Partner (on_behalf_of on POST /wholesale/orders). Your own orders that are not credited to a partner are not included; they are in GET /wholesale/orders. Newest first. Each order carries earnings: what YOUR organization earns on it, by type. Wholesale cost and platform margin are never returned. Needs orders:read (or orders:write). With a test key the list is always empty.
curl --request GET \
--url https://vitarelay.com/api/public/partner/v1/network/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://vitarelay.com/api/public/partner/v1/network/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vitarelay.com/api/public/partner/v1/network/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vitarelay.com/api/public/partner/v1/network/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vitarelay.com/api/public/partner/v1/network/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vitarelay.com/api/public/partner/v1/network/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/partner/v1/network/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"status": "<string>",
"payment_status": "<string>",
"channel": "<string>",
"external_order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_you": true
},
"rep": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_you": true
},
"invite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_invite_id": "<string>",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"product_type": "<string>",
"quantity": 123,
"unit_price_cents": 123
}
],
"subtotal_cents": 123,
"shipping_cents": 123,
"tax_cents": 123,
"total_cents": 123,
"currency": "<string>",
"earnings": [
{
"type": "<string>",
"amount_cents": 123,
"status": "<string>"
}
],
"earnings_cents": 123
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
VitaRelay API key (vr_live_... or vr_test_...) with the invites:* scopes.
Query Parameters
Only orders credited to this Rep Partner (organization id). 404 rep_not_found when it is not in your network.
Only orders placed by this account (an accepted_org_id). 404 account_not_found when it is not in your network.
paid, unpaid Page size. Default 50, maximum 100.
1 <= x <= 100The next_cursor value returned by the previous page.

