Modify Subscription Schedule
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
}
]Revenue Recognition
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.
POST
/
rr
/
api
/
v1
/
modify-subscription-schedule
Modify Subscription Schedule
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
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
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
Available options:
RATABLE, RELATIVE_TO_PREPAID_COMMIT Response
200 - application/json