Subscription Versions
Get Subscription Version
Retrieve details of a specific subscription version
GET
/
subscriptions
/
{id}
/
versions
/
{versionId}
Get Subscription Version
curl --request GET \
--url https://api.alguna.io/subscriptions/{id}/versions/{versionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alguna.io/subscriptions/{id}/versions/{versionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alguna.io/subscriptions/{id}/versions/{versionId}', 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://api.alguna.io/subscriptions/{id}/versions/{versionId}",
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://api.alguna.io/subscriptions/{id}/versions/{versionId}"
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://api.alguna.io/subscriptions/{id}/versions/{versionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/subscriptions/{id}/versions/{versionId}")
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": "subver_0000000000000001",
"createdAt": "2024-01-01T12:00:00Z",
"organizationId": "00000000-0000-0000-0000-000000000001",
"quoteId": "quo_0000000000000001",
"changeDescription": "Added new features to enterprise plan",
"startDate": "2024-02-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"priceGroups": [
{
"name": "Core Features",
"description": "Essential platform capabilities",
"bundleId": "bun_0000000000000001",
"priceIds": [
"pri_0000000000000001",
"pri_0000000000000002",
"pri_0000000000000003"
]
},
{
"name": "Add-ons",
"description": "Optional additional features",
"bundleId": "bun_0000000000000002",
"priceIds": ["pri_0000000000000004", "pri_0000000000000005"]
}
],
"status": "published"
}
Retrieves the details of an existing subscription version. You need to supply the unique subscription identifier and the version identifier.
Path Parameters
string
required
The unique identifier of the subscription to retrieve
string
required
The unique identifier of the subscription version to retrieve
Response
{
"id": "subver_0000000000000001",
"createdAt": "2024-01-01T12:00:00Z",
"organizationId": "00000000-0000-0000-0000-000000000001",
"quoteId": "quo_0000000000000001",
"changeDescription": "Added new features to enterprise plan",
"startDate": "2024-02-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"priceGroups": [
{
"name": "Core Features",
"description": "Essential platform capabilities",
"bundleId": "bun_0000000000000001",
"priceIds": [
"pri_0000000000000001",
"pri_0000000000000002",
"pri_0000000000000003"
]
},
{
"name": "Add-ons",
"description": "Optional additional features",
"bundleId": "bun_0000000000000002",
"priceIds": ["pri_0000000000000004", "pri_0000000000000005"]
}
],
"status": "published"
}
string
Unique identifier for the subscription version
datetime
When the subscription version was created in ISO 8601 format
uuid
The organization ID that owns this subscription version
string
The quote ID associated with this subscription version
string
Optional description of what changed in this version
datetime
Optional start date for this subscription version in ISO 8601 format
datetime
End date determined by us for this subscription version in ISO 8601 format. If
empty, the subscription version is open-ended
array
string
Current status of the subscription version. Possible values:
draft or
published⌘I
Get Subscription Version
curl --request GET \
--url https://api.alguna.io/subscriptions/{id}/versions/{versionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alguna.io/subscriptions/{id}/versions/{versionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alguna.io/subscriptions/{id}/versions/{versionId}', 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://api.alguna.io/subscriptions/{id}/versions/{versionId}",
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://api.alguna.io/subscriptions/{id}/versions/{versionId}"
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://api.alguna.io/subscriptions/{id}/versions/{versionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/subscriptions/{id}/versions/{versionId}")
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": "subver_0000000000000001",
"createdAt": "2024-01-01T12:00:00Z",
"organizationId": "00000000-0000-0000-0000-000000000001",
"quoteId": "quo_0000000000000001",
"changeDescription": "Added new features to enterprise plan",
"startDate": "2024-02-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"priceGroups": [
{
"name": "Core Features",
"description": "Essential platform capabilities",
"bundleId": "bun_0000000000000001",
"priceIds": [
"pri_0000000000000001",
"pri_0000000000000002",
"pri_0000000000000003"
]
},
{
"name": "Add-ons",
"description": "Optional additional features",
"bundleId": "bun_0000000000000002",
"priceIds": ["pri_0000000000000004", "pri_0000000000000005"]
}
],
"status": "published"
}