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>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"invoice_message": "<string>",
"invoice_email": "jsmith@example.com",
"invoice_cc_emails": "<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,
"stripe_connection": 123,
"use_stripe_auto_bill": true,
"header_discount": 0,
"deferred_revenue_account": 123,
"unbilled_ar_account": 123,
"revenue_recognition_account": 123,
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_sku": "<string>",
"description": "<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
]
}
],
"custom_schedule": [
{
"invoice_date": "2023-12-25",
"amount": 5000000000000,
"id": 123,
"ordinal": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"ordinal": 1073741823,
"product": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"standalone_selling_price": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"delivery_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123,
"department": 123,
"tags": [
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>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"invoice_message": "<string>",
"invoice_email": "jsmith@example.com",
"invoice_cc_emails": "<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,
"stripe_connection": 123,
"use_stripe_auto_bill": True,
"header_discount": 0,
"deferred_revenue_account": 123,
"unbilled_ar_account": 123,
"revenue_recognition_account": 123,
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_sku": "<string>",
"description": "<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]
}
],
"custom_schedule": [
{
"invoice_date": "2023-12-25",
"amount": 5000000000000,
"id": 123,
"ordinal": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"ordinal": 1073741823,
"product": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"standalone_selling_price": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"delivery_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123,
"department": 123,
"tags": [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>',
billing_address: '<string>',
billing_addressee: '<string>',
shipping_address: '<string>',
shipping_addressee: '<string>',
invoice_message: '<string>',
invoice_email: 'jsmith@example.com',
invoice_cc_emails: '<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,
stripe_connection: 123,
use_stripe_auto_bill: true,
header_discount: 0,
deferred_revenue_account: 123,
unbilled_ar_account: 123,
revenue_recognition_account: 123,
renewed_into: 123,
lines: [
{
product_name: '<string>',
id: 123,
key: '<string>',
ordinal: 1073741823,
product: 123,
product_bundle: 123,
rate_card: 123,
product_sku: '<string>',
description: '<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]
}
],
custom_schedule: [
{
invoice_date: '2023-12-25',
amount: 5000000000000,
id: 123,
ordinal: 1073741823
}
],
obligations: [
{
id: 123,
line_key: '<string>',
ordinal: 1073741823,
product: 123,
invoiced_amount: 0,
allocated_amount: 0,
standalone_selling_price: 0,
start_date: '2023-12-25',
end_date: '2023-12-25',
delivery_date: '2023-12-25',
revenue_account: 123,
deferred_revenue_account: 123,
department: 123,
tags: [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>',
'billing_address' => '<string>',
'billing_addressee' => '<string>',
'shipping_address' => '<string>',
'shipping_addressee' => '<string>',
'invoice_message' => '<string>',
'invoice_email' => 'jsmith@example.com',
'invoice_cc_emails' => '<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,
'stripe_connection' => 123,
'use_stripe_auto_bill' => true,
'header_discount' => 0,
'deferred_revenue_account' => 123,
'unbilled_ar_account' => 123,
'revenue_recognition_account' => 123,
'renewed_into' => 123,
'lines' => [
[
'product_name' => '<string>',
'id' => 123,
'key' => '<string>',
'ordinal' => 1073741823,
'product' => 123,
'product_bundle' => 123,
'rate_card' => 123,
'product_sku' => '<string>',
'description' => '<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
]
]
],
'custom_schedule' => [
[
'invoice_date' => '2023-12-25',
'amount' => 5000000000000,
'id' => 123,
'ordinal' => 1073741823
]
],
'obligations' => [
[
'id' => 123,
'line_key' => '<string>',
'ordinal' => 1073741823,
'product' => 123,
'invoiced_amount' => 0,
'allocated_amount' => 0,
'standalone_selling_price' => 0,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'delivery_date' => '2023-12-25',
'revenue_account' => 123,
'deferred_revenue_account' => 123,
'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/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 \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"invoice_message\": \"<string>\",\n \"invoice_email\": \"jsmith@example.com\",\n \"invoice_cc_emails\": \"<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 \"stripe_connection\": 123,\n \"use_stripe_auto_bill\": true,\n \"header_discount\": 0,\n \"deferred_revenue_account\": 123,\n \"unbilled_ar_account\": 123,\n \"revenue_recognition_account\": 123,\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 \"rate_card\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<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 }\n ],\n \"custom_schedule\": [\n {\n \"invoice_date\": \"2023-12-25\",\n \"amount\": 5000000000000,\n \"id\": 123,\n \"ordinal\": 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 \"standalone_selling_price\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"delivery_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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 \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"invoice_message\": \"<string>\",\n \"invoice_email\": \"jsmith@example.com\",\n \"invoice_cc_emails\": \"<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 \"stripe_connection\": 123,\n \"use_stripe_auto_bill\": true,\n \"header_discount\": 0,\n \"deferred_revenue_account\": 123,\n \"unbilled_ar_account\": 123,\n \"revenue_recognition_account\": 123,\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 \"rate_card\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<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 }\n ],\n \"custom_schedule\": [\n {\n \"invoice_date\": \"2023-12-25\",\n \"amount\": 5000000000000,\n \"id\": 123,\n \"ordinal\": 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 \"standalone_selling_price\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"delivery_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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 \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"invoice_message\": \"<string>\",\n \"invoice_email\": \"jsmith@example.com\",\n \"invoice_cc_emails\": \"<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 \"stripe_connection\": 123,\n \"use_stripe_auto_bill\": true,\n \"header_discount\": 0,\n \"deferred_revenue_account\": 123,\n \"unbilled_ar_account\": 123,\n \"revenue_recognition_account\": 123,\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 \"rate_card\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<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 }\n ],\n \"custom_schedule\": [\n {\n \"invoice_date\": \"2023-12-25\",\n \"amount\": 5000000000000,\n \"id\": 123,\n \"ordinal\": 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 \"standalone_selling_price\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"delivery_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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": "",
"stripe_connection_name": "",
"deferred_revenue_account_name": "",
"unbilled_ar_account_name": "",
"revenue_recognition_account_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",
"status": "PENDING_REVIEW",
"entity": 123,
"client": 123,
"source": "SALESFORCE",
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"invoice_message": "<string>",
"invoice_email": "jsmith@example.com",
"invoice_cc_emails": "<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,
"creation_policy": "CREATE_ALL_NOW",
"sending_policy": "SEND_AUTOMATICALLY",
"stripe_connection": 123,
"use_stripe_auto_bill": true,
"renewal_behavior": "NONE",
"header_discount": 0,
"deferred_revenue_account": 123,
"unbilled_ar_account": 123,
"revenue_recognition_account": 123,
"renewed_into": 123,
"custom_schedule": [
{
"invoice_date": "2023-12-25",
"amount": 5000000000000,
"id": 123,
"ordinal": 1073741823
}
]
}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>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"invoice_message": "<string>",
"invoice_email": "jsmith@example.com",
"invoice_cc_emails": "<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,
"stripe_connection": 123,
"use_stripe_auto_bill": true,
"header_discount": 0,
"deferred_revenue_account": 123,
"unbilled_ar_account": 123,
"revenue_recognition_account": 123,
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_sku": "<string>",
"description": "<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
]
}
],
"custom_schedule": [
{
"invoice_date": "2023-12-25",
"amount": 5000000000000,
"id": 123,
"ordinal": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"ordinal": 1073741823,
"product": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"standalone_selling_price": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"delivery_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123,
"department": 123,
"tags": [
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>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"invoice_message": "<string>",
"invoice_email": "jsmith@example.com",
"invoice_cc_emails": "<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,
"stripe_connection": 123,
"use_stripe_auto_bill": True,
"header_discount": 0,
"deferred_revenue_account": 123,
"unbilled_ar_account": 123,
"revenue_recognition_account": 123,
"renewed_into": 123,
"lines": [
{
"product_name": "<string>",
"id": 123,
"key": "<string>",
"ordinal": 1073741823,
"product": 123,
"product_bundle": 123,
"rate_card": 123,
"product_sku": "<string>",
"description": "<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]
}
],
"custom_schedule": [
{
"invoice_date": "2023-12-25",
"amount": 5000000000000,
"id": 123,
"ordinal": 1073741823
}
],
"obligations": [
{
"id": 123,
"line_key": "<string>",
"ordinal": 1073741823,
"product": 123,
"invoiced_amount": 0,
"allocated_amount": 0,
"standalone_selling_price": 0,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"delivery_date": "2023-12-25",
"revenue_account": 123,
"deferred_revenue_account": 123,
"department": 123,
"tags": [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>',
billing_address: '<string>',
billing_addressee: '<string>',
shipping_address: '<string>',
shipping_addressee: '<string>',
invoice_message: '<string>',
invoice_email: 'jsmith@example.com',
invoice_cc_emails: '<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,
stripe_connection: 123,
use_stripe_auto_bill: true,
header_discount: 0,
deferred_revenue_account: 123,
unbilled_ar_account: 123,
revenue_recognition_account: 123,
renewed_into: 123,
lines: [
{
product_name: '<string>',
id: 123,
key: '<string>',
ordinal: 1073741823,
product: 123,
product_bundle: 123,
rate_card: 123,
product_sku: '<string>',
description: '<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]
}
],
custom_schedule: [
{
invoice_date: '2023-12-25',
amount: 5000000000000,
id: 123,
ordinal: 1073741823
}
],
obligations: [
{
id: 123,
line_key: '<string>',
ordinal: 1073741823,
product: 123,
invoiced_amount: 0,
allocated_amount: 0,
standalone_selling_price: 0,
start_date: '2023-12-25',
end_date: '2023-12-25',
delivery_date: '2023-12-25',
revenue_account: 123,
deferred_revenue_account: 123,
department: 123,
tags: [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>',
'billing_address' => '<string>',
'billing_addressee' => '<string>',
'shipping_address' => '<string>',
'shipping_addressee' => '<string>',
'invoice_message' => '<string>',
'invoice_email' => 'jsmith@example.com',
'invoice_cc_emails' => '<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,
'stripe_connection' => 123,
'use_stripe_auto_bill' => true,
'header_discount' => 0,
'deferred_revenue_account' => 123,
'unbilled_ar_account' => 123,
'revenue_recognition_account' => 123,
'renewed_into' => 123,
'lines' => [
[
'product_name' => '<string>',
'id' => 123,
'key' => '<string>',
'ordinal' => 1073741823,
'product' => 123,
'product_bundle' => 123,
'rate_card' => 123,
'product_sku' => '<string>',
'description' => '<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
]
]
],
'custom_schedule' => [
[
'invoice_date' => '2023-12-25',
'amount' => 5000000000000,
'id' => 123,
'ordinal' => 1073741823
]
],
'obligations' => [
[
'id' => 123,
'line_key' => '<string>',
'ordinal' => 1073741823,
'product' => 123,
'invoiced_amount' => 0,
'allocated_amount' => 0,
'standalone_selling_price' => 0,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'delivery_date' => '2023-12-25',
'revenue_account' => 123,
'deferred_revenue_account' => 123,
'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/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 \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"invoice_message\": \"<string>\",\n \"invoice_email\": \"jsmith@example.com\",\n \"invoice_cc_emails\": \"<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 \"stripe_connection\": 123,\n \"use_stripe_auto_bill\": true,\n \"header_discount\": 0,\n \"deferred_revenue_account\": 123,\n \"unbilled_ar_account\": 123,\n \"revenue_recognition_account\": 123,\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 \"rate_card\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<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 }\n ],\n \"custom_schedule\": [\n {\n \"invoice_date\": \"2023-12-25\",\n \"amount\": 5000000000000,\n \"id\": 123,\n \"ordinal\": 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 \"standalone_selling_price\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"delivery_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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 \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"invoice_message\": \"<string>\",\n \"invoice_email\": \"jsmith@example.com\",\n \"invoice_cc_emails\": \"<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 \"stripe_connection\": 123,\n \"use_stripe_auto_bill\": true,\n \"header_discount\": 0,\n \"deferred_revenue_account\": 123,\n \"unbilled_ar_account\": 123,\n \"revenue_recognition_account\": 123,\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 \"rate_card\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<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 }\n ],\n \"custom_schedule\": [\n {\n \"invoice_date\": \"2023-12-25\",\n \"amount\": 5000000000000,\n \"id\": 123,\n \"ordinal\": 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 \"standalone_selling_price\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"delivery_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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 \"billing_address\": \"<string>\",\n \"billing_addressee\": \"<string>\",\n \"shipping_address\": \"<string>\",\n \"shipping_addressee\": \"<string>\",\n \"invoice_message\": \"<string>\",\n \"invoice_email\": \"jsmith@example.com\",\n \"invoice_cc_emails\": \"<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 \"stripe_connection\": 123,\n \"use_stripe_auto_bill\": true,\n \"header_discount\": 0,\n \"deferred_revenue_account\": 123,\n \"unbilled_ar_account\": 123,\n \"revenue_recognition_account\": 123,\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 \"rate_card\": 123,\n \"product_sku\": \"<string>\",\n \"description\": \"<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 }\n ],\n \"custom_schedule\": [\n {\n \"invoice_date\": \"2023-12-25\",\n \"amount\": 5000000000000,\n \"id\": 123,\n \"ordinal\": 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 \"standalone_selling_price\": 0,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"delivery_date\": \"2023-12-25\",\n \"revenue_account\": 123,\n \"deferred_revenue_account\": 123,\n \"department\": 123,\n \"tags\": [\n 123\n ]\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": "",
"stripe_connection_name": "",
"deferred_revenue_account_name": "",
"unbilled_ar_account_name": "",
"revenue_recognition_account_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",
"status": "PENDING_REVIEW",
"entity": 123,
"client": 123,
"source": "SALESFORCE",
"consultant": "<string>",
"crm_opportunity_id": "<string>",
"crm_link": "<string>",
"contract_link": "<string>",
"purchase_order_number": "<string>",
"billing_address": "<string>",
"billing_addressee": "<string>",
"shipping_address": "<string>",
"shipping_addressee": "<string>",
"invoice_message": "<string>",
"invoice_email": "jsmith@example.com",
"invoice_cc_emails": "<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,
"creation_policy": "CREATE_ALL_NOW",
"sending_policy": "SEND_AUTOMATICALLY",
"stripe_connection": 123,
"use_stripe_auto_bill": true,
"renewal_behavior": "NONE",
"header_discount": 0,
"deferred_revenue_account": 123,
"unbilled_ar_account": 123,
"revenue_recognition_account": 123,
"renewed_into": 123,
"custom_schedule": [
{
"invoice_date": "2023-12-25",
"amount": 5000000000000,
"id": 123,
"ordinal": 1073741823
}
]
}Path Parameters
Body
Base serializer that injects the request user's customer on create and restricts related-object querysets to the same customer.
255PENDING_REVIEW- Pending reviewACTIVE- ActiveCOMPLETED- Fully recognizedEARLY_RENEWED- Early-renewedTERMINATED- Terminated
PENDING_REVIEW, ACTIVE, COMPLETED, EARLY_RENEWED, TERMINATED SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
SALESFORCE, HUBSPOT, STRIPE, MANUAL 250255500500120Bill-to address for invoices from this contract. Defaults from the client; editable per contract.
Bill-to addressee for invoices from this contract. Defaults from the client; editable per contract.
255Ship-to address for invoices from this contract. Defaults from the client; editable per contract.
Ship-to addressee for invoices from this contract. Defaults from the client; editable per contract.
255Message printed on invoices from this contract. Defaults from the client; editable per contract.
254Comma-separated addresses copied on invoices from this contract.
30 <= x <= 2147483647Payment terms for generated invoices; lines snapshot its days. None means due on receipt.
When this contract is Active, whether AR invoices and GL journals are created from the schedule all at once or on each invoice/posting date.
CREATE_ALL_NOW- Create on ApprovalCREATE_ON_DATE- Create On Invoice Date/Posting Date
CREATE_ALL_NOW, CREATE_ON_DATE When AR invoices are created from this contract, whether they send automatically or stay unsent.
SEND_AUTOMATICALLY- Send AutomaticallySEND_MANUALLY- Send Manually
SEND_AUTOMATICALLY, SEND_MANUALLY Stripe connection copied onto AR invoices issued from this contract.
When true, issued AR invoices auto-charge the client's default Stripe payment method.
NONE- NoneAUTO_RENEW- Auto-renewMANUAL- Manual renewal
NONE, AUTO_RENEW, MANUAL -10000000000000 < x < 10000000000000Deferred revenue account for this contract's schedule entries whose obligation carries none.
Unbilled accounts receivable account for this contract's schedule entries.
Fallback revenue account for obligations whose product carries no revenue account.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
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.
255Show child attributes
Show child attributes
PENDING_REVIEW- Pending reviewACTIVE- ActiveCOMPLETED- Fully recognizedEARLY_RENEWED- Early-renewedTERMINATED- Terminated
PENDING_REVIEW, ACTIVE, COMPLETED, EARLY_RENEWED, TERMINATED SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
SALESFORCE, HUBSPOT, STRIPE, MANUAL 250255500500120Bill-to address for invoices from this contract. Defaults from the client; editable per contract.
Bill-to addressee for invoices from this contract. Defaults from the client; editable per contract.
255Ship-to address for invoices from this contract. Defaults from the client; editable per contract.
Ship-to addressee for invoices from this contract. Defaults from the client; editable per contract.
255Message printed on invoices from this contract. Defaults from the client; editable per contract.
254Comma-separated addresses copied on invoices from this contract.
30 <= x <= 2147483647Payment terms for generated invoices; lines snapshot its days. None means due on receipt.
When this contract is Active, whether AR invoices and GL journals are created from the schedule all at once or on each invoice/posting date.
CREATE_ALL_NOW- Create on ApprovalCREATE_ON_DATE- Create On Invoice Date/Posting Date
CREATE_ALL_NOW, CREATE_ON_DATE When AR invoices are created from this contract, whether they send automatically or stay unsent.
SEND_AUTOMATICALLY- Send AutomaticallySEND_MANUALLY- Send Manually
SEND_AUTOMATICALLY, SEND_MANUALLY Stripe connection copied onto AR invoices issued from this contract.
When true, issued AR invoices auto-charge the client's default Stripe payment method.
NONE- NoneAUTO_RENEW- Auto-renewMANUAL- Manual renewal
NONE, AUTO_RENEW, MANUAL -10000000000000 < x < 10000000000000Deferred revenue account for this contract's schedule entries whose obligation carries none.
Unbilled accounts receivable account for this contract's schedule entries.
Fallback revenue account for obligations whose product carries no revenue account.
Show child attributes
Show child attributes