curl --request PATCH \
--url https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"instruction": "<string>",
"section": "<string>",
"required": true,
"fact_key": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
instruction: '<string>',
section: '<string>',
required: true,
fact_key: '<string>'
})
};
fetch('https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field}', 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/{field}"
payload = {
"label": "<string>",
"instruction": "<string>",
"section": "<string>",
"required": True,
"fact_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
}Change a document type field
Changes one of the firm’s own fields: label, instruction, value type, section, required or fact_key. Redbark’s fields cannot be changed (builtin_locked). The change applies to documents read from now on; values already read or approved stay as they are. 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 PATCH \
--url https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"instruction": "<string>",
"section": "<string>",
"required": true,
"fact_key": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
instruction: '<string>',
section: '<string>',
required: true,
fact_key: '<string>'
})
};
fetch('https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field}', 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/{field}"
payload = {
"label": "<string>",
"instruction": "<string>",
"section": "<string>",
"required": True,
"fact_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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 - 60The field key, such as firm_salary_sacrifice, from get_document_type.
1 - 60Body
1 - 80What the reader is told about the value when the label is not enough, such as where on the page it is.
300text, 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 1 - 80The client fact an approved value fills: a key from list_fact_definitions whose type matches, or null for none.
64Response
Success.
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.

