Skip to main content

Work out the next revision number of a reference number.

POST/api/v1/documents/check-revisiondocuments:read

Needs Preview Reference Numbers, and View Document Metadata when revision_number asks whether the pair is taken. The revision a new document with the reference number would take, following the revisions the company already holds under it (the Portal's next revision). With revision_number, is_duplicate says whether any document already has that reference number and revision, the caller's unreadable documents included. document_id names the document being renumbered, which is left out of both.

Scopedocuments:read
AsynchronousNo
MCP toolcheck_document_revision
Portal permissionspreview_reference_numbers

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional

Request body​

Content typeType
application/jsonNextRevisionRequestInput

Responses​

StatusDescriptionBody
200Success.application/json NextRevision
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

NextRevision​

FieldTypeRequiredDescription
is_duplicatebooleanRequiredWhether another document has the reference number and revision_number; false when no revision_number was sent.
next_revision_numberstringRequiredThe revision a new document with the reference number takes: the one after the highest revision the company holds under it, or the company's first revision when it holds none.
reference_numberstringRequired

NextRevisionRequestInput​

FieldTypeRequiredDescription
document_idstring or nullOptionalThe document being renumbered; you must be able to read it.
reference_numberstringRequiredThe reference number to number the next revision of.
revision_numberstring or nullOptionalA revision to check for a clash with another document.