Skip to main content

File a document in a location.

POST/api/v1/documents/{document_id}/locationsdocuments:write

Needs Add Document Locations, View Locations and an edit grant on the unlocked document. The location is shown with View Document Locations, otherwise the answer is the write receipt. The location must exist (422 otherwise). A document already filed there is 409 already_exists.

Scopedocuments:write
AsynchronousNo
MCP toolcreate_document_location
Portal permissionsadd_document_locations, view_locations

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonDocumentLocationCreateInput

Responses​

StatusDescriptionBody
201Success.application/json Location or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409already_exists, idempotency_in_progress, lockedapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_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​

DocumentLocationCreateInput​

FieldTypeRequiredDescription
location_idstringRequiredThe location to file the document in, from GET /locations.

Location​

FieldTypeRequiredDescription
codestring or nullRequired
descriptionstring or nullRequired
is_activeboolean or nullRequiredWhether the location can be used.
location_idstringRequired
location_typestring or nullRequiredThe location type's name; null when none is set.
parent_location_idstring or nullRequiredThe parent location; null for a top-level location.
pathstring or nullRequiredThe location's ancestors' descriptions and its own, joined with ->.
projectobject or nullRequired