Create Prepaid Commit
curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"total_value": 0,
"start_date": "2023-12-25",
"first_invoice_date": "2023-12-25",
"billing_payment_term": 123,
"entity": 123,
"product": 123,
"description": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"discount_percentage": 50,
"rate": 50000000000000,
"expiration_date": "2023-12-25",
"priority": -1,
"subledger": 123,
"auto_send_overage_invoices": true,
"overage_invoice_start_month": "2023-12-25",
"department": 123,
"tags": "<string>"
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits"
payload = {
"name": "<string>",
"total_value": 0,
"start_date": "2023-12-25",
"first_invoice_date": "2023-12-25",
"billing_payment_term": 123,
"entity": 123,
"product": 123,
"description": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"discount_percentage": 50,
"rate": 50000000000000,
"expiration_date": "2023-12-25",
"priority": -1,
"subledger": 123,
"auto_send_overage_invoices": True,
"overage_invoice_start_month": "2023-12-25",
"department": 123,
"tags": "<string>"
}
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({
name: '<string>',
total_value: 0,
start_date: '2023-12-25',
first_invoice_date: '2023-12-25',
billing_payment_term: 123,
entity: 123,
product: 123,
description: '<string>',
currency: '<string>',
exchange_rate: 0,
exchange_rate_book: 0,
discount_percentage: 50,
rate: 50000000000000,
expiration_date: '2023-12-25',
priority: -1,
subledger: 123,
auto_send_overage_invoices: true,
overage_invoice_start_month: '2023-12-25',
department: 123,
tags: '<string>'
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits', 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}/prepaid-commits",
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([
'name' => '<string>',
'total_value' => 0,
'start_date' => '2023-12-25',
'first_invoice_date' => '2023-12-25',
'billing_payment_term' => 123,
'entity' => 123,
'product' => 123,
'description' => '<string>',
'currency' => '<string>',
'exchange_rate' => 0,
'exchange_rate_book' => 0,
'discount_percentage' => 50,
'rate' => 50000000000000,
'expiration_date' => '2023-12-25',
'priority' => -1,
'subledger' => 123,
'auto_send_overage_invoices' => true,
'overage_invoice_start_month' => '2023-12-25',
'department' => 123,
'tags' => '<string>'
]),
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}/prepaid-commits"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"total_value\": 0,\n \"start_date\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"billing_payment_term\": 123,\n \"entity\": 123,\n \"product\": 123,\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"discount_percentage\": 50,\n \"rate\": 50000000000000,\n \"expiration_date\": \"2023-12-25\",\n \"priority\": -1,\n \"subledger\": 123,\n \"auto_send_overage_invoices\": true,\n \"overage_invoice_start_month\": \"2023-12-25\",\n \"department\": 123,\n \"tags\": \"<string>\"\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/contracts/{contract_id}/prepaid-commits")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"total_value\": 0,\n \"start_date\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"billing_payment_term\": 123,\n \"entity\": 123,\n \"product\": 123,\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"discount_percentage\": 50,\n \"rate\": 50000000000000,\n \"expiration_date\": \"2023-12-25\",\n \"priority\": -1,\n \"subledger\": 123,\n \"auto_send_overage_invoices\": true,\n \"overage_invoice_start_month\": \"2023-12-25\",\n \"department\": 123,\n \"tags\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits")
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 \"name\": \"<string>\",\n \"total_value\": 0,\n \"start_date\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"billing_payment_term\": 123,\n \"entity\": 123,\n \"product\": 123,\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"discount_percentage\": 50,\n \"rate\": 50000000000000,\n \"expiration_date\": \"2023-12-25\",\n \"priority\": -1,\n \"subledger\": 123,\n \"auto_send_overage_invoices\": true,\n \"overage_invoice_start_month\": \"2023-12-25\",\n \"department\": 123,\n \"tags\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"contract": 123,
"entity_name": "<string>",
"product_name": "<string>",
"name": "<string>",
"total_value": 0,
"remaining_value": 0,
"start_date": "2023-12-25",
"status": "ACTIVE",
"is_invoiced": true,
"invoice": 123,
"department_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"invoice_basis": "fixed_commitment",
"billing_cadence": "one_time",
"billing_timing": "advance",
"first_invoice_date": "2023-12-25",
"billing_payment_term": 123,
"entity": 123,
"product": 123,
"description": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"discount_percentage": 50,
"rate": 50000000000000,
"expiration_date": "2023-12-25",
"priority": -1,
"subledger": 123,
"overage_invoice_cadence": "monthly",
"auto_send_overage_invoices": true,
"overage_invoice_start_month": "2023-12-25",
"department": 123,
"tags": "<string>"
}Revenue Recognition
Create Prepaid Commit
POST
/
rr
/
api
/
v1
/
contracts
/
{contract_id}
/
prepaid-commits
Create Prepaid Commit
curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"total_value": 0,
"start_date": "2023-12-25",
"first_invoice_date": "2023-12-25",
"billing_payment_term": 123,
"entity": 123,
"product": 123,
"description": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"discount_percentage": 50,
"rate": 50000000000000,
"expiration_date": "2023-12-25",
"priority": -1,
"subledger": 123,
"auto_send_overage_invoices": true,
"overage_invoice_start_month": "2023-12-25",
"department": 123,
"tags": "<string>"
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits"
payload = {
"name": "<string>",
"total_value": 0,
"start_date": "2023-12-25",
"first_invoice_date": "2023-12-25",
"billing_payment_term": 123,
"entity": 123,
"product": 123,
"description": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"discount_percentage": 50,
"rate": 50000000000000,
"expiration_date": "2023-12-25",
"priority": -1,
"subledger": 123,
"auto_send_overage_invoices": True,
"overage_invoice_start_month": "2023-12-25",
"department": 123,
"tags": "<string>"
}
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({
name: '<string>',
total_value: 0,
start_date: '2023-12-25',
first_invoice_date: '2023-12-25',
billing_payment_term: 123,
entity: 123,
product: 123,
description: '<string>',
currency: '<string>',
exchange_rate: 0,
exchange_rate_book: 0,
discount_percentage: 50,
rate: 50000000000000,
expiration_date: '2023-12-25',
priority: -1,
subledger: 123,
auto_send_overage_invoices: true,
overage_invoice_start_month: '2023-12-25',
department: 123,
tags: '<string>'
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits', 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}/prepaid-commits",
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([
'name' => '<string>',
'total_value' => 0,
'start_date' => '2023-12-25',
'first_invoice_date' => '2023-12-25',
'billing_payment_term' => 123,
'entity' => 123,
'product' => 123,
'description' => '<string>',
'currency' => '<string>',
'exchange_rate' => 0,
'exchange_rate_book' => 0,
'discount_percentage' => 50,
'rate' => 50000000000000,
'expiration_date' => '2023-12-25',
'priority' => -1,
'subledger' => 123,
'auto_send_overage_invoices' => true,
'overage_invoice_start_month' => '2023-12-25',
'department' => 123,
'tags' => '<string>'
]),
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}/prepaid-commits"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"total_value\": 0,\n \"start_date\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"billing_payment_term\": 123,\n \"entity\": 123,\n \"product\": 123,\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"discount_percentage\": 50,\n \"rate\": 50000000000000,\n \"expiration_date\": \"2023-12-25\",\n \"priority\": -1,\n \"subledger\": 123,\n \"auto_send_overage_invoices\": true,\n \"overage_invoice_start_month\": \"2023-12-25\",\n \"department\": 123,\n \"tags\": \"<string>\"\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/contracts/{contract_id}/prepaid-commits")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"total_value\": 0,\n \"start_date\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"billing_payment_term\": 123,\n \"entity\": 123,\n \"product\": 123,\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"discount_percentage\": 50,\n \"rate\": 50000000000000,\n \"expiration_date\": \"2023-12-25\",\n \"priority\": -1,\n \"subledger\": 123,\n \"auto_send_overage_invoices\": true,\n \"overage_invoice_start_month\": \"2023-12-25\",\n \"department\": 123,\n \"tags\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/prepaid-commits")
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 \"name\": \"<string>\",\n \"total_value\": 0,\n \"start_date\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"billing_payment_term\": 123,\n \"entity\": 123,\n \"product\": 123,\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"discount_percentage\": 50,\n \"rate\": 50000000000000,\n \"expiration_date\": \"2023-12-25\",\n \"priority\": -1,\n \"subledger\": 123,\n \"auto_send_overage_invoices\": true,\n \"overage_invoice_start_month\": \"2023-12-25\",\n \"department\": 123,\n \"tags\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"contract": 123,
"entity_name": "<string>",
"product_name": "<string>",
"name": "<string>",
"total_value": 0,
"remaining_value": 0,
"start_date": "2023-12-25",
"status": "ACTIVE",
"is_invoiced": true,
"invoice": 123,
"department_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"invoice_basis": "fixed_commitment",
"billing_cadence": "one_time",
"billing_timing": "advance",
"first_invoice_date": "2023-12-25",
"billing_payment_term": 123,
"entity": 123,
"product": 123,
"description": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"discount_percentage": 50,
"rate": 50000000000000,
"expiration_date": "2023-12-25",
"priority": -1,
"subledger": 123,
"overage_invoice_cadence": "monthly",
"auto_send_overage_invoices": true,
"overage_invoice_start_month": "2023-12-25",
"department": 123,
"tags": "<string>"
}Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Maximum string length:
250Required range:
-1000000000000000000 < x < 1000000000000000000fixed_commitment- Fixed commitmentactual_drawdown- Actual usage in arrears
Available options:
fixed_commitment, actual_drawdown one_time- One timemonthly- Monthlyquarterly- Quarterlybiannual- Semiannualannual- Annual
Available options:
one_time, monthly, quarterly, biannual, annual advance- In advancearrears- In arrears
Available options:
advance, arrears Maximum string length:
3Required range:
-100000000000000 < x < 100000000000000Required range:
-100000000000000 < x < 100000000000000Discount applied to gross usage (e.g. 20.00 for 20%)
Required range:
0 <= x <= 100List price per unit. Prepaid usage = rate * (1 - discount%). Overage = rate (no discount).
Required range:
0 <= x < 100000000000000Drawdown order when multiple commits exist (lower = higher priority)
Required range:
-2147483648 <= x <= 2147483647How often overage/on-demand usage is invoiced
monthly- Monthlyquarterly- Quarterlybiannual- Bi Annualyannual- Annualone_time- One Timecustom- Custom
Available options:
monthly, quarterly, biannual, annual, one_time, custom Automatically send overage invoices when generated
Anchor date for overage billing cycles. Defaults to start_date.
Response
201 - application/json
Maximum string length:
250Required range:
-1000000000000000000 < x < 1000000000000000000Required range:
-1000000000000000000 < x < 1000000000000000000ACTIVE- ActiveEXHAUSTED- ExhaustedEXPIRED- Expired
Available options:
ACTIVE, EXHAUSTED, EXPIRED fixed_commitment- Fixed commitmentactual_drawdown- Actual usage in arrears
Available options:
fixed_commitment, actual_drawdown one_time- One timemonthly- Monthlyquarterly- Quarterlybiannual- Semiannualannual- Annual
Available options:
one_time, monthly, quarterly, biannual, annual advance- In advancearrears- In arrears
Available options:
advance, arrears Maximum string length:
3Required range:
-100000000000000 < x < 100000000000000Required range:
-100000000000000 < x < 100000000000000Discount applied to gross usage (e.g. 20.00 for 20%)
Required range:
0 <= x <= 100List price per unit. Prepaid usage = rate * (1 - discount%). Overage = rate (no discount).
Required range:
0 <= x < 100000000000000Drawdown order when multiple commits exist (lower = higher priority)
Required range:
-2147483648 <= x <= 2147483647How often overage/on-demand usage is invoiced
monthly- Monthlyquarterly- Quarterlybiannual- Bi Annualyannual- Annualone_time- One Timecustom- Custom
Available options:
monthly, quarterly, biannual, annual, one_time, custom Automatically send overage invoices when generated
Anchor date for overage billing cycles. Defaults to start_date.