List customer subscriptions
curl --request GET \
--url https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/ \
--header 'nadles-provider-key: <api-key>'import requests
url = "https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/"
headers = {"nadles-provider-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'nadles-provider-key': '<api-key>'}};
fetch('https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/', 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://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"nadles-provider-key: <api-key>"
],
]);
$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://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("nadles-provider-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/")
.header("nadles-provider-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["nadles-provider-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"vendor_id": "<string>",
"product_id": "<string>",
"customer_id": "<string>",
"order_id": "<string>",
"state": "<string>",
"psp_name": "<string>",
"billing_version": 123,
"is_cancelation_scheduled": true,
"items": [
{}
],
"activated_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"cancellation_scheduled_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"past_due_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}
}API Reference
List customer subscriptions
GET
/
customers
/
{customerId}
/
subscriptions
/
List customer subscriptions
curl --request GET \
--url https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/ \
--header 'nadles-provider-key: <api-key>'import requests
url = "https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/"
headers = {"nadles-provider-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'nadles-provider-key': '<api-key>'}};
fetch('https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/', 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://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"nadles-provider-key: <api-key>"
],
]);
$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://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("nadles-provider-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/")
.header("nadles-provider-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://provider.api.nadles.com/v0/customers/{customerId}/subscriptions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["nadles-provider-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"vendor_id": "<string>",
"product_id": "<string>",
"customer_id": "<string>",
"order_id": "<string>",
"state": "<string>",
"psp_name": "<string>",
"billing_version": 123,
"is_cancelation_scheduled": true,
"items": [
{}
],
"activated_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"cancellation_scheduled_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"past_due_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}
}Authorizations
API key provided in the admin portal
Path Parameters
The ID of the customer.
Query Parameters
Maximum number of items to return
Number of items to skip before starting to collect the result set
Filter subscriptions by state
⌘I