curl --request GET \
--url https://api.assembly.com/v1/contracts/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.assembly.com/v1/contracts/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.assembly.com/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.assembly.com/v1/contracts/{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 => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.assembly.com/v1/contracts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.assembly.com/v1/contracts/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/contracts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"clientId": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"companyId": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"contractTemplateId": "d8e8fca2-dc0f-4f4a-8e3c-3f1f4c6a1b2c",
"createdAt": "<string>",
"creationMode": "template",
"creatorId": "<string>",
"data": "<string>",
"fields": [
{
"autoFillField": "<string>",
"bounds": {
"height": 123,
"pageHeight": 123,
"pageWidth": 123,
"resizedHeight": 123,
"resizedWidth": 123,
"width": 123,
"x": 123,
"y": 123
},
"encodedImgValue": "<string>",
"id": "e4f5a6b7-c8d9-4e0f-1a2b-3c4d5e6f7a8b",
"inputType": "client",
"isOptional": false,
"label": "Signature",
"page": 0,
"type": "signature",
"value": "<string>"
}
],
"fileUrl": "https://files.assembly.com/protected/contract.pdf",
"id": "<string>",
"identityId": "<string>",
"isMigrated": true,
"name": "Master Services Agreement",
"object": "<string>",
"owner": {
"id": "<string>",
"metadata": {
"avatarImageUrl": "<string>",
"companyAvatarUrl": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"email": "<string>",
"fallbackColor": "<string>",
"familyName": "<string>",
"givenName": "<string>"
}
},
"pageKeys": [
"<string>"
],
"portalId": "<string>",
"previousAttributes": {},
"recipientId": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"ref": "<string>",
"shareDate": "2023-11-07T05:31:56Z",
"signatureEvents": [
{
"email": "<string>",
"eventAt": "<string>",
"sourceIP": "<string>",
"type": "sent"
}
],
"signedFileUrl": "https://files.assembly.com/protected/contract-signed.pdf",
"status": "pending",
"submissionDate": "2023-11-07T05:31:56Z",
"updatedAt": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Get Contract
Retrieves a single contract by its ID.
curl --request GET \
--url https://api.assembly.com/v1/contracts/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.assembly.com/v1/contracts/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.assembly.com/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.assembly.com/v1/contracts/{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 => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.assembly.com/v1/contracts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.assembly.com/v1/contracts/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/contracts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"clientId": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"companyId": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"contractTemplateId": "d8e8fca2-dc0f-4f4a-8e3c-3f1f4c6a1b2c",
"createdAt": "<string>",
"creationMode": "template",
"creatorId": "<string>",
"data": "<string>",
"fields": [
{
"autoFillField": "<string>",
"bounds": {
"height": 123,
"pageHeight": 123,
"pageWidth": 123,
"resizedHeight": 123,
"resizedWidth": 123,
"width": 123,
"x": 123,
"y": 123
},
"encodedImgValue": "<string>",
"id": "e4f5a6b7-c8d9-4e0f-1a2b-3c4d5e6f7a8b",
"inputType": "client",
"isOptional": false,
"label": "Signature",
"page": 0,
"type": "signature",
"value": "<string>"
}
],
"fileUrl": "https://files.assembly.com/protected/contract.pdf",
"id": "<string>",
"identityId": "<string>",
"isMigrated": true,
"name": "Master Services Agreement",
"object": "<string>",
"owner": {
"id": "<string>",
"metadata": {
"avatarImageUrl": "<string>",
"companyAvatarUrl": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"email": "<string>",
"fallbackColor": "<string>",
"familyName": "<string>",
"givenName": "<string>"
}
},
"pageKeys": [
"<string>"
],
"portalId": "<string>",
"previousAttributes": {},
"recipientId": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"ref": "<string>",
"shareDate": "2023-11-07T05:31:56Z",
"signatureEvents": [
{
"email": "<string>",
"eventAt": "<string>",
"sourceIP": "<string>",
"type": "sent"
}
],
"signedFileUrl": "https://files.assembly.com/protected/contract-signed.pdf",
"status": "pending",
"submissionDate": "2023-11-07T05:31:56Z",
"updatedAt": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Authorizations
Path Parameters
Contract ID
Response
OK
ClientID is the ID of the client the contract is assigned to.
"b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e"
CompanyID is the ID of the company the contract is associated with.
"c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f"
ContractTemplateID is the ID of the template the contract was created from, when applicable.
"d8e8fca2-dc0f-4f4a-8e3c-3f1f4c6a1b2c"
CreationMode indicates whether the contract was created from a template or as a one-off document.
oneOff, template "template"
ContractFields Represent all the inputs which are dropped on the contract to be filled by admin, client or autofilled
Show child attributes
Show child attributes
FileKey is a presigned URL to the original (unsigned) contract document.
"https://files.assembly.com/protected/contract.pdf"
Name is the human-readable name of the contract.
"Master Services Agreement"
Show child attributes
Show child attributes
Deprecated: use ClientID and CompanyID instead
"b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e"
SignatureEvents holds the audit information about the user who performed any action on the contract document
Show child attributes
Show child attributes
SignedFileKey is a presigned URL to the signed contract document, populated once the contract is signed.
"https://files.assembly.com/protected/contract-signed.pdf"
Status is the current status of the contract.
pending, signed "pending"