Get Document By Id
Beta. The Documents API is in beta and its contract may change.
Returns a Document object with the given id, including the parsed data object when data_status is AVAILABLE. This is the only endpoint that returns data; it is otherwise identical to the list response.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Query Parameters
Whether to include the original data Bindbee fetched from the third-party to produce these models.
false
Whether to include custom fields in the response.
false
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. You can also specify required fields in [] for each relation name.
"manager[first_name,last_name]"
Response
Successful Response
The Document object represents a file held in an HR or payroll system for an employee, together with the field values Bindbee parsed out of it where the document type follows a standard form.
"018b18ef-c487-703c-afd9-0ca478ccd9d6"
The third-party API ID of the matching object.
"123321"
This is the datetime that this object was last updated by Bindbee
"2021-10-16T00:00:00Z"
The custom fields related to the model
The employee this document belongs to. This is the join key used to retrieve a single employee's documents.
"018af1fe-1250-772d-87c5-6f725a579e8a"
The normalised document type, set from the provider's own category or, where that is missing, from content anchors in the file itself. If the value is not one of the defined enum values, the original value passed through will be returned.
W4, I9, OTHER, - "W4"
The third-party's own document category, passed through verbatim. Use this when you need finer granularity than type provides.
"Tax Documents / Federal W-4"
The name of the document file in the third-party system.
"Charlotte_Danielle_Abbott_W-4.pdf"
Whether parsed field values are available for this document. AVAILABLE: use data. PENDING: extraction is still running, wait for the document.data.available webhook. UNSUPPORTED: Bindbee does not parse this document type, download the file instead. FAILED: extraction was attempted and did not succeed, download the file instead. Returned on both the list and the detail endpoint, so you can tell which documents are worth fetching in full without fetching any of them.
AVAILABLE, PENDING, UNSUPPORTED, FAILED "AVAILABLE"
Whether the document no longer exists in the third-party system. Deleted documents are tombstoned rather than removed, so incremental syncs can observe the deletion.
false
This is the Raw data
The parsed values of a Form W-4. Fields that belong to the other era's form are returned as null rather than zero: a zero is a claim the employee made, a null is a box that did not exist on the form they signed. Source systems commonly return zero for both, so this normalisation is Bindbee's. A blank Step 3 or Step 4 box on a filled 2020 or later form is an affirmative zero, not a null.