Skip to main content
GET
/
v1
/
subscription-schedules
/
{id}
Get subscription schedule
curl --request GET \
  --url https://us.api.flexprice.io/v1/v1/subscription-schedules/{id}
import requests

url = "https://us.api.flexprice.io/v1/v1/subscription-schedules/{id}"

response = requests.get(url)

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

fetch('https://us.api.flexprice.io/v1/v1/subscription-schedules/{id}', 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/subscription-schedules/{id}",
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/subscription-schedules/{id}"

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/subscription-schedules/{id}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://us.api.flexprice.io/v1/v1/subscription-schedules/{id}")

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
{
  "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"
}

Path Parameters

id
string
required

Schedule ID

Response

200 - application/json

OK

Full details of a subscription schedule

can_be_cancelled
boolean

can_be_cancelled indicates if the schedule can be cancelled

cancelled_at
string<date-time>

cancelled_at is when the schedule was cancelled

configuration
object

configuration contains type-specific configuration (e.g., target_plan_id for plan changes)

created_at
string<date-time>

created_at timestamp

days_until_execution
integer

days_until_execution is the number of days until execution

error_message
string

error_message contains the error if execution failed

executed_at
string<date-time>

executed_at is when the schedule was executed

execution_result
object

execution_result contains type-specific execution result

id
string

id of the schedule

metadata
object

metadata from the schedule

schedule_type
enum<string>
Available options:
plan_change,
cancellation
scheduled_at
string<date-time>

scheduled_at is when the schedule will execute

status
enum<string>
Available options:
pending,
executing,
executed,
cancelled,
failed
subscription_id
string

subscription_id is the ID of the subscription

updated_at
string<date-time>

updated_at timestamp