curl --request PATCH \
--url https://api.meetcampfire.com/rev/api/v1/contract-lines/{id} \
--header 'Content-Type: application/json' \
--data '
{
"contract": 123,
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_name": "<string>",
"product_sku": "<string>",
"description": "<string>",
"currency": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"discount_percent": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"first_invoice_date": "2023-12-25",
"exclude_from_allocation": true,
"is_mrr": true,
"net_terms": 1073741823,
"department": 123,
"tags": [
123
]
}
'import requests
url = "https://api.meetcampfire.com/rev/api/v1/contract-lines/{id}"
payload = {
"contract": 123,
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_name": "<string>",
"product_sku": "<string>",
"description": "<string>",
"currency": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"discount_percent": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"first_invoice_date": "2023-12-25",
"exclude_from_allocation": True,
"is_mrr": True,
"net_terms": 1073741823,
"department": 123,
"tags": [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({
contract: 123,
ordinal: 1073741823,
product: 123,
product_bundle: 123,
rate_card: 123,
product_name: '<string>',
product_sku: '<string>',
description: '<string>',
currency: '<string>',
quantity: 0,
unit_price: 0,
discount: 0,
discount_percent: 0,
transaction_price: 0,
service_start: '2023-12-25',
service_end: '2023-12-25',
first_invoice_date: '2023-12-25',
exclude_from_allocation: true,
is_mrr: true,
net_terms: 1073741823,
department: 123,
tags: [123]
})
};
fetch('https://api.meetcampfire.com/rev/api/v1/contract-lines/{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/rev/api/v1/contract-lines/{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([
'contract' => 123,
'ordinal' => 1073741823,
'product' => 123,
'product_bundle' => 123,
'rate_card' => 123,
'product_name' => '<string>',
'product_sku' => '<string>',
'description' => '<string>',
'currency' => '<string>',
'quantity' => 0,
'unit_price' => 0,
'discount' => 0,
'discount_percent' => 0,
'transaction_price' => 0,
'service_start' => '2023-12-25',
'service_end' => '2023-12-25',
'first_invoice_date' => '2023-12-25',
'exclude_from_allocation' => true,
'is_mrr' => true,
'net_terms' => 1073741823,
'department' => 123,
'tags' => [
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/rev/api/v1/contract-lines/{id}"
payload := strings.NewReader("{\n \"contract\": 123,\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"rate_card\": 123,\n \"product_name\": \"<string>\",\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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/rev/api/v1/contract-lines/{id}")
.header("Content-Type", "application/json")
.body("{\n \"contract\": 123,\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"rate_card\": 123,\n \"product_name\": \"<string>\",\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823,\n \"department\": 123,\n \"tags\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rev/api/v1/contract-lines/{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 \"contract\": 123,\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"rate_card\": 123,\n \"product_name\": \"<string>\",\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823,\n \"department\": 123,\n \"tags\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"contract": 123,
"contract_name": "<string>",
"rate_card_name": "<string>",
"product_name": "<string>",
"overage_rate": 0,
"overage_cadence": "MONTHLY",
"department_name": "",
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_sku": "<string>",
"description": "<string>",
"currency": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"discount_percent": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"first_invoice_date": "2023-12-25",
"exclude_from_allocation": true,
"is_mrr": true,
"billing_cadence": "MONTHLY",
"billing_timing": "ADVANCE",
"invoice_calculation": "FIXED_RATE",
"net_terms": 1073741823,
"department": 123,
"tags": [
123
]
}Partially Update Revenue Contract Line
curl --request PATCH \
--url https://api.meetcampfire.com/rev/api/v1/contract-lines/{id} \
--header 'Content-Type: application/json' \
--data '
{
"contract": 123,
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_name": "<string>",
"product_sku": "<string>",
"description": "<string>",
"currency": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"discount_percent": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"first_invoice_date": "2023-12-25",
"exclude_from_allocation": true,
"is_mrr": true,
"net_terms": 1073741823,
"department": 123,
"tags": [
123
]
}
'import requests
url = "https://api.meetcampfire.com/rev/api/v1/contract-lines/{id}"
payload = {
"contract": 123,
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_name": "<string>",
"product_sku": "<string>",
"description": "<string>",
"currency": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"discount_percent": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"first_invoice_date": "2023-12-25",
"exclude_from_allocation": True,
"is_mrr": True,
"net_terms": 1073741823,
"department": 123,
"tags": [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({
contract: 123,
ordinal: 1073741823,
product: 123,
product_bundle: 123,
rate_card: 123,
product_name: '<string>',
product_sku: '<string>',
description: '<string>',
currency: '<string>',
quantity: 0,
unit_price: 0,
discount: 0,
discount_percent: 0,
transaction_price: 0,
service_start: '2023-12-25',
service_end: '2023-12-25',
first_invoice_date: '2023-12-25',
exclude_from_allocation: true,
is_mrr: true,
net_terms: 1073741823,
department: 123,
tags: [123]
})
};
fetch('https://api.meetcampfire.com/rev/api/v1/contract-lines/{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/rev/api/v1/contract-lines/{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([
'contract' => 123,
'ordinal' => 1073741823,
'product' => 123,
'product_bundle' => 123,
'rate_card' => 123,
'product_name' => '<string>',
'product_sku' => '<string>',
'description' => '<string>',
'currency' => '<string>',
'quantity' => 0,
'unit_price' => 0,
'discount' => 0,
'discount_percent' => 0,
'transaction_price' => 0,
'service_start' => '2023-12-25',
'service_end' => '2023-12-25',
'first_invoice_date' => '2023-12-25',
'exclude_from_allocation' => true,
'is_mrr' => true,
'net_terms' => 1073741823,
'department' => 123,
'tags' => [
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/rev/api/v1/contract-lines/{id}"
payload := strings.NewReader("{\n \"contract\": 123,\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"rate_card\": 123,\n \"product_name\": \"<string>\",\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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/rev/api/v1/contract-lines/{id}")
.header("Content-Type", "application/json")
.body("{\n \"contract\": 123,\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"rate_card\": 123,\n \"product_name\": \"<string>\",\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823,\n \"department\": 123,\n \"tags\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rev/api/v1/contract-lines/{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 \"contract\": 123,\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"rate_card\": 123,\n \"product_name\": \"<string>\",\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"first_invoice_date\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823,\n \"department\": 123,\n \"tags\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"contract": 123,
"contract_name": "<string>",
"rate_card_name": "<string>",
"product_name": "<string>",
"overage_rate": 0,
"overage_cadence": "MONTHLY",
"department_name": "",
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_sku": "<string>",
"description": "<string>",
"currency": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"discount_percent": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"first_invoice_date": "2023-12-25",
"exclude_from_allocation": true,
"is_mrr": true,
"billing_cadence": "MONTHLY",
"billing_timing": "ADVANCE",
"invoice_calculation": "FIXED_RATE",
"net_terms": 1073741823,
"department": 123,
"tags": [
123
]
}Path Parameters
Body
Base serializer that injects the request user's customer on create and restricts related-object querysets to the same customer.
0 <= x <= 2147483647Rate card used to price usage reported against this line.
2552553-100000000000 < x < 100000000000-1000000000000000 < x < 1000000000000000-10000000000000 < x < 10000000000000When set, the line discount is this percentage of quantity × unit price and discount holds the resulting amount; null means the discount was entered as an amount.
-1000 < x < 1000-10000000000000 < x < 10000000000000Date the first invoice is issued; later invoices follow one billing cadence apart. Defaults to service start. Service periods stay on the contract's dates.
MONTHLY- MonthlyQUARTERLY- QuarterlySEMI_ANNUAL- Semi-annualANNUAL- AnnualONE_TIME- One TimeCUSTOM- Custom
MONTHLY, QUARTERLY, SEMI_ANNUAL, ANNUAL, ONE_TIME, CUSTOM ADVANCE- In advance (start of period)ARREARS- In arrears (end of period)ON_DEMAND- On Demand (In arrears from usage)
ADVANCE, ARREARS, ON_DEMAND FIXED_RATE- Fixed RateFIXED_QUANTITY- Fixed Quantity
FIXED_RATE, FIXED_QUANTITY 0 <= x <= 2147483647Response
Base serializer that injects the request user's customer on create and restricts related-object querysets to the same customer.
255-1000000000000000 < x < 1000000000000000MONTHLY- MonthlyQUARTERLY- QuarterlySEMI_ANNUAL- Semi-annualANNUAL- AnnualONE_TIME- One TimeCUSTOM- Custom
MONTHLY, QUARTERLY, SEMI_ANNUAL, ANNUAL, ONE_TIME, CUSTOM 0 <= x <= 2147483647Rate card used to price usage reported against this line.
2553-100000000000 < x < 100000000000-1000000000000000 < x < 1000000000000000-10000000000000 < x < 10000000000000When set, the line discount is this percentage of quantity × unit price and discount holds the resulting amount; null means the discount was entered as an amount.
-1000 < x < 1000-10000000000000 < x < 10000000000000Date the first invoice is issued; later invoices follow one billing cadence apart. Defaults to service start. Service periods stay on the contract's dates.
MONTHLY- MonthlyQUARTERLY- QuarterlySEMI_ANNUAL- Semi-annualANNUAL- AnnualONE_TIME- One TimeCUSTOM- Custom
MONTHLY, QUARTERLY, SEMI_ANNUAL, ANNUAL, ONE_TIME, CUSTOM ADVANCE- In advance (start of period)ARREARS- In arrears (end of period)ON_DEMAND- On Demand (In arrears from usage)
ADVANCE, ARREARS, ON_DEMAND FIXED_RATE- Fixed RateFIXED_QUANTITY- Fixed Quantity
FIXED_RATE, FIXED_QUANTITY 0 <= x <= 2147483647