Overview
Register one or more files with a job to receive signed upload instructions. Plangrep inspects each file’s declared size and SHA-256 digest and returns either a direct PUT URL (for smaller files) or multipart upload instructions (for large files). You then upload bytes directly to the signed storage URLs — bypassing Plangrep’s servers — before calling Complete Uploads. This is the recommended path for large files (e.g. full drawing sets) where multipart upload and direct-to-storage delivery offer better performance and reliability.The total declared file sizes across all registrations for a job must not exceed 10 GB.
Endpoint
Authentication
All requests must include a Bearer token in theAuthorization header.
Path Parameters
The unique identifier of the job to register files against.
Request Body
Content-Type:application/json
List of files to register. Must contain between 1 and 100 items.
The original filename, including extension (e.g.
large-drawings.pdf).MIME type of the file (e.g.
application/pdf).Exact size of the file in bytes. Must be
>= 0. This value is used to determine upload mode and allocate storage.A 64-character lowercase hex string — the SHA-256 digest of the exact bytes you will upload. Used for integrity verification and deduplication.
Document classification hint. One of:
plans, specifications, documents, addenda, mixed, other. Omit to allow Plangrep to auto-classify based on file content.Response
Status:200 OK
The updated Job object.
One
UploadInstruction object per registered file.The unique document ID assigned to this file. Reference this ID in the completion request.
The upload strategy Plangrep selected. Either
direct_put (single PUT request) or multipart (multiple part uploads).direct_put only. The signed URL to PUT the full file bytes to. Valid until expiresAt.direct_put only. A map of HTTP headers that must be included when uploading bytes to uploadUrl (e.g. Content-Type, x-amz-checksum-sha256). Omitting these headers will cause the upload to fail.An opaque token proving upload completion. Include this in the Complete Uploads request body.
ISO 8601 timestamp indicating when the signed upload URL(s) expire. Complete the upload before this time.
multipart only. The multipart upload session ID. Include this in the completion request.multipart only. The target size in bytes for each part. Use this to split the file when uploading parts.multipart only. One entry per part, describing the byte range and signed URL for that part.1-based part index. Include this in the completion request’s
parts array.Inclusive start byte offset for this part within the full file.
Exclusive end byte offset for this part. Read bytes
[startByte, endByteExclusive).Signed URL to PUT this part’s bytes to.
Required headers for the PUT request for this part.
Additional document metadata objects associated with this registration.
Upload Flow After Registration
Direct PUT
- Receive
uploadUrlanduploadHeadersfor the document. PUTthe complete file bytes touploadUrl, including every key-value pair fromuploadHeaders.- Include
{ documentId, uploadToken }in thedirectUploadsarray of the Complete Uploads request.
Multipart
- For each entry in
parts,PUTthe corresponding byte range toparts[n].uploadUrlwithparts[n].uploadHeaders. - Capture the
ETagresponse header from each part upload. - Include the full
multipartUploadsrecord — withparts[].partNumberandparts[].etag— in the Complete Uploads request.