Skip to main content
GET
/
subscriptions
/
{subscriptionId}
/
Retrieve a Subscription
curl --request GET \
  --url https://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/ \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/', 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://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/",
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://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/"

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://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandboxapi.kelviq.com/api/v1/subscriptions/{subscriptionId}/")

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
{
  "id": "09d706ca-58f3-4fb2-818f-5b8623d67e6e",
  "externalSubscriptionId": "sub_1RpoZoSBstCzyocS7iPmith3",
  "startDate": "2025-07-28",
  "endDate": null,
  "billingPeriodStartTime": "2025-07-28T10:46:34Z",
  "billingPeriodEndTime": "2025-08-28T10:46:34Z",
  "amount": "261.00",
  "recurrence": "month",
  "currency": "usd",
  "status": "active",
  "product": "Aphelo",
  "plan": {
    "name": "Premium",
    "identifier": "premium1"
  },
  "features": [],
  "trialDaysRemaining": 0,
  "customerId": "testuser",
  "billingType": "SUBSCRIPTION",
  "recurrenceUnit": 1,
  "recurrenceType": "MONTH",
  "files": [
    {
      "id": "bf9f0fe0-c9c0-436d-8811-e412d0365470",
      "name": "custom-pricinig.png",
      "file": "https://cdn.kelviq.com/media/organizations/8/plan/1ad723d2-40eb-4bf0-b924-557e6697e788/53c28d460fed421a81f6c6e90114ff4f/custom-pricinig.png",
      "ordering": 0,
      "enabled": true,
      "downloadUrl": "https://api.kelviq.com/api/v1/catalog/plans/10-july/file/bf9f0fe0-c9c0-436d-8811-e412d0365470/download/"
    }
  ],
  "links": [
    {
      "name": "Product documentation",
      "url": "https://example.com/docs"
    }
  ],
  "license": [
    {
      "id": "f81efb90-5f29-4dd1-9c7b-be4085e473de",
      "licenseKey": "10K-080A3A89-8709-4EB5-80BE-BD37B518CCA1",
      "activatedOn": null,
      "expiresOn": null,
      "activationUsage": 0,
      "activationLimit": 2,
      "enabled": true
    }
  ]
}
{
"detail": "Subscription not found."
}
Click the base URL in the API playground and select the Sandbox host for test data or the Production host for live data. Use credentials from the same environment.

Authorizations

Authorization
string
header
required

The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Path Parameters

subscriptionId
string<uuid>
required

The unique Kelviq identifier of the subscription.

Response

Subscription details.

id
string<uuid>
externalSubscriptionId
string
startDate
string<date>
endDate
string<date> | null
billingPeriodStartTime
string<date-time>
billingPeriodEndTime
string<date-time>
amount
string
recurrence
string
currency
string
status
string
product
string
plan
object
features
object[]
trialDaysRemaining
integer
customerId
string
billingType
enum<string>
Available options:
SUBSCRIPTION,
ONE_TIME
recurrenceUnit
integer | null
recurrenceType
string | null
files
object[]

Downloadable files attached to the subscription's plan.

External links attached to the subscription's plan.

license
object[]

Issued licenses associated with the subscription.