Skip to main content
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": [
    {
      "message": "<string>",
      "code": "<string>",
      "file": "<string>",
      "sourceRef": "<string>"
    }
  ],
  "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
  },
  "repairAttempts": 1,
  "reviewMode": true,
  "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required
Pattern: ^shf_[0-9a-f]{24}$

Body

application/json
operations
object[]

Response

Shelf approved and ready

auditFindings
object[] | null
required
auditStatus
enum<string> | null
required
Available options:
passed,
repaired,
review_required
auditSummary
string | null
required
createdAt
string<date-time>
required
currentVersionNumber
integer | null
required
errorMessage
string | null
required
failedAtStep
string | null
required
mimeType
string
required
name
string
required
originalFileName
string
required
pageCount
number | null
required
publicId
string
required
Pattern: ^shf_[0-9a-f]{24}$
quality
object
required
repairAttempts
integer | null
required
Required range: x >= 0
reviewMode
boolean
required
status
enum<string>
required
Available options:
uploading,
parsing,
structuring,
verifying,
review,
ready,
failed
storageSizeBytes
number | null
required
template
string | null
required
updatedAt
string<date-time>
required
userId
string
required