Most submissions will have either a single main file (e.g. the completed, signed PDF) or a set of attachments that can be retrieved. I-9 submissions contain both a main PDF file as well as attachments representing each of the pieces of documentation the employee uploaded.
These files reside on Amazon's S3 service and are only accessible by first visiting an authenticated WorkBright API endpoint. Each submission will list endpoints for its file(s) in the files
attribute, e.g.:
{
"files": [
"/api/submissions/164/file"
],
// other submission data...
}
I-9 attachment URL's can be found in each documentation_set
object, under the keys file_front_url
and file_back_url
, e.g.:
{
"documentation_set": [
{
"list_key": "A",
"list_index": 0,
"documentation_key": "foreign_passport",
"document_number": null,
"document_title": "Foreign Passport with Temp. I-551 Stamp",
"issuing_authority": null,
"expiration_date": null,
"file_front_url": "/submissions/215/attachments/file_front_0dfd29ad-59a2-4fa3-8e2e-52554aa02b5e.jpg",
"file_front_content_type": "image/jpeg",
"file_front_filename": "file_front_0dfd29ad-59a2-4fa3-8e2e-52554aa02b5e.jpg"
},
// ...
],
// other I-9 Submission data...
}
Once you issue a GET request to any of these file endpoint(s), our servers will generate an authenticated AWS request on your behalf and then return an HTTP 307 Temporary Redirect to the resource in S3. You must follow this redirect in order to access the actual file contents.
S3 Details
Each authenticated S3 URL is only valid for 2 minutes. If you need to access the file after this time, you'll need to issue a new GET request to the file endpoint in WorkBright. For this reason, you should not retain AWS URLs in your own database; they are not long-living URLs.