Update Bundle Allocations
curl --request PUT \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"product": 123,
"amount": 0
}
]
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations"
payload = { "lines": [
{
"product": 123,
"amount": 0
}
] }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({lines: [{product: 123, amount: 0}]})
};
fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations', 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}/milestones/{milestone_id}/allocations",
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([
'lines' => [
[
'product' => 123,
'amount' => 0
]
]
]),
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}/milestones/{milestone_id}/allocations"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"product\": 123,\n \"amount\": 0\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"product\": 123,\n \"amount\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lines\": [\n {\n \"product\": 123,\n \"amount\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"source_bundle": 123,
"source_bundle_name": "<string>",
"total_amount": 0,
"currency": "<string>",
"lines": [
{
"id": 123,
"product": 123,
"product_name": "<string>",
"product_id_str": "<string>",
"amount": 0,
"percentage": "<string>",
"original_percentage": 0,
"component_type": "SUBSCRIPTION"
}
],
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"license_term_start_date": "2023-12-25"
}Revenue Recognition
Update Bundle Allocations
Update the bundle allocations for a contract item.
The sum of all line amounts must equal the bundle’s total_amount. Changes will cascade to related RevenueTransactions and JournalEntries.
PUT
/
rr
/
api
/
v1
/
contracts
/
{contract_id}
/
milestones
/
{milestone_id}
/
allocations
Update Bundle Allocations
curl --request PUT \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"product": 123,
"amount": 0
}
]
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations"
payload = { "lines": [
{
"product": 123,
"amount": 0
}
] }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({lines: [{product: 123, amount: 0}]})
};
fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations', 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}/milestones/{milestone_id}/allocations",
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([
'lines' => [
[
'product' => 123,
'amount' => 0
]
]
]),
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}/milestones/{milestone_id}/allocations"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"product\": 123,\n \"amount\": 0\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"product\": 123,\n \"amount\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lines\": [\n {\n \"product\": 123,\n \"amount\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"source_bundle": 123,
"source_bundle_name": "<string>",
"total_amount": 0,
"currency": "<string>",
"lines": [
{
"id": 123,
"product": 123,
"product_name": "<string>",
"product_id_str": "<string>",
"amount": 0,
"percentage": "<string>",
"original_percentage": 0,
"component_type": "SUBSCRIPTION"
}
],
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"license_term_start_date": "2023-12-25"
}Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Serializer for the allocation update request body.
Show child attributes
Show child attributes
Response
200 - application/json
Serializer for ContractProductBundle with nested lines.
Used for retrieving and updating contract-specific bundle allocations. When updating, validates that line amounts sum to total_amount.
Original ProductBundle template this was created from
Total amount to be allocated across products
Required range:
-1000000000000000000 < x < 1000000000000000000Show child attributes
Show child attributes
Date the license/service term begins. For SF-ingested mixed bundles, drives the linked subscription start_date and milestone milestone_date. Snapshotted at ingest time for audit.