Creating Documents
Upload documents to a job in your workspace.
The create documents endpoint allows you to upload new documents to a user's job in your workspace.
Endpoint
Method | Url |
---|---|
POST | /v1.0/documents |
Note
- Request's
Content-Type
must bemultipart/form-data
. - The maximum file size for uploads is 500MB.
Request Parameters
job_id
•
string
required
The job's ID.
title
•
string
required
The document's title.
file
•
string
required
The document's content.
description
•
string
The document's description.
document_type_id
•
string
An ID for the type of document being uploaded. You can query for the list of supported Document Types.
Sample Request
Copied1curl -X POST 'https://api.worklayer.com/v1.0/documents' \2-H 'Authorization: Bearer {token}' \3-F 'file=@{filepath}' \4-F 'title=document.txt' \5-F 'job_id=a439ddfa-6ba4-4b38-8cf0-5d09db1a0af4' \6-F 'document_type_id=PRIOR_YEAR_RETURN'
Response
An instance of document resource.
Sample Response
Copied1{2 "id": "95e6f305-913e-40ad-9c80-ede263670878",3 "title": "document.txt",4 "description": "",5 "create_time": "2022-04-11T15:18:00.701Z",6 "update_time": "2022-04-11T15:18:00.701Z",7 "document_type": {8 "id": "PRIOR_YEAR_RETURN",9 "name": "Prior year return"10 }11}
Errors
Forbidden
: API Client cannot create members.Unauthorized
: API Client does not have valid credentials.BadRequest
: Either required properties are missing, or there was a malformed request.
Last updated on October 12, 2022
Privacy PolicyTerms & Conditions© 2024 Taxfyle