Get contract type template content
curl --request GET \
--url https://api.tomorro.com/v2/contract-types/{templateId}/content \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tomorro.com/v2/contract-types/{templateId}/content"
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/contract-types/{templateId}/content', 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/contract-types/{templateId}/content",
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/contract-types/{templateId}/content"
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/contract-types/{templateId}/content")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tomorro.com/v2/contract-types/{templateId}/content")
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{
"id": "550e8400-e29b-41d4-a716-446655440000",
"language": "FR",
"content": [
{
"type": "paragraph",
"children": [
{
"text": "Template content"
}
]
}
],
"contentText": "Template content"
}Contract Types
Get contract type template content
Returns the document body of a template: Slate content and plain-text contentText. Scoped to templates in your organization.
GET
/
contract-types
/
{templateId}
/
content
Get contract type template content
curl --request GET \
--url https://api.tomorro.com/v2/contract-types/{templateId}/content \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tomorro.com/v2/contract-types/{templateId}/content"
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/contract-types/{templateId}/content', 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/contract-types/{templateId}/content",
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/contract-types/{templateId}/content"
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/contract-types/{templateId}/content")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tomorro.com/v2/contract-types/{templateId}/content")
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{
"id": "550e8400-e29b-41d4-a716-446655440000",
"language": "FR",
"content": [
{
"type": "paragraph",
"children": [
{
"text": "Template content"
}
]
}
],
"contentText": "Template content"
}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 template
Example:
"550e8400-e29b-41d4-a716-446655440001"
Response
Template content with Slate content and contentText
Unique identifier of the template.
Example:
"550e8400-e29b-41d4-a716-446655440000"
Language of the template.
Example:
"FR"
The rich-text content of the template (Slate editor format).
Example:
[
{
"type": "paragraph",
"children": [{ "text": "Template content" }]
}
]
Plain-text rendering of content (Slate → text). Prefer this for LLM / text consumers; use content for rich editing.
Example:
"Template content"