Skip to main content
GET
/
api
/
external
/
v2
/
subscription-customers
/
valid
/
{customerId}
Get valid subscription contract IDs for a customer
curl --request GET \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[ 5234567890, 5234567891, 5234567892, 5234567893 ]

Headers

X-API-Key
string

Path Parameters

customerId
integer<int64>
required

Id

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Response

Successfully retrieved valid subscription contract IDs. Returns a set of contract IDs (may be empty if customer has no subscriptions).