curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule \
--header 'Content-Type: application/json' \
--data '
{
"start_date": "2023-12-25",
"total_value": 0,
"end_date": "2023-12-25",
"mrr": 0,
"use_daily_accounting": false,
"use_catchup": false,
"catchup_date": "2023-12-25",
"modified_subscription": 123,
"does_modify_contract_end_date": false,
"apply_prospectively": false,
"first_invoice_date": "2023-12-25",
"monthly_billing_period_alignment": "anniversary"
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule"
payload = {
"start_date": "2023-12-25",
"total_value": 0,
"end_date": "2023-12-25",
"mrr": 0,
"use_daily_accounting": False,
"use_catchup": False,
"catchup_date": "2023-12-25",
"modified_subscription": 123,
"does_modify_contract_end_date": False,
"apply_prospectively": False,
"first_invoice_date": "2023-12-25",
"monthly_billing_period_alignment": "anniversary"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
start_date: '2023-12-25',
total_value: 0,
end_date: '2023-12-25',
mrr: 0,
use_daily_accounting: false,
use_catchup: false,
catchup_date: '2023-12-25',
modified_subscription: 123,
does_modify_contract_end_date: false,
apply_prospectively: false,
first_invoice_date: '2023-12-25',
monthly_billing_period_alignment: 'anniversary'
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule', 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.meetcampfire.com/rr/api/v1/modify-subscription-schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start_date' => '2023-12-25',
'total_value' => 0,
'end_date' => '2023-12-25',
'mrr' => 0,
'use_daily_accounting' => false,
'use_catchup' => false,
'catchup_date' => '2023-12-25',
'modified_subscription' => 123,
'does_modify_contract_end_date' => false,
'apply_prospectively' => false,
'first_invoice_date' => '2023-12-25',
'monthly_billing_period_alignment' => 'anniversary'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule"
payload := strings.NewReader("{\n \"start_date\": \"2023-12-25\",\n \"total_value\": 0,\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"use_daily_accounting\": false,\n \"use_catchup\": false,\n \"catchup_date\": \"2023-12-25\",\n \"modified_subscription\": 123,\n \"does_modify_contract_end_date\": false,\n \"apply_prospectively\": false,\n \"first_invoice_date\": \"2023-12-25\",\n \"monthly_billing_period_alignment\": \"anniversary\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2023-12-25\",\n \"total_value\": 0,\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"use_daily_accounting\": false,\n \"use_catchup\": false,\n \"catchup_date\": \"2023-12-25\",\n \"modified_subscription\": 123,\n \"does_modify_contract_end_date\": false,\n \"apply_prospectively\": false,\n \"first_invoice_date\": \"2023-12-25\",\n \"monthly_billing_period_alignment\": \"anniversary\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_date\": \"2023-12-25\",\n \"total_value\": 0,\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"use_daily_accounting\": false,\n \"use_catchup\": false,\n \"catchup_date\": \"2023-12-25\",\n \"modified_subscription\": 123,\n \"does_modify_contract_end_date\": false,\n \"apply_prospectively\": false,\n \"first_invoice_date\": \"2023-12-25\",\n \"monthly_billing_period_alignment\": \"anniversary\"\n}"
response = http.request(request)
puts response.read_body[
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"total_value": 0,
"id": 123,
"scheduled_invoice_date": "2023-12-25",
"original_value": 0,
"original_mrr": 0,
"mrr": 0,
"original_quantity": 0,
"quantity": 0,
"original_rate": 0,
"rate": 0,
"billed_amount": 0,
"use_daily_accounting": false,
"is_contract_amendment": false
}
]Modify Subscription Schedule
Generate a modified subscription schedule by comparing a new schedule against an existing subscription. Returns the delta between the original and modified schedules, with support for catch-up accounting and contract end date modifications.
curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule \
--header 'Content-Type: application/json' \
--data '
{
"start_date": "2023-12-25",
"total_value": 0,
"end_date": "2023-12-25",
"mrr": 0,
"use_daily_accounting": false,
"use_catchup": false,
"catchup_date": "2023-12-25",
"modified_subscription": 123,
"does_modify_contract_end_date": false,
"apply_prospectively": false,
"first_invoice_date": "2023-12-25",
"monthly_billing_period_alignment": "anniversary"
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule"
payload = {
"start_date": "2023-12-25",
"total_value": 0,
"end_date": "2023-12-25",
"mrr": 0,
"use_daily_accounting": False,
"use_catchup": False,
"catchup_date": "2023-12-25",
"modified_subscription": 123,
"does_modify_contract_end_date": False,
"apply_prospectively": False,
"first_invoice_date": "2023-12-25",
"monthly_billing_period_alignment": "anniversary"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
start_date: '2023-12-25',
total_value: 0,
end_date: '2023-12-25',
mrr: 0,
use_daily_accounting: false,
use_catchup: false,
catchup_date: '2023-12-25',
modified_subscription: 123,
does_modify_contract_end_date: false,
apply_prospectively: false,
first_invoice_date: '2023-12-25',
monthly_billing_period_alignment: 'anniversary'
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule', 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.meetcampfire.com/rr/api/v1/modify-subscription-schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start_date' => '2023-12-25',
'total_value' => 0,
'end_date' => '2023-12-25',
'mrr' => 0,
'use_daily_accounting' => false,
'use_catchup' => false,
'catchup_date' => '2023-12-25',
'modified_subscription' => 123,
'does_modify_contract_end_date' => false,
'apply_prospectively' => false,
'first_invoice_date' => '2023-12-25',
'monthly_billing_period_alignment' => 'anniversary'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule"
payload := strings.NewReader("{\n \"start_date\": \"2023-12-25\",\n \"total_value\": 0,\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"use_daily_accounting\": false,\n \"use_catchup\": false,\n \"catchup_date\": \"2023-12-25\",\n \"modified_subscription\": 123,\n \"does_modify_contract_end_date\": false,\n \"apply_prospectively\": false,\n \"first_invoice_date\": \"2023-12-25\",\n \"monthly_billing_period_alignment\": \"anniversary\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2023-12-25\",\n \"total_value\": 0,\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"use_daily_accounting\": false,\n \"use_catchup\": false,\n \"catchup_date\": \"2023-12-25\",\n \"modified_subscription\": 123,\n \"does_modify_contract_end_date\": false,\n \"apply_prospectively\": false,\n \"first_invoice_date\": \"2023-12-25\",\n \"monthly_billing_period_alignment\": \"anniversary\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/modify-subscription-schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_date\": \"2023-12-25\",\n \"total_value\": 0,\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"use_daily_accounting\": false,\n \"use_catchup\": false,\n \"catchup_date\": \"2023-12-25\",\n \"modified_subscription\": 123,\n \"does_modify_contract_end_date\": false,\n \"apply_prospectively\": false,\n \"first_invoice_date\": \"2023-12-25\",\n \"monthly_billing_period_alignment\": \"anniversary\"\n}"
response = http.request(request)
puts response.read_body[
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"total_value": 0,
"id": 123,
"scheduled_invoice_date": "2023-12-25",
"original_value": 0,
"original_mrr": 0,
"mrr": 0,
"original_quantity": 0,
"quantity": 0,
"original_rate": 0,
"rate": 0,
"billed_amount": 0,
"use_daily_accounting": false,
"is_contract_amendment": false
}
]Body
Start date of the subscription period.
Total contract value for the subscription period.
-1000000000000000000 < x < 1000000000000000000End date of the subscription period. Defaults to 1 year from start date if not provided.
Monthly recurring revenue. If not provided, it is calculated from total_value and the subscription period.
-1000000000000000000 < x < 1000000000000000000Whether to use daily (vs monthly) revenue recognition.
Proration method. When provided, takes precedence over use_daily_accounting (DAILY↔True, STANDARD/THIRTY_DAY↔False).
standard- Standard (actual month length)thirty_day- Fixed 30-day monthdaily- Daily
standard, thirty_day, daily Enable catch-up accounting for retroactive amendments.
Date from which to apply catch-up adjustments. Required if use_catchup is true.
ID of the existing contract subscription being modified.
Whether this modification changes the contract end date.
Apply changes prospectively from catchup_date instead of retroactively. Only valid when use_catchup is true.
monthly- Monthlyquarterly- Quarterlybiannual- Semiannualannual- Annual
monthly, quarterly, biannual, annual advance- In advancearrears- In arrears
advance, arrears Contract-level monthly service-period alignment used by the billing preview.
anniversary- Contract anniversarycalendar_month- Calendar month
anniversary, calendar_month Recognition type of the subscription being previewed. RATABLE keeps the monthly recognition schedule and stamps each row with its billing date. Omitted means the preview mirrors the billing installments.
RATABLE- RatableRELATIVE_TO_PREPAID_COMMIT- Relative to prepaid commit
RATABLE, RELATIVE_TO_PREPAID_COMMIT Response
-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000-1000000000000000000 < x < 1000000000000000000-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000-10000000000000 < x < 10000000000000-10000000000000 < x < 10000000000000-1000000000000000000 < x < 1000000000000000000