Update Revenue Contract
curl --request PUT \
--url https://api.meetcampfire.com/rev/api/v1/contracts/{id} \
--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,
"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,
"overage_rate": 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>",
"ordinal": 1073741823,
"product": 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,
"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,
"overage_rate": 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>",
"ordinal": 1073741823,
"product": 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 = {"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({
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,
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,
overage_rate: 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>',
ordinal: 1073741823,
product: 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 => "PUT",
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,
'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,
'overage_rate' => 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>',
'ordinal' => 1073741823,
'product' => 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 => [
"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 \"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 \"overage_rate\": 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 \"ordinal\": 1073741823,\n \"product\": 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("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/rev/api/v1/contracts/{id}")
.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 \"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 \"overage_rate\": 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 \"ordinal\": 1073741823,\n \"product\": 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::Put.new(url)
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 \"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 \"overage_rate\": 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 \"ordinal\": 1073741823,\n \"product\": 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,
"contract_number": "<string>",
"name": "<string>",
"entity_name": "<string>",
"client_name": "<string>",
"department_name": "<string>",
"payment_term_name": "",
"attachments": [
{
"id": 123,
"customer": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": 123,
"created_by_name": "<string>",
"created_by_email": "<string>",
"last_modified_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"url": "<string>",
"s3_path": "<string>",
"app": "<string>",
"model": "<string>",
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"s3_content_type": "<string>",
"s3_content_length": 1073741823,
"object_id": 1073741823
}
],
"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,
"renewed_into": 123
}Revenue
Update Revenue Contract
PUT
/
rev
/
api
/
v1
/
contracts
/
{id}
Update Revenue Contract
curl --request PUT \
--url https://api.meetcampfire.com/rev/api/v1/contracts/{id} \
--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,
"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,
"overage_rate": 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>",
"ordinal": 1073741823,
"product": 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,
"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,
"overage_rate": 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>",
"ordinal": 1073741823,
"product": 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 = {"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({
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,
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,
overage_rate: 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>',
ordinal: 1073741823,
product: 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 => "PUT",
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,
'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,
'overage_rate' => 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>',
'ordinal' => 1073741823,
'product' => 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 => [
"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 \"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 \"overage_rate\": 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 \"ordinal\": 1073741823,\n \"product\": 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("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/rev/api/v1/contracts/{id}")
.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 \"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 \"overage_rate\": 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 \"ordinal\": 1073741823,\n \"product\": 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::Put.new(url)
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 \"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 \"overage_rate\": 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 \"ordinal\": 1073741823,\n \"product\": 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,
"contract_number": "<string>",
"name": "<string>",
"entity_name": "<string>",
"client_name": "<string>",
"department_name": "<string>",
"payment_term_name": "",
"attachments": [
{
"id": 123,
"customer": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": 123,
"created_by_name": "<string>",
"created_by_email": "<string>",
"last_modified_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"url": "<string>",
"s3_path": "<string>",
"app": "<string>",
"model": "<string>",
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"s3_content_type": "<string>",
"s3_content_length": 1073741823,
"object_id": 1073741823
}
],
"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,
"renewed_into": 123
}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 < 10000000000000Show 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.
Sequential per-customer contract number (e.g. CTR-0000001), assigned at creation.
Maximum string length:
255Show child attributes
Show child attributes
PENDING_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 < 10000000000000⌘I