List subscription schedules
curl --request GET \
--url https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedulesimport requests
url = "https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules', 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://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules",
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://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules")
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{
"count": 123,
"schedules": [
{
"can_be_cancelled": true,
"cancelled_at": "2023-11-07T05:31:56Z",
"configuration": {},
"created_at": "2023-11-07T05:31:56Z",
"days_until_execution": 123,
"error_message": "<string>",
"executed_at": "2023-11-07T05:31:56Z",
"execution_result": {},
"id": "<string>",
"metadata": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"subscription_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Subscriptions
List subscription schedules
Use when listing scheduled changes for a subscription (e.g. upcoming plan change or renewal). Returns all schedules for that subscription.
GET
/
v1
/
subscriptions
/
{subscription_id}
/
schedules
List subscription schedules
curl --request GET \
--url https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedulesimport requests
url = "https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules', 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://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules",
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://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/v1/subscriptions/{subscription_id}/schedules")
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{
"count": 123,
"schedules": [
{
"can_be_cancelled": true,
"cancelled_at": "2023-11-07T05:31:56Z",
"configuration": {},
"created_at": "2023-11-07T05:31:56Z",
"days_until_execution": 123,
"error_message": "<string>",
"executed_at": "2023-11-07T05:31:56Z",
"execution_result": {},
"id": "<string>",
"metadata": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"subscription_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}⌘I

