curl --request GET \
--url https://api.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records"
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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records', 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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records",
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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records"
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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records")
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{
"customObjectId": "550e8400-e29b-41d4-a716-446655440000",
"contractId": "550e8400-e29b-41d4-a716-446655440005",
"records": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"fromCatalogRecordId": null,
"fields": [
{
"smartFieldId": "550e8400-e29b-41d4-a716-446655440002",
"type": "relation",
"rawValue": "550e8400-e29b-41d4-a716-446655440003",
"resolvedValue": "550e8400-e29b-41d4-a716-446655440003",
"relatedRecords": [
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"fields": [
{
"smartFieldId": "550e8400-e29b-41d4-a716-446655440004",
"type": "string",
"rawValue": "Alimentaire",
"resolvedValue": "Alimentaire"
}
]
}
]
}
]
}
]
}List contract records
Returns the records attached to a contract for a given custom object.
A relation field stores the identifier of a record living in another custom object, so its rawValue and resolvedValue are both that identifier. The linked record and its readable field values are returned inline under relatedRecords, so no extra call is needed to display a label.
curl --request GET \
--url https://api.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records"
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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records', 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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records",
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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records"
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.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tomorro.com/v2/custom-objects/{customObjectId}/contract/{contractId}/records")
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{
"customObjectId": "550e8400-e29b-41d4-a716-446655440000",
"contractId": "550e8400-e29b-41d4-a716-446655440005",
"records": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"fromCatalogRecordId": null,
"fields": [
{
"smartFieldId": "550e8400-e29b-41d4-a716-446655440002",
"type": "relation",
"rawValue": "550e8400-e29b-41d4-a716-446655440003",
"resolvedValue": "550e8400-e29b-41d4-a716-446655440003",
"relatedRecords": [
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"fields": [
{
"smartFieldId": "550e8400-e29b-41d4-a716-446655440004",
"type": "string",
"rawValue": "Alimentaire",
"resolvedValue": "Alimentaire"
}
]
}
]
}
]
}
]
}Authorizations
API key for authentication. Get your key at https://app.tomorro.com/settings/integrations?integration=api-key
Path Parameters
The unique identifier (UUID) of the custom object
"550e8400-e29b-41d4-a716-446655440000"
The unique identifier (UUID) of the contract
"550e8400-e29b-41d4-a716-446655440001"
Response
Contract records with their field values and linked catalog records
The unique identifier of the custom object.
"550e8400-e29b-41d4-a716-446655440000"
The unique identifier of the contract.
"550e8400-e29b-41d4-a716-446655440005"
The records attached to this contract for this custom object.
Show child attributes
Show child attributes
[
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"fromCatalogRecordId": null,
"fields": [
{
"smartFieldId": "550e8400-e29b-41d4-a716-446655440002",
"type": "relation",
"rawValue": "550e8400-e29b-41d4-a716-446655440003",
"resolvedValue": "550e8400-e29b-41d4-a716-446655440003",
"relatedRecords": [
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"fields": [
{
"smartFieldId": "550e8400-e29b-41d4-a716-446655440004",
"type": "string",
"rawValue": "Alimentaire",
"resolvedValue": "Alimentaire"
}
]
}
]
}
]
}
]