Upload new PDF
curl --request POST \
--url https://api.shelv.dev/v1/shelves/{id}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.shelv.dev/v1/shelves/{id}/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.shelv.dev/v1/shelves/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.shelv.dev/v1/shelves/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"auditFindings": [
{
"check": "naming",
"message": "<string>",
"severity": "error",
"code": "<string>",
"file": "<string>",
"sourceRef": "<string>"
}
],
"auditStatus": "passed",
"auditSummary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currentVersionNumber": 123,
"errorMessage": "<string>",
"failedAtStep": "<string>",
"mimeType": "<string>",
"name": "<string>",
"originalFileName": "<string>",
"pageCount": 123,
"publicId": "<string>",
"quality": {
"fallbackApplied": true,
"granularity": "document",
"mode": "balanced",
"tier": "full"
},
"repairAttempts": 1,
"reviewMode": true,
"status": "uploading",
"storageSizeBytes": 123,
"template": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"userId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Shelves
Upload new PDF
Upload a new PDF to an existing shelf, re-parse and re-structure it. Creates a new version with source ‘upload’. Requires an active subscription.
POST
/
v1
/
shelves
/
{id}
/
upload
Upload new PDF
curl --request POST \
--url https://api.shelv.dev/v1/shelves/{id}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.shelv.dev/v1/shelves/{id}/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.shelv.dev/v1/shelves/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.shelv.dev/v1/shelves/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"auditFindings": [
{
"check": "naming",
"message": "<string>",
"severity": "error",
"code": "<string>",
"file": "<string>",
"sourceRef": "<string>"
}
],
"auditStatus": "passed",
"auditSummary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currentVersionNumber": 123,
"errorMessage": "<string>",
"failedAtStep": "<string>",
"mimeType": "<string>",
"name": "<string>",
"originalFileName": "<string>",
"pageCount": 123,
"publicId": "<string>",
"quality": {
"fallbackApplied": true,
"granularity": "document",
"mode": "balanced",
"tier": "full"
},
"repairAttempts": 1,
"reviewMode": true,
"status": "uploading",
"storageSizeBytes": 123,
"template": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"userId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^shf_[0-9a-f]{24}$Body
multipart/form-data
PDF file to process (max 300 MB)
Response
Re-upload started
Show child attributes
Show child attributes
Available options:
passed, repaired, review_required Pattern:
^shf_[0-9a-f]{24}$Show child attributes
Show child attributes
Required range:
x >= 0Available options:
uploading, parsing, structuring, verifying, review, ready, failed 