curl --request PATCH \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id} \
--header 'Content-Type: application/json' \
--data '
{
"rate": 0,
"quantity": 0,
"period_amount": 0,
"invoiced_amount_migration": 0,
"first_invoice_date": "2023-12-25",
"is_contract_amendment": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"mrr": 0,
"discount": 5000000000000,
"notes": "<string>",
"use_daily_accounting": true,
"use_catchup": true,
"catchup_date": "2023-12-25",
"catchup_manually_overridden": true,
"external_id": "<string>",
"rates_are_net": true,
"contract": 123,
"relative_prepaid_commit": 123,
"billing_payment_term": 123,
"product": 123,
"modified_subscription": 123
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}"
payload = {
"rate": 0,
"quantity": 0,
"period_amount": 0,
"invoiced_amount_migration": 0,
"first_invoice_date": "2023-12-25",
"is_contract_amendment": True,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"mrr": 0,
"discount": 5000000000000,
"notes": "<string>",
"use_daily_accounting": True,
"use_catchup": True,
"catchup_date": "2023-12-25",
"catchup_manually_overridden": True,
"external_id": "<string>",
"rates_are_net": True,
"contract": 123,
"relative_prepaid_commit": 123,
"billing_payment_term": 123,
"product": 123,
"modified_subscription": 123
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
rate: 0,
quantity: 0,
period_amount: 0,
invoiced_amount_migration: 0,
first_invoice_date: '2023-12-25',
is_contract_amendment: true,
start_date: '2023-12-25',
end_date: '2023-12-25',
mrr: 0,
discount: 5000000000000,
notes: '<string>',
use_daily_accounting: true,
use_catchup: true,
catchup_date: '2023-12-25',
catchup_manually_overridden: true,
external_id: '<string>',
rates_are_net: true,
contract: 123,
relative_prepaid_commit: 123,
billing_payment_term: 123,
product: 123,
modified_subscription: 123
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{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://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'rate' => 0,
'quantity' => 0,
'period_amount' => 0,
'invoiced_amount_migration' => 0,
'first_invoice_date' => '2023-12-25',
'is_contract_amendment' => true,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'mrr' => 0,
'discount' => 5000000000000,
'notes' => '<string>',
'use_daily_accounting' => true,
'use_catchup' => true,
'catchup_date' => '2023-12-25',
'catchup_manually_overridden' => true,
'external_id' => '<string>',
'rates_are_net' => true,
'contract' => 123,
'relative_prepaid_commit' => 123,
'billing_payment_term' => 123,
'product' => 123,
'modified_subscription' => 123
]),
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/contracts/{contract_id}/subscriptions/{id}"
payload := strings.NewReader("{\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\n \"first_invoice_date\": \"2023-12-25\",\n \"is_contract_amendment\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"discount\": 5000000000000,\n \"notes\": \"<string>\",\n \"use_daily_accounting\": true,\n \"use_catchup\": true,\n \"catchup_date\": \"2023-12-25\",\n \"catchup_manually_overridden\": true,\n \"external_id\": \"<string>\",\n \"rates_are_net\": true,\n \"contract\": 123,\n \"relative_prepaid_commit\": 123,\n \"billing_payment_term\": 123,\n \"product\": 123,\n \"modified_subscription\": 123\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}")
.header("Content-Type", "application/json")
.body("{\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\n \"first_invoice_date\": \"2023-12-25\",\n \"is_contract_amendment\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"discount\": 5000000000000,\n \"notes\": \"<string>\",\n \"use_daily_accounting\": true,\n \"use_catchup\": true,\n \"catchup_date\": \"2023-12-25\",\n \"catchup_manually_overridden\": true,\n \"external_id\": \"<string>\",\n \"rates_are_net\": true,\n \"contract\": 123,\n \"relative_prepaid_commit\": 123,\n \"billing_payment_term\": 123,\n \"product\": 123,\n \"modified_subscription\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\n \"first_invoice_date\": \"2023-12-25\",\n \"is_contract_amendment\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"discount\": 5000000000000,\n \"notes\": \"<string>\",\n \"use_daily_accounting\": true,\n \"use_catchup\": true,\n \"catchup_date\": \"2023-12-25\",\n \"catchup_manually_overridden\": true,\n \"external_id\": \"<string>\",\n \"rates_are_net\": true,\n \"contract\": 123,\n \"relative_prepaid_commit\": 123,\n \"billing_payment_term\": 123,\n \"product\": 123,\n \"modified_subscription\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"lines": "<string>",
"product_name": "<string>",
"product_is_renewable": true,
"product_bundle": "<string>",
"product_bundle_name": "<string>",
"contract_product_bundle": {
"id": 123,
"source_bundle_name": "<string>",
"total_amount": 0,
"lines": [
{
"id": 123,
"product": 123,
"product_name": "<string>",
"amount": 0,
"percentage": "<string>",
"original_percentage": 0
}
],
"source_bundle": 123,
"currency": "<string>"
},
"total_value": 0,
"last_modified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"customer": 123,
"contract": 123,
"rate": 0,
"quantity": 0,
"renewal_behavior": "FOLLOW_CONTRACT",
"period_amount": 0,
"revenue_recognition_type": "RATABLE",
"billing_cadence": "one_time",
"billing_timing": "advance",
"first_invoice_date": "2023-12-25",
"is_contract_amendment": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"mrr": 0,
"discount": 5000000000000,
"notes": "<string>",
"use_daily_accounting": true,
"proration_method": "standard",
"use_catchup": true,
"catchup_date": "2023-12-25",
"catchup_manually_overridden": true,
"invoice_calculation": "FIXED_RATE",
"source": "SALESFORCE",
"external_id": "<string>",
"rates_are_net": true,
"relative_prepaid_commit": 123,
"billing_payment_term": 123,
"product": 123,
"modified_subscription": 123
}Partial Update Contract Subscription
curl --request PATCH \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id} \
--header 'Content-Type: application/json' \
--data '
{
"rate": 0,
"quantity": 0,
"period_amount": 0,
"invoiced_amount_migration": 0,
"first_invoice_date": "2023-12-25",
"is_contract_amendment": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"mrr": 0,
"discount": 5000000000000,
"notes": "<string>",
"use_daily_accounting": true,
"use_catchup": true,
"catchup_date": "2023-12-25",
"catchup_manually_overridden": true,
"external_id": "<string>",
"rates_are_net": true,
"contract": 123,
"relative_prepaid_commit": 123,
"billing_payment_term": 123,
"product": 123,
"modified_subscription": 123
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}"
payload = {
"rate": 0,
"quantity": 0,
"period_amount": 0,
"invoiced_amount_migration": 0,
"first_invoice_date": "2023-12-25",
"is_contract_amendment": True,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"mrr": 0,
"discount": 5000000000000,
"notes": "<string>",
"use_daily_accounting": True,
"use_catchup": True,
"catchup_date": "2023-12-25",
"catchup_manually_overridden": True,
"external_id": "<string>",
"rates_are_net": True,
"contract": 123,
"relative_prepaid_commit": 123,
"billing_payment_term": 123,
"product": 123,
"modified_subscription": 123
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
rate: 0,
quantity: 0,
period_amount: 0,
invoiced_amount_migration: 0,
first_invoice_date: '2023-12-25',
is_contract_amendment: true,
start_date: '2023-12-25',
end_date: '2023-12-25',
mrr: 0,
discount: 5000000000000,
notes: '<string>',
use_daily_accounting: true,
use_catchup: true,
catchup_date: '2023-12-25',
catchup_manually_overridden: true,
external_id: '<string>',
rates_are_net: true,
contract: 123,
relative_prepaid_commit: 123,
billing_payment_term: 123,
product: 123,
modified_subscription: 123
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{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://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'rate' => 0,
'quantity' => 0,
'period_amount' => 0,
'invoiced_amount_migration' => 0,
'first_invoice_date' => '2023-12-25',
'is_contract_amendment' => true,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'mrr' => 0,
'discount' => 5000000000000,
'notes' => '<string>',
'use_daily_accounting' => true,
'use_catchup' => true,
'catchup_date' => '2023-12-25',
'catchup_manually_overridden' => true,
'external_id' => '<string>',
'rates_are_net' => true,
'contract' => 123,
'relative_prepaid_commit' => 123,
'billing_payment_term' => 123,
'product' => 123,
'modified_subscription' => 123
]),
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/contracts/{contract_id}/subscriptions/{id}"
payload := strings.NewReader("{\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\n \"first_invoice_date\": \"2023-12-25\",\n \"is_contract_amendment\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"discount\": 5000000000000,\n \"notes\": \"<string>\",\n \"use_daily_accounting\": true,\n \"use_catchup\": true,\n \"catchup_date\": \"2023-12-25\",\n \"catchup_manually_overridden\": true,\n \"external_id\": \"<string>\",\n \"rates_are_net\": true,\n \"contract\": 123,\n \"relative_prepaid_commit\": 123,\n \"billing_payment_term\": 123,\n \"product\": 123,\n \"modified_subscription\": 123\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}")
.header("Content-Type", "application/json")
.body("{\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\n \"first_invoice_date\": \"2023-12-25\",\n \"is_contract_amendment\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"discount\": 5000000000000,\n \"notes\": \"<string>\",\n \"use_daily_accounting\": true,\n \"use_catchup\": true,\n \"catchup_date\": \"2023-12-25\",\n \"catchup_manually_overridden\": true,\n \"external_id\": \"<string>\",\n \"rates_are_net\": true,\n \"contract\": 123,\n \"relative_prepaid_commit\": 123,\n \"billing_payment_term\": 123,\n \"product\": 123,\n \"modified_subscription\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\n \"first_invoice_date\": \"2023-12-25\",\n \"is_contract_amendment\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"mrr\": 0,\n \"discount\": 5000000000000,\n \"notes\": \"<string>\",\n \"use_daily_accounting\": true,\n \"use_catchup\": true,\n \"catchup_date\": \"2023-12-25\",\n \"catchup_manually_overridden\": true,\n \"external_id\": \"<string>\",\n \"rates_are_net\": true,\n \"contract\": 123,\n \"relative_prepaid_commit\": 123,\n \"billing_payment_term\": 123,\n \"product\": 123,\n \"modified_subscription\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"lines": "<string>",
"product_name": "<string>",
"product_is_renewable": true,
"product_bundle": "<string>",
"product_bundle_name": "<string>",
"contract_product_bundle": {
"id": 123,
"source_bundle_name": "<string>",
"total_amount": 0,
"lines": [
{
"id": 123,
"product": 123,
"product_name": "<string>",
"amount": 0,
"percentage": "<string>",
"original_percentage": 0
}
],
"source_bundle": 123,
"currency": "<string>"
},
"total_value": 0,
"last_modified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"customer": 123,
"contract": 123,
"rate": 0,
"quantity": 0,
"renewal_behavior": "FOLLOW_CONTRACT",
"period_amount": 0,
"revenue_recognition_type": "RATABLE",
"billing_cadence": "one_time",
"billing_timing": "advance",
"first_invoice_date": "2023-12-25",
"is_contract_amendment": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"mrr": 0,
"discount": 5000000000000,
"notes": "<string>",
"use_daily_accounting": true,
"proration_method": "standard",
"use_catchup": true,
"catchup_date": "2023-12-25",
"catchup_manually_overridden": true,
"invoice_calculation": "FIXED_RATE",
"source": "SALESFORCE",
"external_id": "<string>",
"rates_are_net": true,
"relative_prepaid_commit": 123,
"billing_payment_term": 123,
"product": 123,
"modified_subscription": 123
}Body
-10000000000000 < x < 10000000000000-100000000000000 < x < 100000000000000Controls how this subscription ends. FOLLOW_CONTRACT extends with the evergreen contract's rolling end boundary (working_end_date / effective_end_date). FIXED_END keeps an explicit subscription end_date. Default is FIXED_END.
FOLLOW_CONTRACT- Follow ContractFIXED_END- Fixed End Date
FOLLOW_CONTRACT, FIXED_END Evergreen-only input amount per billing period (for example 10000.00 for a quarterly period). Provide this to auto-generate lines for evergreen subscriptions. Ignored for non-evergreen writes.
-1000000000000000000 < x < 1000000000000000000Migration-only: total amount already invoiced in a prior system. When provided, marks revenue transactions as migration-invoiced up to this amount.
-1000000000000000000 < x < 1000000000000000000RATABLE- RatableRELATIVE_TO_PREPAID_COMMIT- Relative to prepaid commit
RATABLE, RELATIVE_TO_PREPAID_COMMIT one_time- One timemonthly- Monthlyquarterly- Quarterlybiannual- Semiannualannual- Annual
one_time, monthly, quarterly, biannual, annual advance- In advancearrears- In arrears
advance, arrears -1000000000000000000 < x < 1000000000000000000Per-unit discount in contract currency. Line amount is Quantity × (Rate − Discount). Null when no discount is configured.
0 <= x < 10000000000000standard- Standard (actual month length)thirty_day- Fixed 30-day monthdaily- Daily
standard, thirty_day, daily True when a user explicitly set use_catchup or catchup_date via the modal. Suppresses automatic reconciliation by integration syncs so the user's choice survives.
Fixed Rate: rate stays constant, quantity calculated. Fixed Quantity: quantity stays constant (e.g., seats), rate calculated.
FIXED_RATE- Fixed RateFIXED_QUANTITY- Fixed Quantity
FIXED_RATE, FIXED_QUANTITY SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
SALESFORCE, HUBSPOT, STRIPE, MANUAL 250When True, this subscription's rate and waterfall amounts already reflect post-discount (net) pricing. Prevents invoice creation from double-counting discounts via a separate Discount RevenueTransaction.
Response
Read-only serializer for ContractProductBundle in milestone responses.
Show child attributes
Show child attributes
-1000000000000000000 < x < 1000000000000000000-10000000000000 < x < 10000000000000-100000000000000 < x < 100000000000000Controls how this subscription ends. FOLLOW_CONTRACT extends with the evergreen contract's rolling end boundary (working_end_date / effective_end_date). FIXED_END keeps an explicit subscription end_date. Default is FIXED_END.
FOLLOW_CONTRACT- Follow ContractFIXED_END- Fixed End Date
FOLLOW_CONTRACT, FIXED_END Evergreen-only input amount per billing period (for example 10000.00 for a quarterly period). Provide this to auto-generate lines for evergreen subscriptions. Ignored for non-evergreen writes.
-1000000000000000000 < x < 1000000000000000000RATABLE- RatableRELATIVE_TO_PREPAID_COMMIT- Relative to prepaid commit
RATABLE, RELATIVE_TO_PREPAID_COMMIT one_time- One timemonthly- Monthlyquarterly- Quarterlybiannual- Semiannualannual- Annual
one_time, monthly, quarterly, biannual, annual advance- In advancearrears- In arrears
advance, arrears -1000000000000000000 < x < 1000000000000000000Per-unit discount in contract currency. Line amount is Quantity × (Rate − Discount). Null when no discount is configured.
0 <= x < 10000000000000standard- Standard (actual month length)thirty_day- Fixed 30-day monthdaily- Daily
standard, thirty_day, daily True when a user explicitly set use_catchup or catchup_date via the modal. Suppresses automatic reconciliation by integration syncs so the user's choice survives.
Fixed Rate: rate stays constant, quantity calculated. Fixed Quantity: quantity stays constant (e.g., seats), rate calculated.
FIXED_RATE- Fixed RateFIXED_QUANTITY- Fixed Quantity
FIXED_RATE, FIXED_QUANTITY SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
SALESFORCE, HUBSPOT, STRIPE, MANUAL 250When True, this subscription's rate and waterfall amounts already reflect post-discount (net) pricing. Prevents invoice creation from double-counting discounts via a separate Discount RevenueTransaction.