curl --request GET \
--url https://app.synthetic.ai/api/v1/amendments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.synthetic.ai/api/v1/amendments/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.synthetic.ai/api/v1/amendments/{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://app.synthetic.ai/api/v1/amendments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.synthetic.ai/api/v1/amendments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.synthetic.ai/api/v1/amendments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.synthetic.ai/api/v1/amendments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amendmentNumber": 0,
"status": "DRAFT",
"type": "MODIFICATION",
"processingInvoices": true,
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"paymentTermsDays": 0,
"finalizedAt": "<string>",
"voidedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Input validation failed",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}{
"code": "NOT_FOUND",
"message": "The record does not exist for your business.",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred.",
"issues": []
}Get an amendment
One amendment by id. An amendment of another entity is not found. Needs a key holding contracts:read.
curl --request GET \
--url https://app.synthetic.ai/api/v1/amendments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.synthetic.ai/api/v1/amendments/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.synthetic.ai/api/v1/amendments/{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://app.synthetic.ai/api/v1/amendments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.synthetic.ai/api/v1/amendments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.synthetic.ai/api/v1/amendments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.synthetic.ai/api/v1/amendments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amendmentNumber": 0,
"status": "DRAFT",
"type": "MODIFICATION",
"processingInvoices": true,
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"paymentTermsDays": 0,
"finalizedAt": "<string>",
"voidedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Input validation failed",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}{
"code": "NOT_FOUND",
"message": "The record does not exist for your business.",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred.",
"issues": []
}Authorizations
An API key created in Settings, sent as Authorization: Bearer <key>.
Path Parameters
The amendment id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
Successful response
A change to a contract's terms from its startAt. It holds every term from that date, not only the ones that change. Amendment 0 holds the terms the contract was created with.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$The amendment's place among the contract's amendments: 0 for the original terms, higher for each later one.
-9007199254740991 <= x <= 9007199254740991DRAFT: being written; only a draft's terms can change. FINALIZING: agreed, and the contract's invoices are being updated to match. FINALIZED: agreed, and the invoices match. VOIDING: being withdrawn, and the invoices are being updated back to the terms before it. VOIDED: withdrawn; it no longer applies.
DRAFT, FINALIZING, FINALIZED, VOIDING, VOIDED MODIFICATION: changes the contract's terms from startAt. CANCELLATION: ends the contract on endAt. A cancellation lists the line items of the terms it ends, and charges for none of them.
MODIFICATION, CANCELLATION Whether the contract's invoices are still being updated after this amendment was finalized or voided, or the contract was deleted.
The calendar date these terms take effect, carried at UTC midnight. The time is not data.
The calendar date these terms end, carried at UTC midnight: they cover the days before this date, not the date itself. The time is not data.
How many days the customer has to pay an invoice billed under these terms once it is issued.
-9007199254740991 <= x <= 9007199254740991When the amendment became FINALIZED; null if it has not. It stays set if the amendment is voided later.
When someone last asked to withdraw the amendment, which made it VOIDING; null if nobody has.