curl --request POST \
--url https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field}/restore', 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}/restore"
payload = {}
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>"
}
}Restore a document type field
Reads an archived field of the firm’s again from documents read from now on. Documents read while it was archived are not read again. Only an admin can call this.
curl --request POST \
--url https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://advisor.redbark.com/api/v1/document_types/{type}/fields/{field}/restore', 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}/restore"
payload = {}
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 - 60The field key, such as firm_salary_sacrifice, from get_document_type.
1 - 60Body
The body is of type object.
Response
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.

