Partially Update Revenue Contract
curl --request PATCH \
--url https://api.meetcampfire.com/rev/api/v1/contracts/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"entity": 123,
"client": 123,
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"department": 123,
"tags": [
123
],
"execution_date": "2023-12-25",
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"terminated_date": "2023-12-25",
"currency": "<string>",
"termination_notice_days": 1073741823,
"payment_term": 123,
"header_discount": 0,
"bill_to_snapshot": "<unknown>",
"shipping_snapshot": "<unknown>",
"dimensions": "<unknown>",
"revenue_hold_from": "2023-12-25",
"revenue_hold_reason": "<string>",
"carry_in": "<unknown>",
"carry_out": "<unknown>",
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"product_sku": "<string>",
"description": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"exclude_from_allocation": true,
"is_mrr": true,
"net_terms": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"product": 123,
"obligation_template": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123
}
]
}
'import requests
url = "https://api.meetcampfire.com/rev/api/v1/contracts/{id}"
payload = {
"name": "<string>",
"entity": 123,
"client": 123,
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"department": 123,
"tags": [123],
"execution_date": "2023-12-25",
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"terminated_date": "2023-12-25",
"currency": "<string>",
"termination_notice_days": 1073741823,
"payment_term": 123,
"header_discount": 0,
"bill_to_snapshot": "<unknown>",
"shipping_snapshot": "<unknown>",
"dimensions": "<unknown>",
"revenue_hold_from": "2023-12-25",
"revenue_hold_reason": "<string>",
"carry_in": "<unknown>",
"carry_out": "<unknown>",
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"product_sku": "<string>",
"description": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"exclude_from_allocation": True,
"is_mrr": True,
"net_terms": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"product": 123,
"obligation_template": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
entity: 123,
client: 123,
consultant: '<string>',
crm_opportunity_id: '<string>',
crm_link: '<string>',
contract_link: '<string>',
purchase_order_number: '<string>',
department: 123,
tags: [123],
execution_date: '2023-12-25',
service_start: '2023-12-25',
service_end: '2023-12-25',
terminated_date: '2023-12-25',
currency: '<string>',
termination_notice_days: 1073741823,
payment_term: 123,
header_discount: 0,
bill_to_snapshot: '<unknown>',
shipping_snapshot: '<unknown>',
dimensions: '<unknown>',
revenue_hold_from: '2023-12-25',
revenue_hold_reason: '<string>',
carry_in: '<unknown>',
carry_out: '<unknown>',
renewed_into: 123,
lines: [
{
product_name: '<string>',
id: 123,
key: '<string>',
ordinal: 1073741823,
product: 123,
product_bundle: 123,
product_sku: '<string>',
description: '<string>',
quantity: 0,
unit_price: 0,
discount: 0,
transaction_price: 0,
service_start: '2023-12-25',
service_end: '2023-12-25',
exclude_from_allocation: true,
is_mrr: true,
net_terms: 1073741823
}
],
obligations: [
{
id: 123,
line_key: '<string>',
product: 123,
obligation_template: 123,
invoiced_amount: 0,
allocated_amount: 0,
start_date: '2023-12-25',
end_date: '2023-12-25',
revenue_account: 123,
deferred_revenue_account: 123
}
]
})
};
fetch('https://api.meetcampfire.com/rev/api/v1/contracts/{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/contracts/{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([
'name' => '<string>',
'entity' => 123,
'client' => 123,
'consultant' => '<string>',
'crm_opportunity_id' => '<string>',
'crm_link' => '<string>',
'contract_link' => '<string>',
'purchase_order_number' => '<string>',
'department' => 123,
'tags' => [
123
],
'execution_date' => '2023-12-25',
'service_start' => '2023-12-25',
'service_end' => '2023-12-25',
'terminated_date' => '2023-12-25',
'currency' => '<string>',
'termination_notice_days' => 1073741823,
'payment_term' => 123,
'header_discount' => 0,
'bill_to_snapshot' => '<unknown>',
'shipping_snapshot' => '<unknown>',
'dimensions' => '<unknown>',
'revenue_hold_from' => '2023-12-25',
'revenue_hold_reason' => '<string>',
'carry_in' => '<unknown>',
'carry_out' => '<unknown>',
'renewed_into' => 123,
'lines' => [
[
'product_name' => '<string>',
'id' => 123,
'key' => '<string>',
'ordinal' => 1073741823,
'product' => 123,
'product_bundle' => 123,
'product_sku' => '<string>',
'description' => '<string>',
'quantity' => 0,
'unit_price' => 0,
'discount' => 0,
'transaction_price' => 0,
'service_start' => '2023-12-25',
'service_end' => '2023-12-25',
'exclude_from_allocation' => true,
'is_mrr' => true,
'net_terms' => 1073741823
]
],
'obligations' => [
[
'id' => 123,
'line_key' => '<string>',
'product' => 123,
'obligation_template' => 123,
'invoiced_amount' => 0,
'allocated_amount' => 0,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'revenue_account' => 123,
'deferred_revenue_account' => 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/rev/api/v1/contracts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"consultant\": \"<string>\",\n \"crm_opportunity_id\": \"<string>\",\n \"crm_link\": \"<string>\",\n \"contract_link\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"department\": 123,\n \"tags\": [\n 123\n ],\n \"execution_date\": \"2023-12-25\",\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"terminated_date\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"termination_notice_days\": 1073741823,\n \"payment_term\": 123,\n \"header_discount\": 0,\n \"bill_to_snapshot\": \"<unknown>\",\n \"shipping_snapshot\": \"<unknown>\",\n \"dimensions\": \"<unknown>\",\n \"revenue_hold_from\": \"2023-12-25\",\n \"revenue_hold_reason\": \"<string>\",\n \"carry_in\": \"<unknown>\",\n \"carry_out\": \"<unknown>\",\n \"renewed_into\": 123,\n \"lines\": [\n {\n \"product_name\": \"<string>\",\n \"id\": 123,\n \"key\": \"<string>\",\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823\n }\n ],\n \"obligations\": [\n {\n \"id\": 123,\n \"line_key\": \"<string>\",\n \"product\": 123,\n \"obligation_template\": 123,\n \"invoiced_amount\": 0,\n \"allocated_amount\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.meetcampfire.com/rev/api/v1/contracts/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"consultant\": \"<string>\",\n \"crm_opportunity_id\": \"<string>\",\n \"crm_link\": \"<string>\",\n \"contract_link\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"department\": 123,\n \"tags\": [\n 123\n ],\n \"execution_date\": \"2023-12-25\",\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"terminated_date\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"termination_notice_days\": 1073741823,\n \"payment_term\": 123,\n \"header_discount\": 0,\n \"bill_to_snapshot\": \"<unknown>\",\n \"shipping_snapshot\": \"<unknown>\",\n \"dimensions\": \"<unknown>\",\n \"revenue_hold_from\": \"2023-12-25\",\n \"revenue_hold_reason\": \"<string>\",\n \"carry_in\": \"<unknown>\",\n \"carry_out\": \"<unknown>\",\n \"renewed_into\": 123,\n \"lines\": [\n {\n \"product_name\": \"<string>\",\n \"id\": 123,\n \"key\": \"<string>\",\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823\n }\n ],\n \"obligations\": [\n {\n \"id\": 123,\n \"line_key\": \"<string>\",\n \"product\": 123,\n \"obligation_template\": 123,\n \"invoiced_amount\": 0,\n \"allocated_amount\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rev/api/v1/contracts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"consultant\": \"<string>\",\n \"crm_opportunity_id\": \"<string>\",\n \"crm_link\": \"<string>\",\n \"contract_link\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"department\": 123,\n \"tags\": [\n 123\n ],\n \"execution_date\": \"2023-12-25\",\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"terminated_date\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"termination_notice_days\": 1073741823,\n \"payment_term\": 123,\n \"header_discount\": 0,\n \"bill_to_snapshot\": \"<unknown>\",\n \"shipping_snapshot\": \"<unknown>\",\n \"dimensions\": \"<unknown>\",\n \"revenue_hold_from\": \"2023-12-25\",\n \"revenue_hold_reason\": \"<string>\",\n \"carry_in\": \"<unknown>\",\n \"carry_out\": \"<unknown>\",\n \"renewed_into\": 123,\n \"lines\": [\n {\n \"product_name\": \"<string>\",\n \"id\": 123,\n \"key\": \"<string>\",\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823\n }\n ],\n \"obligations\": [\n {\n \"id\": 123,\n \"line_key\": \"<string>\",\n \"product\": 123,\n \"obligation_template\": 123,\n \"invoiced_amount\": 0,\n \"allocated_amount\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"entity_name": "<string>",
"client_name": "<string>",
"department_name": "<string>",
"payment_term_name": "",
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"entity": 123,
"client": 123,
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"department": 123,
"tags": [
123
],
"execution_date": "2023-12-25",
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"terminated_date": "2023-12-25",
"currency": "<string>",
"termination_notice_days": 1073741823,
"payment_term": 123,
"header_discount": 0,
"bill_to_snapshot": "<unknown>",
"shipping_snapshot": "<unknown>",
"dimensions": "<unknown>",
"revenue_hold_from": "2023-12-25",
"revenue_hold_reason": "<string>",
"carry_in": "<unknown>",
"carry_out": "<unknown>",
"renewed_into": 123
}Revenue
Partially Update Revenue Contract
PATCH
/
rev
/
api
/
v1
/
contracts
/
{id}
Partially Update Revenue Contract
curl --request PATCH \
--url https://api.meetcampfire.com/rev/api/v1/contracts/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"entity": 123,
"client": 123,
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"department": 123,
"tags": [
123
],
"execution_date": "2023-12-25",
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"terminated_date": "2023-12-25",
"currency": "<string>",
"termination_notice_days": 1073741823,
"payment_term": 123,
"header_discount": 0,
"bill_to_snapshot": "<unknown>",
"shipping_snapshot": "<unknown>",
"dimensions": "<unknown>",
"revenue_hold_from": "2023-12-25",
"revenue_hold_reason": "<string>",
"carry_in": "<unknown>",
"carry_out": "<unknown>",
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"product_sku": "<string>",
"description": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"exclude_from_allocation": true,
"is_mrr": true,
"net_terms": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"product": 123,
"obligation_template": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123
}
]
}
'import requests
url = "https://api.meetcampfire.com/rev/api/v1/contracts/{id}"
payload = {
"name": "<string>",
"entity": 123,
"client": 123,
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"department": 123,
"tags": [123],
"execution_date": "2023-12-25",
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"terminated_date": "2023-12-25",
"currency": "<string>",
"termination_notice_days": 1073741823,
"payment_term": 123,
"header_discount": 0,
"bill_to_snapshot": "<unknown>",
"shipping_snapshot": "<unknown>",
"dimensions": "<unknown>",
"revenue_hold_from": "2023-12-25",
"revenue_hold_reason": "<string>",
"carry_in": "<unknown>",
"carry_out": "<unknown>",
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"product_sku": "<string>",
"description": "<string>",
"quantity": 0,
"unit_price": 0,
"discount": 0,
"transaction_price": 0,
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"exclude_from_allocation": True,
"is_mrr": True,
"net_terms": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"product": 123,
"obligation_template": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
entity: 123,
client: 123,
consultant: '<string>',
crm_opportunity_id: '<string>',
crm_link: '<string>',
contract_link: '<string>',
purchase_order_number: '<string>',
department: 123,
tags: [123],
execution_date: '2023-12-25',
service_start: '2023-12-25',
service_end: '2023-12-25',
terminated_date: '2023-12-25',
currency: '<string>',
termination_notice_days: 1073741823,
payment_term: 123,
header_discount: 0,
bill_to_snapshot: '<unknown>',
shipping_snapshot: '<unknown>',
dimensions: '<unknown>',
revenue_hold_from: '2023-12-25',
revenue_hold_reason: '<string>',
carry_in: '<unknown>',
carry_out: '<unknown>',
renewed_into: 123,
lines: [
{
product_name: '<string>',
id: 123,
key: '<string>',
ordinal: 1073741823,
product: 123,
product_bundle: 123,
product_sku: '<string>',
description: '<string>',
quantity: 0,
unit_price: 0,
discount: 0,
transaction_price: 0,
service_start: '2023-12-25',
service_end: '2023-12-25',
exclude_from_allocation: true,
is_mrr: true,
net_terms: 1073741823
}
],
obligations: [
{
id: 123,
line_key: '<string>',
product: 123,
obligation_template: 123,
invoiced_amount: 0,
allocated_amount: 0,
start_date: '2023-12-25',
end_date: '2023-12-25',
revenue_account: 123,
deferred_revenue_account: 123
}
]
})
};
fetch('https://api.meetcampfire.com/rev/api/v1/contracts/{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/contracts/{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([
'name' => '<string>',
'entity' => 123,
'client' => 123,
'consultant' => '<string>',
'crm_opportunity_id' => '<string>',
'crm_link' => '<string>',
'contract_link' => '<string>',
'purchase_order_number' => '<string>',
'department' => 123,
'tags' => [
123
],
'execution_date' => '2023-12-25',
'service_start' => '2023-12-25',
'service_end' => '2023-12-25',
'terminated_date' => '2023-12-25',
'currency' => '<string>',
'termination_notice_days' => 1073741823,
'payment_term' => 123,
'header_discount' => 0,
'bill_to_snapshot' => '<unknown>',
'shipping_snapshot' => '<unknown>',
'dimensions' => '<unknown>',
'revenue_hold_from' => '2023-12-25',
'revenue_hold_reason' => '<string>',
'carry_in' => '<unknown>',
'carry_out' => '<unknown>',
'renewed_into' => 123,
'lines' => [
[
'product_name' => '<string>',
'id' => 123,
'key' => '<string>',
'ordinal' => 1073741823,
'product' => 123,
'product_bundle' => 123,
'product_sku' => '<string>',
'description' => '<string>',
'quantity' => 0,
'unit_price' => 0,
'discount' => 0,
'transaction_price' => 0,
'service_start' => '2023-12-25',
'service_end' => '2023-12-25',
'exclude_from_allocation' => true,
'is_mrr' => true,
'net_terms' => 1073741823
]
],
'obligations' => [
[
'id' => 123,
'line_key' => '<string>',
'product' => 123,
'obligation_template' => 123,
'invoiced_amount' => 0,
'allocated_amount' => 0,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'revenue_account' => 123,
'deferred_revenue_account' => 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/rev/api/v1/contracts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"consultant\": \"<string>\",\n \"crm_opportunity_id\": \"<string>\",\n \"crm_link\": \"<string>\",\n \"contract_link\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"department\": 123,\n \"tags\": [\n 123\n ],\n \"execution_date\": \"2023-12-25\",\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"terminated_date\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"termination_notice_days\": 1073741823,\n \"payment_term\": 123,\n \"header_discount\": 0,\n \"bill_to_snapshot\": \"<unknown>\",\n \"shipping_snapshot\": \"<unknown>\",\n \"dimensions\": \"<unknown>\",\n \"revenue_hold_from\": \"2023-12-25\",\n \"revenue_hold_reason\": \"<string>\",\n \"carry_in\": \"<unknown>\",\n \"carry_out\": \"<unknown>\",\n \"renewed_into\": 123,\n \"lines\": [\n {\n \"product_name\": \"<string>\",\n \"id\": 123,\n \"key\": \"<string>\",\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823\n }\n ],\n \"obligations\": [\n {\n \"id\": 123,\n \"line_key\": \"<string>\",\n \"product\": 123,\n \"obligation_template\": 123,\n \"invoiced_amount\": 0,\n \"allocated_amount\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.meetcampfire.com/rev/api/v1/contracts/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"consultant\": \"<string>\",\n \"crm_opportunity_id\": \"<string>\",\n \"crm_link\": \"<string>\",\n \"contract_link\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"department\": 123,\n \"tags\": [\n 123\n ],\n \"execution_date\": \"2023-12-25\",\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"terminated_date\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"termination_notice_days\": 1073741823,\n \"payment_term\": 123,\n \"header_discount\": 0,\n \"bill_to_snapshot\": \"<unknown>\",\n \"shipping_snapshot\": \"<unknown>\",\n \"dimensions\": \"<unknown>\",\n \"revenue_hold_from\": \"2023-12-25\",\n \"revenue_hold_reason\": \"<string>\",\n \"carry_in\": \"<unknown>\",\n \"carry_out\": \"<unknown>\",\n \"renewed_into\": 123,\n \"lines\": [\n {\n \"product_name\": \"<string>\",\n \"id\": 123,\n \"key\": \"<string>\",\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823\n }\n ],\n \"obligations\": [\n {\n \"id\": 123,\n \"line_key\": \"<string>\",\n \"product\": 123,\n \"obligation_template\": 123,\n \"invoiced_amount\": 0,\n \"allocated_amount\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rev/api/v1/contracts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"consultant\": \"<string>\",\n \"crm_opportunity_id\": \"<string>\",\n \"crm_link\": \"<string>\",\n \"contract_link\": \"<string>\",\n \"purchase_order_number\": \"<string>\",\n \"department\": 123,\n \"tags\": [\n 123\n ],\n \"execution_date\": \"2023-12-25\",\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"terminated_date\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"termination_notice_days\": 1073741823,\n \"payment_term\": 123,\n \"header_discount\": 0,\n \"bill_to_snapshot\": \"<unknown>\",\n \"shipping_snapshot\": \"<unknown>\",\n \"dimensions\": \"<unknown>\",\n \"revenue_hold_from\": \"2023-12-25\",\n \"revenue_hold_reason\": \"<string>\",\n \"carry_in\": \"<unknown>\",\n \"carry_out\": \"<unknown>\",\n \"renewed_into\": 123,\n \"lines\": [\n {\n \"product_name\": \"<string>\",\n \"id\": 123,\n \"key\": \"<string>\",\n \"ordinal\": 1073741823,\n \"product\": 123,\n \"product_bundle\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 0,\n \"unit_price\": 0,\n \"discount\": 0,\n \"transaction_price\": 0,\n \"service_start\": \"2023-12-25\",\n \"service_end\": \"2023-12-25\",\n \"exclude_from_allocation\": true,\n \"is_mrr\": true,\n \"net_terms\": 1073741823\n }\n ],\n \"obligations\": [\n {\n \"id\": 123,\n \"line_key\": \"<string>\",\n \"product\": 123,\n \"obligation_template\": 123,\n \"invoiced_amount\": 0,\n \"allocated_amount\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"entity_name": "<string>",
"client_name": "<string>",
"department_name": "<string>",
"payment_term_name": "",
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"entity": 123,
"client": 123,
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"department": 123,
"tags": [
123
],
"execution_date": "2023-12-25",
"service_start": "2023-12-25",
"service_end": "2023-12-25",
"terminated_date": "2023-12-25",
"currency": "<string>",
"termination_notice_days": 1073741823,
"payment_term": 123,
"header_discount": 0,
"bill_to_snapshot": "<unknown>",
"shipping_snapshot": "<unknown>",
"dimensions": "<unknown>",
"revenue_hold_from": "2023-12-25",
"revenue_hold_reason": "<string>",
"carry_in": "<unknown>",
"carry_out": "<unknown>",
"renewed_into": 123
}Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Base serializer that injects the request user's customer on create and restricts related-object querysets to the same customer.
Maximum string length:
255PENDING_REVIEW- Pending reviewACTIVE- ActiveCOMPLETED- Fully recognizedEARLY_RENEWED- Early-renewedTERMINATED- Terminated
Available options:
PENDING_REVIEW, ACTIVE, COMPLETED, EARLY_RENEWED, TERMINATED SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
Available options:
SALESFORCE, HUBSPOT, STRIPE, MANUAL Maximum string length:
250Maximum string length:
255Maximum string length:
500Maximum string length:
500Maximum string length:
120Maximum string length:
3Required range:
0 <= x <= 2147483647Payment terms for generated invoices; lines snapshot its days. None means due on receipt.
NONE- NoneAUTO_RENEW- Auto-renewMANUAL- Manual renewal
Available options:
NONE, AUTO_RENEW, MANUAL Required range:
-10000000000000 < x < 10000000000000Maximum string length:
500Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200 - application/json
Base serializer that injects the request user's customer on create and restricts related-object querysets to the same customer.
Maximum string length:
255PENDING_REVIEW- Pending reviewACTIVE- ActiveCOMPLETED- Fully recognizedEARLY_RENEWED- Early-renewedTERMINATED- Terminated
Available options:
PENDING_REVIEW, ACTIVE, COMPLETED, EARLY_RENEWED, TERMINATED SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
Available options:
SALESFORCE, HUBSPOT, STRIPE, MANUAL Maximum string length:
250Maximum string length:
255Maximum string length:
500Maximum string length:
500Maximum string length:
120Maximum string length:
3Required range:
0 <= x <= 2147483647Payment terms for generated invoices; lines snapshot its days. None means due on receipt.
NONE- NoneAUTO_RENEW- Auto-renewMANUAL- Manual renewal
Available options:
NONE, AUTO_RENEW, MANUAL Required range:
-10000000000000 < x < 10000000000000Maximum string length:
500⌘I