Add or update a product listing
curl --request PUT \
--url https://vitarelay.com/api/public/v1/shop/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"markup_value": 0,
"custom_title": "<string>",
"custom_description": "<string>",
"rx_mode": "none",
"is_listed": true,
"first_order_immediate": true
}
'import requests
url = "https://vitarelay.com/api/public/v1/shop/products"
payload = {
"platform_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"markup_value": 0,
"custom_title": "<string>",
"custom_description": "<string>",
"rx_mode": "none",
"is_listed": True,
"first_order_immediate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform_product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
markup_value: 0,
custom_title: '<string>',
custom_description: '<string>',
rx_mode: 'none',
is_listed: true,
first_order_immediate: true
})
};
fetch('https://vitarelay.com/api/public/v1/shop/products', 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/v1/shop/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'platform_product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'markup_value' => 0,
'custom_title' => '<string>',
'custom_description' => '<string>',
'rx_mode' => 'none',
'is_listed' => true,
'first_order_immediate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vitarelay.com/api/public/v1/shop/products"
payload := strings.NewReader("{\n \"platform_product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"markup_value\": 0,\n \"custom_title\": \"<string>\",\n \"custom_description\": \"<string>\",\n \"rx_mode\": \"none\",\n \"is_listed\": true,\n \"first_order_immediate\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://vitarelay.com/api/public/v1/shop/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform_product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"markup_value\": 0,\n \"custom_title\": \"<string>\",\n \"custom_description\": \"<string>\",\n \"rx_mode\": \"none\",\n \"is_listed\": true,\n \"first_order_immediate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/shop/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"markup_value\": 0,\n \"custom_title\": \"<string>\",\n \"custom_description\": \"<string>\",\n \"rx_mode\": \"none\",\n \"is_listed\": true,\n \"first_order_immediate\": true\n}"
response = http.request(request)
puts response.read_body{
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"markup_type": "percent",
"markup_value": 123,
"custom_title": "<string>",
"custom_description": "<string>",
"rx_mode": "none",
"is_listed": true,
"purchase_mode": "one_time",
"default_cadence": "weekly",
"first_order_immediate": true,
"name": "<string>",
"description": "<string>",
"product_type": "<string>",
"dosage_form": "<string>",
"image_urls": [
"<string>"
],
"requires_prescription": true,
"item_kind": "product",
"available_cadences": [
"weekly"
],
"requires_shipping": true,
"patient_price_cents": 123,
"eligible": true
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}Storefront
Add or update a product listing
Curates a catalog product into your storefront, keyed by platform_product_id — creates the listing when absent, updates it otherwise. Products your clinic is not eligible to sell, and prescription items given rx_mode: none, are rejected or corrected by the same rules the in-app builder applies. Requires shop:write.
PUT
/
shop
/
products
Add or update a product listing
curl --request PUT \
--url https://vitarelay.com/api/public/v1/shop/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"markup_value": 0,
"custom_title": "<string>",
"custom_description": "<string>",
"rx_mode": "none",
"is_listed": true,
"first_order_immediate": true
}
'import requests
url = "https://vitarelay.com/api/public/v1/shop/products"
payload = {
"platform_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"markup_value": 0,
"custom_title": "<string>",
"custom_description": "<string>",
"rx_mode": "none",
"is_listed": True,
"first_order_immediate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform_product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
markup_value: 0,
custom_title: '<string>',
custom_description: '<string>',
rx_mode: 'none',
is_listed: true,
first_order_immediate: true
})
};
fetch('https://vitarelay.com/api/public/v1/shop/products', 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/v1/shop/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'platform_product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'markup_value' => 0,
'custom_title' => '<string>',
'custom_description' => '<string>',
'rx_mode' => 'none',
'is_listed' => true,
'first_order_immediate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vitarelay.com/api/public/v1/shop/products"
payload := strings.NewReader("{\n \"platform_product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"markup_value\": 0,\n \"custom_title\": \"<string>\",\n \"custom_description\": \"<string>\",\n \"rx_mode\": \"none\",\n \"is_listed\": true,\n \"first_order_immediate\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://vitarelay.com/api/public/v1/shop/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform_product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"markup_value\": 0,\n \"custom_title\": \"<string>\",\n \"custom_description\": \"<string>\",\n \"rx_mode\": \"none\",\n \"is_listed\": true,\n \"first_order_immediate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/shop/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"markup_value\": 0,\n \"custom_title\": \"<string>\",\n \"custom_description\": \"<string>\",\n \"rx_mode\": \"none\",\n \"is_listed\": true,\n \"first_order_immediate\": true\n}"
response = http.request(request)
puts response.read_body{
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"markup_type": "percent",
"markup_value": 123,
"custom_title": "<string>",
"custom_description": "<string>",
"rx_mode": "none",
"is_listed": true,
"purchase_mode": "one_time",
"default_cadence": "weekly",
"first_order_immediate": true,
"name": "<string>",
"description": "<string>",
"product_type": "<string>",
"dosage_form": "<string>",
"image_urls": [
"<string>"
],
"requires_prescription": true,
"item_kind": "product",
"available_cadences": [
"weekly"
],
"requires_shipping": true,
"patient_price_cents": 123,
"eligible": true
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}Authorizations
API key issued by VitaRelay. Send as Authorization: Bearer vr_live_…
(production) or Authorization: Bearer vr_test_… (sandbox).
Body
application/json
Available options:
percent, flat Required range:
x >= 0Available options:
none, refill_only, refill_or_approval, approval Controls whether checkout permits one-time purchases, subscriptions, or both.
Available options:
one_time, subscription, both Available options:
weekly, monthly, quarterly, null Response
The created or updated listing.
One curated product in the patient shop.
Show child attributes
Show child attributes

