curl --request POST \
--url https://api.us.cr4ce.com/document \
--header 'Accept: <accept>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"translated": {
"name": {},
"description": {}
},
"template": "<string>",
"shared": true,
"selected": [
"<string>"
],
"notification": "<string>"
}
'import requests
url = "https://api.us.cr4ce.com/document"
payload = {
"translated": {
"name": {},
"description": {}
},
"template": "<string>",
"shared": True,
"selected": ["<string>"],
"notification": "<string>"
}
headers = {
"Accept": "<accept>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Accept: '<accept>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
translated: {name: {}, description: {}},
template: '<string>',
shared: true,
selected: ['<string>'],
notification: '<string>'
})
};
fetch('https://api.us.cr4ce.com/document', 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.us.cr4ce.com/document",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'translated' => [
'name' => [
],
'description' => [
]
],
'template' => '<string>',
'shared' => true,
'selected' => [
'<string>'
],
'notification' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"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.us.cr4ce.com/document"
payload := strings.NewReader("{\n \"translated\": {\n \"name\": {},\n \"description\": {}\n },\n \"template\": \"<string>\",\n \"shared\": true,\n \"selected\": [\n \"<string>\"\n ],\n \"notification\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
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.post("https://api.us.cr4ce.com/document")
.header("Accept", "<accept>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"translated\": {\n \"name\": {},\n \"description\": {}\n },\n \"template\": \"<string>\",\n \"shared\": true,\n \"selected\": [\n \"<string>\"\n ],\n \"notification\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.cr4ce.com/document")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"translated\": {\n \"name\": {},\n \"description\": {}\n },\n \"template\": \"<string>\",\n \"shared\": true,\n \"selected\": [\n \"<string>\"\n ],\n \"notification\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status_code": 400
}{
"message": "<string>",
"status_code": 401
}{
"message": "<string>",
"status_code": 403
}{
"message": "<string>",
"status_code": 422,
"errors": {}
}{
"message": "<string>",
"status_code": 429
}{
"status": "Maintenance in progress"
}Create document
Create a document.
curl --request POST \
--url https://api.us.cr4ce.com/document \
--header 'Accept: <accept>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"translated": {
"name": {},
"description": {}
},
"template": "<string>",
"shared": true,
"selected": [
"<string>"
],
"notification": "<string>"
}
'import requests
url = "https://api.us.cr4ce.com/document"
payload = {
"translated": {
"name": {},
"description": {}
},
"template": "<string>",
"shared": True,
"selected": ["<string>"],
"notification": "<string>"
}
headers = {
"Accept": "<accept>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Accept: '<accept>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
translated: {name: {}, description: {}},
template: '<string>',
shared: true,
selected: ['<string>'],
notification: '<string>'
})
};
fetch('https://api.us.cr4ce.com/document', 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.us.cr4ce.com/document",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'translated' => [
'name' => [
],
'description' => [
]
],
'template' => '<string>',
'shared' => true,
'selected' => [
'<string>'
],
'notification' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"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.us.cr4ce.com/document"
payload := strings.NewReader("{\n \"translated\": {\n \"name\": {},\n \"description\": {}\n },\n \"template\": \"<string>\",\n \"shared\": true,\n \"selected\": [\n \"<string>\"\n ],\n \"notification\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
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.post("https://api.us.cr4ce.com/document")
.header("Accept", "<accept>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"translated\": {\n \"name\": {},\n \"description\": {}\n },\n \"template\": \"<string>\",\n \"shared\": true,\n \"selected\": [\n \"<string>\"\n ],\n \"notification\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.cr4ce.com/document")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"translated\": {\n \"name\": {},\n \"description\": {}\n },\n \"template\": \"<string>\",\n \"shared\": true,\n \"selected\": [\n \"<string>\"\n ],\n \"notification\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status_code": 400
}{
"message": "<string>",
"status_code": 401
}{
"message": "<string>",
"status_code": 403
}{
"message": "<string>",
"status_code": 422,
"errors": {}
}{
"message": "<string>",
"status_code": 429
}{
"status": "Maintenance in progress"
}Authorizations
API key used to authenticate and authorise every request.
Include it in the x-api-key header.
Headers
Defines the response type.
application/vnd.Creative Force.v2.3+json, application/vnd.Creative Force.v2.3+xml Defines the languages included in the response. If non are provided, the account default language is returned.
Value all overrides any other values present.
You can request multiple languages using a comma-separated string of languages.
The selected language must be supported by your account or a 400 error is returned.
all, ar_AR, bg_BG, bn_IN, ca_ES, cs_CZ, cy_GB, da_DK, de_DE, en_GB, en_US, el_GR, es_NN, es_LA, et_EE, fa_NN, fi_FI, fr_FR, fr_CA, he_IL, hi_IN, hr_HR, hu_HU, hy_AM, it_IT, ja_JP, ko_KR, lt_LT, ms_MY, nl_NL, nb_NO, pl_PL, pt_BR, ro_RO, ru_RU, sk_SK, sl_SI, sq_AL, sr_RS, sv_SE, sw_NN, th_TH, tr_TR, uk_UA, vi_VN, zh_CN, zh_HK Body
Document create payload.
Show child attributes
Show child attributes
Slug of the document template to generate the document from.
^[A-Za-z]{8}$File format to generate the document in.
pdf, word Specifies whether the generated document is shared with the applicant.
Type of resource to attach the generated documents to.
user, application, allocation, grant-report Slugs of the resources, of the type given by resource, to attach the generated documents to.
1^[A-Za-z]{8}$Slug of the notification to send when the document is created.
Omit or set to null to send no notification.
^[A-Za-z]{8}$Response
Document creation accepted.