Retrieve a subscription and recent cycles
curl --request GET \
--url https://vitarelay.com/api/public/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vitarelay.com/api/public/v1/subscriptions/{id}"
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/v1/subscriptions/{id}', 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/subscriptions/{id}",
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/v1/subscriptions/{id}"
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/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/subscriptions/{id}")
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{
"subscription": {
"id": "0f1f2c9e-2f30-4a1b-8b1c-6f4e9a0c1d22",
"item_kind": "product",
"shop_product_id": "153cfbff-3d44-4501-9e45-7e7bf1ab130e",
"quantity": 1,
"cadence": "monthly",
"status": "active",
"paused_reason": null,
"price_cents_snapshot": 6500,
"next_charge_at": "2026-10-25T04:06:14Z",
"card_brand": "Visa",
"card_last4": "4242"
},
"recent_cycles": []
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}Subscriptions
Retrieve a subscription and recent cycles
GET
/
subscriptions
/
{id}
Retrieve a subscription and recent cycles
curl --request GET \
--url https://vitarelay.com/api/public/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vitarelay.com/api/public/v1/subscriptions/{id}"
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/v1/subscriptions/{id}', 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/subscriptions/{id}",
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/v1/subscriptions/{id}"
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/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitarelay.com/api/public/v1/subscriptions/{id}")
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{
"subscription": {
"id": "0f1f2c9e-2f30-4a1b-8b1c-6f4e9a0c1d22",
"item_kind": "product",
"shop_product_id": "153cfbff-3d44-4501-9e45-7e7bf1ab130e",
"quantity": 1,
"cadence": "monthly",
"status": "active",
"paused_reason": null,
"price_cents_snapshot": 6500,
"next_charge_at": "2026-10-25T04:06:14Z",
"card_brand": "Visa",
"card_last4": "4242"
},
"recent_cycles": []
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid"
}
}
