Update Contract (partial)
Update specific fields on a revenue recognition contract.
curl --request PATCH \
--url https://api.dualentry.com/public/v2/contracts/{record_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"custom_fields": [
{}
],
"memo": "<string>",
"date": "2023-12-25",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"company_id": 123,
"customer_id": 123,
"name": "<string>",
"bill_to_address": "<string>",
"billing_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"ship_to_address": "<string>",
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"obligations": [
{
"id": 123,
"item_id": 2,
"quantity": 1,
"rate": 123,
"position": 0,
"memo": "",
"standalone_selling_price": 123,
"term_id": 123,
"billing_group": 1,
"recognition_strategy": "straight_line",
"obligation_conditions": {},
"classifications": [],
"billing_start_date": "2023-12-25",
"billing_end_date": "2023-12-25",
"billing_interval": 123,
"sync_billing_with_recognition": false,
"skip_invoice_generation": false,
"recognition_start_date": "2023-12-25",
"recognition_end_date": "2023-12-25",
"recognition_interval": 123,
"discount_value": 1,
"selected_vat_rate_id": 123,
"selected_gst_tax_rate_id": 123,
"is_auto_renewable": false,
"ramp_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"term_id": 123,
"default_ar_account_id": 123,
"contract_template_id": 123,
"billing_start_date": "2023-12-25",
"billing_interval": 123,
"billing_anchor_weekday": 123,
"recognition_start_date": "2023-12-25",
"recognition_interval": 123,
"recognition_anchor_weekday": 123,
"contract_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"change_orders_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"payment": {
"type": "<string>",
"id": 123,
"body": "<string>",
"link": "<string>"
},
"cutover_date": "2023-12-25",
"prior_recognized_amount": 123,
"default_early_termination_fee": 123
}
'import requests
url = "https://api.dualentry.com/public/v2/contracts/{record_id}/"
payload = {
"custom_fields": [{}],
"memo": "<string>",
"date": "2023-12-25",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"company_id": 123,
"customer_id": 123,
"name": "<string>",
"bill_to_address": "<string>",
"billing_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"ship_to_address": "<string>",
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"obligations": [
{
"id": 123,
"item_id": 2,
"quantity": 1,
"rate": 123,
"position": 0,
"memo": "",
"standalone_selling_price": 123,
"term_id": 123,
"billing_group": 1,
"recognition_strategy": "straight_line",
"obligation_conditions": {},
"classifications": [],
"billing_start_date": "2023-12-25",
"billing_end_date": "2023-12-25",
"billing_interval": 123,
"sync_billing_with_recognition": False,
"skip_invoice_generation": False,
"recognition_start_date": "2023-12-25",
"recognition_end_date": "2023-12-25",
"recognition_interval": 123,
"discount_value": 1,
"selected_vat_rate_id": 123,
"selected_gst_tax_rate_id": 123,
"is_auto_renewable": False,
"ramp_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"term_id": 123,
"default_ar_account_id": 123,
"contract_template_id": 123,
"billing_start_date": "2023-12-25",
"billing_interval": 123,
"billing_anchor_weekday": 123,
"recognition_start_date": "2023-12-25",
"recognition_interval": 123,
"recognition_anchor_weekday": 123,
"contract_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"change_orders_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"payment": {
"type": "<string>",
"id": 123,
"body": "<string>",
"link": "<string>"
},
"cutover_date": "2023-12-25",
"prior_recognized_amount": 123,
"default_early_termination_fee": 123
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_fields: [{}],
memo: '<string>',
date: '2023-12-25',
start_date: '2023-12-25',
end_date: '2023-12-25',
company_id: 123,
customer_id: 123,
name: '<string>',
bill_to_address: '<string>',
billing_address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
ship_to_address: '<string>',
shipping_address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
obligations: [
{
id: 123,
item_id: 2,
quantity: 1,
rate: 123,
position: 0,
memo: '',
standalone_selling_price: 123,
term_id: 123,
billing_group: 1,
recognition_strategy: 'straight_line',
obligation_conditions: {},
classifications: [],
billing_start_date: '2023-12-25',
billing_end_date: '2023-12-25',
billing_interval: 123,
sync_billing_with_recognition: false,
skip_invoice_generation: false,
recognition_start_date: '2023-12-25',
recognition_end_date: '2023-12-25',
recognition_interval: 123,
discount_value: 1,
selected_vat_rate_id: 123,
selected_gst_tax_rate_id: 123,
is_auto_renewable: false,
ramp_group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
term_id: 123,
default_ar_account_id: 123,
contract_template_id: 123,
billing_start_date: '2023-12-25',
billing_interval: 123,
billing_anchor_weekday: 123,
recognition_start_date: '2023-12-25',
recognition_interval: 123,
recognition_anchor_weekday: 123,
contract_attachments: [
{
id: 123,
file_name: '<string>',
file_size: 123,
download_url: '<string>',
upload_url: '<string>',
category: 'default'
}
],
change_orders_attachments: [
{
id: 123,
file_name: '<string>',
file_size: 123,
download_url: '<string>',
upload_url: '<string>',
category: 'default'
}
],
payment: {type: '<string>', id: 123, body: JSON.stringify('<string>'), link: '<string>'},
cutover_date: '2023-12-25',
prior_recognized_amount: 123,
default_early_termination_fee: 123
})
};
fetch('https://api.dualentry.com/public/v2/contracts/{record_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.dualentry.com/public/v2/contracts/{record_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([
'custom_fields' => [
[
]
],
'memo' => '<string>',
'date' => '2023-12-25',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'company_id' => 123,
'customer_id' => 123,
'name' => '<string>',
'bill_to_address' => '<string>',
'billing_address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'ship_to_address' => '<string>',
'shipping_address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'obligations' => [
[
'id' => 123,
'item_id' => 2,
'quantity' => 1,
'rate' => 123,
'position' => 0,
'memo' => '',
'standalone_selling_price' => 123,
'term_id' => 123,
'billing_group' => 1,
'recognition_strategy' => 'straight_line',
'obligation_conditions' => [
],
'classifications' => [
],
'billing_start_date' => '2023-12-25',
'billing_end_date' => '2023-12-25',
'billing_interval' => 123,
'sync_billing_with_recognition' => false,
'skip_invoice_generation' => false,
'recognition_start_date' => '2023-12-25',
'recognition_end_date' => '2023-12-25',
'recognition_interval' => 123,
'discount_value' => 1,
'selected_vat_rate_id' => 123,
'selected_gst_tax_rate_id' => 123,
'is_auto_renewable' => false,
'ramp_group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'term_id' => 123,
'default_ar_account_id' => 123,
'contract_template_id' => 123,
'billing_start_date' => '2023-12-25',
'billing_interval' => 123,
'billing_anchor_weekday' => 123,
'recognition_start_date' => '2023-12-25',
'recognition_interval' => 123,
'recognition_anchor_weekday' => 123,
'contract_attachments' => [
[
'id' => 123,
'file_name' => '<string>',
'file_size' => 123,
'download_url' => '<string>',
'upload_url' => '<string>',
'category' => 'default'
]
],
'change_orders_attachments' => [
[
'id' => 123,
'file_name' => '<string>',
'file_size' => 123,
'download_url' => '<string>',
'upload_url' => '<string>',
'category' => 'default'
]
],
'payment' => [
'type' => '<string>',
'id' => 123,
'body' => '<string>',
'link' => '<string>'
],
'cutover_date' => '2023-12-25',
'prior_recognized_amount' => 123,
'default_early_termination_fee' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.dualentry.com/public/v2/contracts/{record_id}/"
payload := strings.NewReader("{\n \"custom_fields\": [\n {}\n ],\n \"memo\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"company_id\": 123,\n \"customer_id\": 123,\n \"name\": \"<string>\",\n \"bill_to_address\": \"<string>\",\n \"billing_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"ship_to_address\": \"<string>\",\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"obligations\": [\n {\n \"id\": 123,\n \"item_id\": 2,\n \"quantity\": 1,\n \"rate\": 123,\n \"position\": 0,\n \"memo\": \"\",\n \"standalone_selling_price\": 123,\n \"term_id\": 123,\n \"billing_group\": 1,\n \"recognition_strategy\": \"straight_line\",\n \"obligation_conditions\": {},\n \"classifications\": [],\n \"billing_start_date\": \"2023-12-25\",\n \"billing_end_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"sync_billing_with_recognition\": false,\n \"skip_invoice_generation\": false,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_end_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"discount_value\": 1,\n \"selected_vat_rate_id\": 123,\n \"selected_gst_tax_rate_id\": 123,\n \"is_auto_renewable\": false,\n \"ramp_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"term_id\": 123,\n \"default_ar_account_id\": 123,\n \"contract_template_id\": 123,\n \"billing_start_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"billing_anchor_weekday\": 123,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"recognition_anchor_weekday\": 123,\n \"contract_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"change_orders_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"payment\": {\n \"type\": \"<string>\",\n \"id\": 123,\n \"body\": \"<string>\",\n \"link\": \"<string>\"\n },\n \"cutover_date\": \"2023-12-25\",\n \"prior_recognized_amount\": 123,\n \"default_early_termination_fee\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.dualentry.com/public/v2/contracts/{record_id}/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custom_fields\": [\n {}\n ],\n \"memo\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"company_id\": 123,\n \"customer_id\": 123,\n \"name\": \"<string>\",\n \"bill_to_address\": \"<string>\",\n \"billing_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"ship_to_address\": \"<string>\",\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"obligations\": [\n {\n \"id\": 123,\n \"item_id\": 2,\n \"quantity\": 1,\n \"rate\": 123,\n \"position\": 0,\n \"memo\": \"\",\n \"standalone_selling_price\": 123,\n \"term_id\": 123,\n \"billing_group\": 1,\n \"recognition_strategy\": \"straight_line\",\n \"obligation_conditions\": {},\n \"classifications\": [],\n \"billing_start_date\": \"2023-12-25\",\n \"billing_end_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"sync_billing_with_recognition\": false,\n \"skip_invoice_generation\": false,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_end_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"discount_value\": 1,\n \"selected_vat_rate_id\": 123,\n \"selected_gst_tax_rate_id\": 123,\n \"is_auto_renewable\": false,\n \"ramp_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"term_id\": 123,\n \"default_ar_account_id\": 123,\n \"contract_template_id\": 123,\n \"billing_start_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"billing_anchor_weekday\": 123,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"recognition_anchor_weekday\": 123,\n \"contract_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"change_orders_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"payment\": {\n \"type\": \"<string>\",\n \"id\": 123,\n \"body\": \"<string>\",\n \"link\": \"<string>\"\n },\n \"cutover_date\": \"2023-12-25\",\n \"prior_recognized_amount\": 123,\n \"default_early_termination_fee\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualentry.com/public/v2/contracts/{record_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custom_fields\": [\n {}\n ],\n \"memo\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"company_id\": 123,\n \"customer_id\": 123,\n \"name\": \"<string>\",\n \"bill_to_address\": \"<string>\",\n \"billing_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"ship_to_address\": \"<string>\",\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"obligations\": [\n {\n \"id\": 123,\n \"item_id\": 2,\n \"quantity\": 1,\n \"rate\": 123,\n \"position\": 0,\n \"memo\": \"\",\n \"standalone_selling_price\": 123,\n \"term_id\": 123,\n \"billing_group\": 1,\n \"recognition_strategy\": \"straight_line\",\n \"obligation_conditions\": {},\n \"classifications\": [],\n \"billing_start_date\": \"2023-12-25\",\n \"billing_end_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"sync_billing_with_recognition\": false,\n \"skip_invoice_generation\": false,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_end_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"discount_value\": 1,\n \"selected_vat_rate_id\": 123,\n \"selected_gst_tax_rate_id\": 123,\n \"is_auto_renewable\": false,\n \"ramp_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"term_id\": 123,\n \"default_ar_account_id\": 123,\n \"contract_template_id\": 123,\n \"billing_start_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"billing_anchor_weekday\": 123,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"recognition_anchor_weekday\": 123,\n \"contract_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"change_orders_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"payment\": {\n \"type\": \"<string>\",\n \"id\": 123,\n \"body\": \"<string>\",\n \"link\": \"<string>\"\n },\n \"cutover_date\": \"2023-12-25\",\n \"prior_recognized_amount\": 123,\n \"default_early_termination_fee\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"number": 123,
"name": "<string>",
"currency_iso_4217_code": "AED",
"memo": "<string>",
"date": "2023-12-25",
"start_date": "2023-12-25",
"bill_to_address": "<string>",
"ship_to_address": "<string>",
"is_incomplete": true,
"status": "draft",
"record_status": "draft",
"is_locked": true,
"revenue_recognitions": [
{
"id": 123,
"number": 123,
"contract_id": 123,
"date": "2023-12-25",
"transaction_date": "2023-12-25",
"amount": "<string>",
"transaction_id": 123,
"record_status": "draft",
"income_account_id": 123,
"deferrered_revenue_account_id": 123,
"performance_obligation_id": 123,
"is_reversal": false
}
],
"invoices": [
{
"id": 123,
"number": 123,
"date": "2023-12-25",
"due_date": "2023-12-25",
"amount": "<string>",
"tax_amount": "<string>",
"paid_total": "<string>",
"record_status": "draft",
"source": "<string>",
"term_id": 123
}
],
"obligations": [
{
"position": 123,
"memo": "<string>",
"billing_start_date": "2023-12-25",
"billing_frequency": "one_time",
"billing_interval": 123,
"recognition_start_date": "2023-12-25",
"recognition_frequency": "daily",
"recognition_interval": 123,
"is_incomplete": true,
"amount": "<string>",
"discount_amount": "<string>",
"net_amount": "<string>",
"qualifies_for_mrr": true,
"id": 123,
"item_id": 123,
"item_type": "<string>",
"item_name": "<string>",
"hsn_sac_code": "<string>",
"quantity": "<string>",
"rate": "<string>",
"standalone_selling_price": "<string>",
"term_id": 123,
"billing_group": 1,
"recognition_strategy": "straight_line",
"obligation_conditions": {},
"classifications": [],
"billing_end_date": "2023-12-25",
"sync_billing_with_recognition": false,
"skip_invoice_generation": false,
"recognition_end_date": "2023-12-25",
"discount_type": "PERCENTAGE",
"discount_value": "<string>",
"allocated_amount": "<string>",
"selected_vat_rate_id": 123,
"selected_gst_tax_rate_id": 123,
"is_auto_renewable": false,
"auto_renewal_date": "2023-12-25",
"renewed_from_id": 123,
"changed_from_id": 123,
"change_lineage_root_id": 123,
"ramp_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"obligation_usage": [
{
"id": 123,
"contract_id": 123,
"obligation_id": 123,
"usage_date": "2023-12-25",
"quantity": "<string>",
"amount": "<string>",
"effective_rate": "<string>",
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"rate": "<string>",
"revenue_recognition_id": 123,
"invoice_status": "<string>",
"memo": "",
"classifications": []
}
],
"amount": "<string>",
"metrics": {
"mrr": "<string>",
"arr": "<string>",
"amount_invoiced": "<string>",
"invoices_paid": "<string>",
"revenue_recognized": "<string>",
"unbilled_revenue": "<string>",
"unrecognized_revenue": "<string>",
"deferred_revenue": "<string>",
"total_contract_value": "<string>",
"amount_invoiced_percentage": "<string>",
"invoices_paid_percentage": "<string>",
"revenue_recognized_percentage": "<string>",
"next_invoice_date": "2023-12-25",
"total_discount_amount": "0",
"total_tax_amount": "0"
},
"custom_fields": [],
"completed_approvals_count": 0,
"total_approvals_count": 0,
"integration_remote_records": [],
"company_id": 123,
"company_name": "<string>",
"company_currency": "AED",
"customer_id": 123,
"customer_name": "<string>",
"term_id": 123,
"default_ar_account_id": 123,
"contract_template_id": 123,
"end_date": "2023-12-25",
"billing_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"billing_anchor_weekday": 123,
"recognition_anchor_weekday": 123,
"cutover_date": "2023-12-25",
"prior_recognized_amount": "<string>",
"default_early_termination_fee": "<string>",
"recognition_mode": "individual",
"workflow_status": "<string>",
"pending_approvers_count": 0,
"payment": {
"type": "<string>",
"id": 123,
"body": "<string>",
"link": "<string>"
},
"renewed_end_date": "2023-12-25",
"next_renewal_date": "2023-12-25",
"days_till_expiry": 123,
"termination": {
"id": 123,
"number": 123,
"contract_id": 123,
"termination_type": "<string>",
"termination_date": "2023-12-25",
"transaction_id": 123,
"memo": "<string>",
"date": "2023-12-25",
"record_status": "draft",
"early_termination_fee": "<string>",
"early_termination_fee_item_id": 123,
"fee_invoice_id": 123,
"refund_amount": "<string>",
"refund_credit_account_id": 123
},
"change_orders": [],
"customer_credits": [],
"cached_metrics": {
"tcv": "<string>",
"mrr": "0",
"arr": "0",
"amount_invoiced_percentage": "<string>",
"revenue_recognized": "0",
"revenue_recognized_percentage": "<string>",
"next_invoice_date": "2023-12-25"
},
"has_usage_obligations": false,
"has_usages": false,
"approval_info": {
"workflow_name": "<string>",
"workflow_version": 123,
"step_name": "<string>",
"current_substep": 123,
"substeps": [
{
"order": 123,
"status": "completed",
"approve_condition": "any",
"approvers": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"approved_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"rejected_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
]
}
]
},
"approval_chain": {
"workflow_name": "<string>",
"workflow_version": 123,
"steps": [
{
"order": 123,
"name": "<string>",
"status": "completed",
"approve_condition": "any",
"substeps": [
{
"order": 123,
"status": "completed",
"approve_condition": "any",
"approvers": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"approved_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"rejected_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
]
}
],
"approvers": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"approved_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"rejected_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
]
}
]
},
"bank_match_status": "<string>",
"contract_attachments": [],
"change_orders_attachments": []
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}Authorizations
Headers
Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.
255Path Parameters
Body
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL Deprecated: send the structured billing_address / shipping_address instead.
Show child attributes
Show child attributes
Deprecated: send the structured billing_address / shipping_address instead.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
one_time, daily, weekly, monthly, quarterly, semi_annually, annually daily, weekly, monthly, quarterly, semi_annually, annually draft, active, completed, terminated, archived individual, subledger Show child attributes
Show child attributes
Show child attributes
Show child attributes
Schema for payment collection configuration input (matches frontend structure).
Show child attributes
Show child attributes
Response
OK
Full detail schema — extends list schema with attachments and obligation usage.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL draft, active, completed, terminated, archived draft, posted, archived Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$Derived contract metrics (MRR, ARR, TCV, invoiced, recognized, etc.).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL Show child attributes
Show child attributes
Show child attributes
Show child attributes
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$individual, subledger Schema for payment collection configuration output.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Precomputed contract metrics from the cache table.
Show child attributes
Show child attributes
Schema for complete approval workflow information.
Show child attributes
Show child attributes
Full approval chain.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.dualentry.com/public/v2/contracts/{record_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"custom_fields": [
{}
],
"memo": "<string>",
"date": "2023-12-25",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"company_id": 123,
"customer_id": 123,
"name": "<string>",
"bill_to_address": "<string>",
"billing_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"ship_to_address": "<string>",
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"obligations": [
{
"id": 123,
"item_id": 2,
"quantity": 1,
"rate": 123,
"position": 0,
"memo": "",
"standalone_selling_price": 123,
"term_id": 123,
"billing_group": 1,
"recognition_strategy": "straight_line",
"obligation_conditions": {},
"classifications": [],
"billing_start_date": "2023-12-25",
"billing_end_date": "2023-12-25",
"billing_interval": 123,
"sync_billing_with_recognition": false,
"skip_invoice_generation": false,
"recognition_start_date": "2023-12-25",
"recognition_end_date": "2023-12-25",
"recognition_interval": 123,
"discount_value": 1,
"selected_vat_rate_id": 123,
"selected_gst_tax_rate_id": 123,
"is_auto_renewable": false,
"ramp_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"term_id": 123,
"default_ar_account_id": 123,
"contract_template_id": 123,
"billing_start_date": "2023-12-25",
"billing_interval": 123,
"billing_anchor_weekday": 123,
"recognition_start_date": "2023-12-25",
"recognition_interval": 123,
"recognition_anchor_weekday": 123,
"contract_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"change_orders_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"payment": {
"type": "<string>",
"id": 123,
"body": "<string>",
"link": "<string>"
},
"cutover_date": "2023-12-25",
"prior_recognized_amount": 123,
"default_early_termination_fee": 123
}
'import requests
url = "https://api.dualentry.com/public/v2/contracts/{record_id}/"
payload = {
"custom_fields": [{}],
"memo": "<string>",
"date": "2023-12-25",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"company_id": 123,
"customer_id": 123,
"name": "<string>",
"bill_to_address": "<string>",
"billing_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"ship_to_address": "<string>",
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"obligations": [
{
"id": 123,
"item_id": 2,
"quantity": 1,
"rate": 123,
"position": 0,
"memo": "",
"standalone_selling_price": 123,
"term_id": 123,
"billing_group": 1,
"recognition_strategy": "straight_line",
"obligation_conditions": {},
"classifications": [],
"billing_start_date": "2023-12-25",
"billing_end_date": "2023-12-25",
"billing_interval": 123,
"sync_billing_with_recognition": False,
"skip_invoice_generation": False,
"recognition_start_date": "2023-12-25",
"recognition_end_date": "2023-12-25",
"recognition_interval": 123,
"discount_value": 1,
"selected_vat_rate_id": 123,
"selected_gst_tax_rate_id": 123,
"is_auto_renewable": False,
"ramp_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"term_id": 123,
"default_ar_account_id": 123,
"contract_template_id": 123,
"billing_start_date": "2023-12-25",
"billing_interval": 123,
"billing_anchor_weekday": 123,
"recognition_start_date": "2023-12-25",
"recognition_interval": 123,
"recognition_anchor_weekday": 123,
"contract_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"change_orders_attachments": [
{
"id": 123,
"file_name": "<string>",
"file_size": 123,
"download_url": "<string>",
"upload_url": "<string>",
"category": "default"
}
],
"payment": {
"type": "<string>",
"id": 123,
"body": "<string>",
"link": "<string>"
},
"cutover_date": "2023-12-25",
"prior_recognized_amount": 123,
"default_early_termination_fee": 123
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_fields: [{}],
memo: '<string>',
date: '2023-12-25',
start_date: '2023-12-25',
end_date: '2023-12-25',
company_id: 123,
customer_id: 123,
name: '<string>',
bill_to_address: '<string>',
billing_address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
ship_to_address: '<string>',
shipping_address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
obligations: [
{
id: 123,
item_id: 2,
quantity: 1,
rate: 123,
position: 0,
memo: '',
standalone_selling_price: 123,
term_id: 123,
billing_group: 1,
recognition_strategy: 'straight_line',
obligation_conditions: {},
classifications: [],
billing_start_date: '2023-12-25',
billing_end_date: '2023-12-25',
billing_interval: 123,
sync_billing_with_recognition: false,
skip_invoice_generation: false,
recognition_start_date: '2023-12-25',
recognition_end_date: '2023-12-25',
recognition_interval: 123,
discount_value: 1,
selected_vat_rate_id: 123,
selected_gst_tax_rate_id: 123,
is_auto_renewable: false,
ramp_group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
term_id: 123,
default_ar_account_id: 123,
contract_template_id: 123,
billing_start_date: '2023-12-25',
billing_interval: 123,
billing_anchor_weekday: 123,
recognition_start_date: '2023-12-25',
recognition_interval: 123,
recognition_anchor_weekday: 123,
contract_attachments: [
{
id: 123,
file_name: '<string>',
file_size: 123,
download_url: '<string>',
upload_url: '<string>',
category: 'default'
}
],
change_orders_attachments: [
{
id: 123,
file_name: '<string>',
file_size: 123,
download_url: '<string>',
upload_url: '<string>',
category: 'default'
}
],
payment: {type: '<string>', id: 123, body: JSON.stringify('<string>'), link: '<string>'},
cutover_date: '2023-12-25',
prior_recognized_amount: 123,
default_early_termination_fee: 123
})
};
fetch('https://api.dualentry.com/public/v2/contracts/{record_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.dualentry.com/public/v2/contracts/{record_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([
'custom_fields' => [
[
]
],
'memo' => '<string>',
'date' => '2023-12-25',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'company_id' => 123,
'customer_id' => 123,
'name' => '<string>',
'bill_to_address' => '<string>',
'billing_address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'ship_to_address' => '<string>',
'shipping_address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'obligations' => [
[
'id' => 123,
'item_id' => 2,
'quantity' => 1,
'rate' => 123,
'position' => 0,
'memo' => '',
'standalone_selling_price' => 123,
'term_id' => 123,
'billing_group' => 1,
'recognition_strategy' => 'straight_line',
'obligation_conditions' => [
],
'classifications' => [
],
'billing_start_date' => '2023-12-25',
'billing_end_date' => '2023-12-25',
'billing_interval' => 123,
'sync_billing_with_recognition' => false,
'skip_invoice_generation' => false,
'recognition_start_date' => '2023-12-25',
'recognition_end_date' => '2023-12-25',
'recognition_interval' => 123,
'discount_value' => 1,
'selected_vat_rate_id' => 123,
'selected_gst_tax_rate_id' => 123,
'is_auto_renewable' => false,
'ramp_group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'term_id' => 123,
'default_ar_account_id' => 123,
'contract_template_id' => 123,
'billing_start_date' => '2023-12-25',
'billing_interval' => 123,
'billing_anchor_weekday' => 123,
'recognition_start_date' => '2023-12-25',
'recognition_interval' => 123,
'recognition_anchor_weekday' => 123,
'contract_attachments' => [
[
'id' => 123,
'file_name' => '<string>',
'file_size' => 123,
'download_url' => '<string>',
'upload_url' => '<string>',
'category' => 'default'
]
],
'change_orders_attachments' => [
[
'id' => 123,
'file_name' => '<string>',
'file_size' => 123,
'download_url' => '<string>',
'upload_url' => '<string>',
'category' => 'default'
]
],
'payment' => [
'type' => '<string>',
'id' => 123,
'body' => '<string>',
'link' => '<string>'
],
'cutover_date' => '2023-12-25',
'prior_recognized_amount' => 123,
'default_early_termination_fee' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.dualentry.com/public/v2/contracts/{record_id}/"
payload := strings.NewReader("{\n \"custom_fields\": [\n {}\n ],\n \"memo\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"company_id\": 123,\n \"customer_id\": 123,\n \"name\": \"<string>\",\n \"bill_to_address\": \"<string>\",\n \"billing_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"ship_to_address\": \"<string>\",\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"obligations\": [\n {\n \"id\": 123,\n \"item_id\": 2,\n \"quantity\": 1,\n \"rate\": 123,\n \"position\": 0,\n \"memo\": \"\",\n \"standalone_selling_price\": 123,\n \"term_id\": 123,\n \"billing_group\": 1,\n \"recognition_strategy\": \"straight_line\",\n \"obligation_conditions\": {},\n \"classifications\": [],\n \"billing_start_date\": \"2023-12-25\",\n \"billing_end_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"sync_billing_with_recognition\": false,\n \"skip_invoice_generation\": false,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_end_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"discount_value\": 1,\n \"selected_vat_rate_id\": 123,\n \"selected_gst_tax_rate_id\": 123,\n \"is_auto_renewable\": false,\n \"ramp_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"term_id\": 123,\n \"default_ar_account_id\": 123,\n \"contract_template_id\": 123,\n \"billing_start_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"billing_anchor_weekday\": 123,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"recognition_anchor_weekday\": 123,\n \"contract_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"change_orders_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"payment\": {\n \"type\": \"<string>\",\n \"id\": 123,\n \"body\": \"<string>\",\n \"link\": \"<string>\"\n },\n \"cutover_date\": \"2023-12-25\",\n \"prior_recognized_amount\": 123,\n \"default_early_termination_fee\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.dualentry.com/public/v2/contracts/{record_id}/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custom_fields\": [\n {}\n ],\n \"memo\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"company_id\": 123,\n \"customer_id\": 123,\n \"name\": \"<string>\",\n \"bill_to_address\": \"<string>\",\n \"billing_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"ship_to_address\": \"<string>\",\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"obligations\": [\n {\n \"id\": 123,\n \"item_id\": 2,\n \"quantity\": 1,\n \"rate\": 123,\n \"position\": 0,\n \"memo\": \"\",\n \"standalone_selling_price\": 123,\n \"term_id\": 123,\n \"billing_group\": 1,\n \"recognition_strategy\": \"straight_line\",\n \"obligation_conditions\": {},\n \"classifications\": [],\n \"billing_start_date\": \"2023-12-25\",\n \"billing_end_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"sync_billing_with_recognition\": false,\n \"skip_invoice_generation\": false,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_end_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"discount_value\": 1,\n \"selected_vat_rate_id\": 123,\n \"selected_gst_tax_rate_id\": 123,\n \"is_auto_renewable\": false,\n \"ramp_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"term_id\": 123,\n \"default_ar_account_id\": 123,\n \"contract_template_id\": 123,\n \"billing_start_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"billing_anchor_weekday\": 123,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"recognition_anchor_weekday\": 123,\n \"contract_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"change_orders_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"payment\": {\n \"type\": \"<string>\",\n \"id\": 123,\n \"body\": \"<string>\",\n \"link\": \"<string>\"\n },\n \"cutover_date\": \"2023-12-25\",\n \"prior_recognized_amount\": 123,\n \"default_early_termination_fee\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualentry.com/public/v2/contracts/{record_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custom_fields\": [\n {}\n ],\n \"memo\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"company_id\": 123,\n \"customer_id\": 123,\n \"name\": \"<string>\",\n \"bill_to_address\": \"<string>\",\n \"billing_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"ship_to_address\": \"<string>\",\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"obligations\": [\n {\n \"id\": 123,\n \"item_id\": 2,\n \"quantity\": 1,\n \"rate\": 123,\n \"position\": 0,\n \"memo\": \"\",\n \"standalone_selling_price\": 123,\n \"term_id\": 123,\n \"billing_group\": 1,\n \"recognition_strategy\": \"straight_line\",\n \"obligation_conditions\": {},\n \"classifications\": [],\n \"billing_start_date\": \"2023-12-25\",\n \"billing_end_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"sync_billing_with_recognition\": false,\n \"skip_invoice_generation\": false,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_end_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"discount_value\": 1,\n \"selected_vat_rate_id\": 123,\n \"selected_gst_tax_rate_id\": 123,\n \"is_auto_renewable\": false,\n \"ramp_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"term_id\": 123,\n \"default_ar_account_id\": 123,\n \"contract_template_id\": 123,\n \"billing_start_date\": \"2023-12-25\",\n \"billing_interval\": 123,\n \"billing_anchor_weekday\": 123,\n \"recognition_start_date\": \"2023-12-25\",\n \"recognition_interval\": 123,\n \"recognition_anchor_weekday\": 123,\n \"contract_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"change_orders_attachments\": [\n {\n \"id\": 123,\n \"file_name\": \"<string>\",\n \"file_size\": 123,\n \"download_url\": \"<string>\",\n \"upload_url\": \"<string>\",\n \"category\": \"default\"\n }\n ],\n \"payment\": {\n \"type\": \"<string>\",\n \"id\": 123,\n \"body\": \"<string>\",\n \"link\": \"<string>\"\n },\n \"cutover_date\": \"2023-12-25\",\n \"prior_recognized_amount\": 123,\n \"default_early_termination_fee\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"number": 123,
"name": "<string>",
"currency_iso_4217_code": "AED",
"memo": "<string>",
"date": "2023-12-25",
"start_date": "2023-12-25",
"bill_to_address": "<string>",
"ship_to_address": "<string>",
"is_incomplete": true,
"status": "draft",
"record_status": "draft",
"is_locked": true,
"revenue_recognitions": [
{
"id": 123,
"number": 123,
"contract_id": 123,
"date": "2023-12-25",
"transaction_date": "2023-12-25",
"amount": "<string>",
"transaction_id": 123,
"record_status": "draft",
"income_account_id": 123,
"deferrered_revenue_account_id": 123,
"performance_obligation_id": 123,
"is_reversal": false
}
],
"invoices": [
{
"id": 123,
"number": 123,
"date": "2023-12-25",
"due_date": "2023-12-25",
"amount": "<string>",
"tax_amount": "<string>",
"paid_total": "<string>",
"record_status": "draft",
"source": "<string>",
"term_id": 123
}
],
"obligations": [
{
"position": 123,
"memo": "<string>",
"billing_start_date": "2023-12-25",
"billing_frequency": "one_time",
"billing_interval": 123,
"recognition_start_date": "2023-12-25",
"recognition_frequency": "daily",
"recognition_interval": 123,
"is_incomplete": true,
"amount": "<string>",
"discount_amount": "<string>",
"net_amount": "<string>",
"qualifies_for_mrr": true,
"id": 123,
"item_id": 123,
"item_type": "<string>",
"item_name": "<string>",
"hsn_sac_code": "<string>",
"quantity": "<string>",
"rate": "<string>",
"standalone_selling_price": "<string>",
"term_id": 123,
"billing_group": 1,
"recognition_strategy": "straight_line",
"obligation_conditions": {},
"classifications": [],
"billing_end_date": "2023-12-25",
"sync_billing_with_recognition": false,
"skip_invoice_generation": false,
"recognition_end_date": "2023-12-25",
"discount_type": "PERCENTAGE",
"discount_value": "<string>",
"allocated_amount": "<string>",
"selected_vat_rate_id": 123,
"selected_gst_tax_rate_id": 123,
"is_auto_renewable": false,
"auto_renewal_date": "2023-12-25",
"renewed_from_id": 123,
"changed_from_id": 123,
"change_lineage_root_id": 123,
"ramp_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"obligation_usage": [
{
"id": 123,
"contract_id": 123,
"obligation_id": 123,
"usage_date": "2023-12-25",
"quantity": "<string>",
"amount": "<string>",
"effective_rate": "<string>",
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"rate": "<string>",
"revenue_recognition_id": 123,
"invoice_status": "<string>",
"memo": "",
"classifications": []
}
],
"amount": "<string>",
"metrics": {
"mrr": "<string>",
"arr": "<string>",
"amount_invoiced": "<string>",
"invoices_paid": "<string>",
"revenue_recognized": "<string>",
"unbilled_revenue": "<string>",
"unrecognized_revenue": "<string>",
"deferred_revenue": "<string>",
"total_contract_value": "<string>",
"amount_invoiced_percentage": "<string>",
"invoices_paid_percentage": "<string>",
"revenue_recognized_percentage": "<string>",
"next_invoice_date": "2023-12-25",
"total_discount_amount": "0",
"total_tax_amount": "0"
},
"custom_fields": [],
"completed_approvals_count": 0,
"total_approvals_count": 0,
"integration_remote_records": [],
"company_id": 123,
"company_name": "<string>",
"company_currency": "AED",
"customer_id": 123,
"customer_name": "<string>",
"term_id": 123,
"default_ar_account_id": 123,
"contract_template_id": 123,
"end_date": "2023-12-25",
"billing_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"billing_anchor_weekday": 123,
"recognition_anchor_weekday": 123,
"cutover_date": "2023-12-25",
"prior_recognized_amount": "<string>",
"default_early_termination_fee": "<string>",
"recognition_mode": "individual",
"workflow_status": "<string>",
"pending_approvers_count": 0,
"payment": {
"type": "<string>",
"id": 123,
"body": "<string>",
"link": "<string>"
},
"renewed_end_date": "2023-12-25",
"next_renewal_date": "2023-12-25",
"days_till_expiry": 123,
"termination": {
"id": 123,
"number": 123,
"contract_id": 123,
"termination_type": "<string>",
"termination_date": "2023-12-25",
"transaction_id": 123,
"memo": "<string>",
"date": "2023-12-25",
"record_status": "draft",
"early_termination_fee": "<string>",
"early_termination_fee_item_id": 123,
"fee_invoice_id": 123,
"refund_amount": "<string>",
"refund_credit_account_id": 123
},
"change_orders": [],
"customer_credits": [],
"cached_metrics": {
"tcv": "<string>",
"mrr": "0",
"arr": "0",
"amount_invoiced_percentage": "<string>",
"revenue_recognized": "0",
"revenue_recognized_percentage": "<string>",
"next_invoice_date": "2023-12-25"
},
"has_usage_obligations": false,
"has_usages": false,
"approval_info": {
"workflow_name": "<string>",
"workflow_version": 123,
"step_name": "<string>",
"current_substep": 123,
"substeps": [
{
"order": 123,
"status": "completed",
"approve_condition": "any",
"approvers": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"approved_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"rejected_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
]
}
]
},
"approval_chain": {
"workflow_name": "<string>",
"workflow_version": 123,
"steps": [
{
"order": 123,
"name": "<string>",
"status": "completed",
"approve_condition": "any",
"substeps": [
{
"order": 123,
"status": "completed",
"approve_condition": "any",
"approvers": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"approved_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"rejected_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
]
}
],
"approvers": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"approved_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
],
"rejected_by": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"full_name": "<string>",
"avatar_url": "<string>"
}
]
}
]
},
"bank_match_status": "<string>",
"contract_attachments": [],
"change_orders_attachments": []
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}