Skip to main content
PUT
/
rr
/
api
/
v1
/
contracts
/
{contract_id}
/
subscriptions
/
{id}
Update Contract Subscription
curl --request PUT \
  --url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contract": 123,
  "rate": 0,
  "quantity": 0,
  "period_amount": 0,
  "invoiced_amount_migration": 0,
  "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,
  "product": 123,
  "modified_subscription": 123
}
'
import requests

url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}"

payload = {
"contract": 123,
"rate": 0,
"quantity": 0,
"period_amount": 0,
"invoiced_amount_migration": 0,
"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,
"product": 123,
"modified_subscription": 123
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contract: 123,
rate: 0,
quantity: 0,
period_amount: 0,
invoiced_amount_migration: 0,
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,
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'contract' => 123,
'rate' => 0,
'quantity' => 0,
'period_amount' => 0,
'invoiced_amount_migration' => 0,
'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,
'product' => 123,
'modified_subscription' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 \"contract\": 123,\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\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 \"product\": 123,\n \"modified_subscription\": 123\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "<api-key>")
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.put("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/subscriptions/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contract\": 123,\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\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 \"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::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contract\": 123,\n \"rate\": 0,\n \"quantity\": 0,\n \"period_amount\": 0,\n \"invoiced_amount_migration\": 0,\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 \"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,
  "period_amount": 0,
  "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,
  "product": 123,
  "modified_subscription": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

contract_id
integer
required
id
integer
required

Body

contract
integer
required
rate
number<double> | null
Required range: -10000000000000 < x < 10000000000000
quantity
number<double> | null
Required range: -100000000000000 < x < 100000000000000
renewal_behavior
enum<string>

Controls 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 Contract
  • FIXED_END - Fixed End Date
Available options:
FOLLOW_CONTRACT,
FIXED_END
period_amount
number<double> | null

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.

Required range: -1000000000000000000 < x < 1000000000000000000
invoiced_amount_migration
number<double> | null
write-only

Migration-only: total amount already invoiced in a prior system. When provided, marks revenue transactions as migration-invoiced up to this amount.

Required range: -1000000000000000000 < x < 1000000000000000000
is_contract_amendment
boolean
start_date
string<date> | null
end_date
string<date> | null
mrr
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
discount
number<double> | null

Per-unit discount in contract currency. Line amount is Quantity × (Rate − Discount). Null when no discount is configured.

Required range: 0 <= x < 10000000000000
notes
string | null
use_daily_accounting
boolean
proration_method
enum<string>
  • standard - Standard (actual month length)
  • thirty_day - Fixed 30-day month
  • daily - Daily
Available options:
standard,
thirty_day,
daily
use_catchup
boolean
catchup_date
string<date> | null
catchup_manually_overridden
boolean

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.

invoice_calculation
enum<string>

Fixed Rate: rate stays constant, quantity calculated. Fixed Quantity: quantity stays constant (e.g., seats), rate calculated.

  • FIXED_RATE - Fixed Rate
  • FIXED_QUANTITY - Fixed Quantity
Available options:
FIXED_RATE,
FIXED_QUANTITY
source
enum<string>
  • SALESFORCE - Salesforce
  • HUBSPOT - Hubspot
  • STRIPE - Stripe
  • MANUAL - Manual
Available options:
SALESFORCE,
HUBSPOT,
STRIPE,
MANUAL
external_id
string | null
Maximum string length: 250
rates_are_net
boolean

When 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.

product
integer | null
modified_subscription
integer | null

Response

200 - application/json
id
integer
required
read-only
is_deleted
boolean
default:false
required
read-only
deleted_at
string<date-time> | null
required
read-only
lines
string
required
read-only
product_name
string
required
read-only
product_is_renewable
boolean | null
required
read-only
product_bundle
string
required
read-only
product_bundle_name
string
required
read-only
contract_product_bundle
object
required

Read-only serializer for ContractProductBundle in milestone responses.

total_value
number<double>
required
read-only
Required range: -1000000000000000000 < x < 1000000000000000000
last_modified_at
string<date-time>
required
read-only
created_at
string<date-time>
required
read-only
customer
integer
required
read-only
contract
integer
required
rate
number<double> | null
Required range: -10000000000000 < x < 10000000000000
quantity
number<double> | null
Required range: -100000000000000 < x < 100000000000000
renewal_behavior
enum<string>

Controls 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 Contract
  • FIXED_END - Fixed End Date
Available options:
FOLLOW_CONTRACT,
FIXED_END
period_amount
number<double> | null

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.

Required range: -1000000000000000000 < x < 1000000000000000000
is_contract_amendment
boolean
start_date
string<date> | null
end_date
string<date> | null
mrr
number<double> | null
Required range: -1000000000000000000 < x < 1000000000000000000
discount
number<double> | null

Per-unit discount in contract currency. Line amount is Quantity × (Rate − Discount). Null when no discount is configured.

Required range: 0 <= x < 10000000000000
notes
string | null
use_daily_accounting
boolean
proration_method
enum<string>
  • standard - Standard (actual month length)
  • thirty_day - Fixed 30-day month
  • daily - Daily
Available options:
standard,
thirty_day,
daily
use_catchup
boolean
catchup_date
string<date> | null
catchup_manually_overridden
boolean

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.

invoice_calculation
enum<string>

Fixed Rate: rate stays constant, quantity calculated. Fixed Quantity: quantity stays constant (e.g., seats), rate calculated.

  • FIXED_RATE - Fixed Rate
  • FIXED_QUANTITY - Fixed Quantity
Available options:
FIXED_RATE,
FIXED_QUANTITY
source
enum<string>
  • SALESFORCE - Salesforce
  • HUBSPOT - Hubspot
  • STRIPE - Stripe
  • MANUAL - Manual
Available options:
SALESFORCE,
HUBSPOT,
STRIPE,
MANUAL
external_id
string | null
Maximum string length: 250
rates_are_net
boolean

When 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.

product
integer | null
modified_subscription
integer | null