Upload
Object representing an upload. An upload contains information about documents uploaded to a queue, including the creator, creation time, and associated documents and annotations.
Create upload endpoints also support basic authentication to enable easy integration with third-party systems.
Upload
ID of the upload.
Upload object URL.
Queue URL.
URL of the user who created the upload.
Time of the creation of the upload.
URL of the email that created the upload object (if applicable).
Organization URL.
URLs of the uploaded documents.
URLs of additional documents created in upload.created event hooks.
URLs of all created annotations.
Create upload
Uploads a document to the queue specified as query parameter (starting in the importing state).
Multiple files upload is supported, the total size of the data uploaded may not exceed 40 MB. UTF-8 filenames are supported, see examples.
The file can be sent as a part of multipart/form-data or, alternatively, in the request body.
The {filename} parameter in the URL path only works when sending the file in the request body using --data-binary.
When uploading via multipart/form-data, the filename is automatically extracted from the form field and the {filename}
parameter in the URL is ignored. Use the Content-Disposition header or specify the filename in the form field instead.
You can also specify additional properties using form field:
- Metadata could be passed using
metadataform field. Metadata will be set to newly created annotation object. - Values could be passed using
valuesform field. It may be used to initialize datapoint values by setting the value ofrir_field_namesin the schema.
For example upload:organization_unit field may be referenced in a schema like this:
{
"category": "datapoint",
"id": "organization_unit",
"label": "Org unit",
"type": "string",
"rir_field_names": ["upload:organization_unit"]
}The endpoint is asynchronous and response contains created task url. Further information about the import status may be acquired by retrieving the upload object or the task (for more information, please refer to task).
curl -X POST "https://example.rossum.app/api/v1/uploads?queue=8236" \ -F content="string"{
"url": "https://example.rossum.app/api/v1/tasks/315509"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}The file(s) to upload. Multiple files are supported.
JSON string containing metadata to be set on the newly created annotation object.
JSON string containing values to initialize datapoint values.
Response
Accepted
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Retrieve upload
Returns upload object.
curl -X GET "https://example.rossum.app/api/v1/uploads/0"{
"id": 314528,
"url": "https://example.rossum.app/api/v1/uploads/314528",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"creator": "https://example.rossum.app/api/v1/users/1",
"created_at": "2021-04-26T10:08:03.856648Z",
"email": "https://example.rossum.app/api/v1/emails/96743",
"organization": "string",
"documents": [
"https://example.rossum.app/api/v1/documents/254322",
"https://example.rossum.app/api/v1/documents/254323"
],
"additional_documents": [
"https://example.rossum.app/api/v1/documents/254324"
],
"annotations": [
"https://example.rossum.app/api/v1/annotations/104322",
"https://example.rossum.app/api/v1/annotations/104323",
"https://example.rossum.app/api/v1/annotations/104324"
]
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
ID of the upload.
Upload object URL.
Queue URL.
URL of the user who created the upload.
Time of the creation of the upload.
URL of the email that created the upload object (if applicable).
Organization URL.
URLs of the uploaded documents.
URLs of additional documents created in upload.created event hooks.
URLs of all created annotations.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Create upload with filename
Uploads a document to the queue specified as query parameter with filename specified in the URL path. UTF-8 filenames are supported and must be URL encoded.
The file should be sent in the request body. The total size of the data uploaded may not exceed 40 MB.
The endpoint is asynchronous and response contains created task url. Further information about the import status may be acquired by retrieving the upload object or the task (for more information, please refer to task).
curl -X POST "https://example.rossum.app/api/v1/uploads/document%20%F0%9F%8E%81.pdf?queue=8236" \ -H "Content-Type: application/octet-stream" \ -d 'string'{
"url": "https://example.rossum.app/api/v1/tasks/315509"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}bodystring (binary)Response
Accepted
URL of the created task for tracking upload progress.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error