Approve a shelf
curl --request POST \
--url https://api.shelv.dev/v1/shelves/{id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
{
"content": "<string>",
"from": "<string>",
"path": "<string>",
"to": "<string>"
}
]
}
'import requests
url = "https://api.shelv.dev/v1/shelves/{id}/approve"
payload = { "operations": [
{
"content": "<string>",
"from": "<string>",
"path": "<string>",
"to": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operations: [{content: '<string>', from: '<string>', path: '<string>', to: '<string>'}]
})
};
fetch('https://api.shelv.dev/v1/shelves/{id}/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operations: [{content: '<string>', from: '<string>', path: '<string>', to: '<string>'}]
})
};
fetch('https://api.shelv.dev/v1/shelves/{id}/approve', 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>"
}Shelves
Approve a shelf
Transition a shelf from review to ready status. Optionally apply file operations (rename, delete, mkdir, write) before finalizing.
POST
/
v1
/
shelves
/
{id}
/
approve
Approve a shelf
curl --request POST \
--url https://api.shelv.dev/v1/shelves/{id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
{
"content": "<string>",
"from": "<string>",
"path": "<string>",
"to": "<string>"
}
]
}
'import requests
url = "https://api.shelv.dev/v1/shelves/{id}/approve"
payload = { "operations": [
{
"content": "<string>",
"from": "<string>",
"path": "<string>",
"to": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operations: [{content: '<string>', from: '<string>', path: '<string>', to: '<string>'}]
})
};
fetch('https://api.shelv.dev/v1/shelves/{id}/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operations: [{content: '<string>', from: '<string>', path: '<string>', to: '<string>'}]
})
};
fetch('https://api.shelv.dev/v1/shelves/{id}/approve', 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>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^shf_[0-9a-f]{24}$Body
application/json
Show child attributes
Show child attributes
Response
Shelf approved and ready
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 