curl --request POST \
--url https://advisor.redbark.com/api/v1/document_types/{type}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>'})
};
fetch('https://advisor.redbark.com/api/v1/document_types/{type}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://advisor.redbark.com/api/v1/document_types/{type}/fields"
payload = { "label": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "document_type_field",
"id": "<string>",
"key": "<string>",
"label": "<string>",
"type": "text",
"section": "<string>",
"required": true,
"instruction": "<string>",
"origin": "redbark",
"archived": true,
"fact_key": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Add a field to a document type
Adds a field of the firm’s own to a document type: on a built-in type after Redbark’s fields in the section named; on the firm’s own type in any section, Details when none is named. A type that keeps a file only has no fields. It is read from documents of the type from now on; documents already read are not changed. Give fact_key to fill a client fact when a document is approved. The key is made from the label. A label or instruction that asks for a tax file number, an identity document number, a government reference number or medical details is refused (value_never_kept). Only an admin can call this.
curl --request POST \
--url https://advisor.redbark.com/api/v1/document_types/{type}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>'})
};
fetch('https://advisor.redbark.com/api/v1/document_types/{type}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://advisor.redbark.com/api/v1/document_types/{type}/fields"
payload = { "label": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "document_type_field",
"id": "<string>",
"key": "<string>",
"label": "<string>",
"type": "text",
"section": "<string>",
"required": true,
"instruction": "<string>",
"origin": "redbark",
"archived": true,
"fact_key": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Authorizations
A firm API key, shown once when it is made, or a connected app’s OAuth access token. Each operation lists the scope it needs, such as clients:write.
Path Parameters
The document type key, such as payslip, from list_document_types.
1 - 60Body
1 - 80text, date (YYYY-MM-DD), amount (dollars), number or percent. A field that fills a fact holds the same type as the fact.
text, date, amount, number, percent What the reader is told about the value when the label is not enough, such as where on the page it is.
300On a built-in type, one of the section labels get_document_type shows, such as Pay. On the firm's own type, any name; Details when left out.
80The client fact an approved value fills: a key from list_fact_definitions whose type matches, or null for none.
64Response
Created.
document_type_field Null for a built-in field.
text, date (YYYY-MM-DD), amount (dollars), number or percent. A field that fills a fact holds the same type as the fact.
text, date, amount, number, percent What the reader is told. Only the firm's own fields show theirs.
redbark for Redbark's own, which cannot be changed; firm for the firm's own.
redbark, firm No longer read from new documents. Values already read stay and still show.
The client fact an approved value fills, or null.

