Skip to main content
POST
Attach Document

Authorizations

Authorization
string
header
required

API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.

Body

application/json

Attach an uploaded file as a document of a packaging unit or component.

type
enum<string>
required

Document type. technical_doc, declaration_of_conformity and marking can be attached to a packaging unit only.

Available options:
heavy_metals,
pfas,
recycled_content,
technical_doc,
declaration_of_conformity,
other,
technical_drawing,
marking,
supplier_statement
storageKey
string
required

The s3Key from POST /api/v1/ppwr/documents/upload-url, after the file was uploaded. Usable for one attach.

Minimum string length: 1
fileName
string | null
required

File name to record for the document, or null.

Minimum string length: 1
target
object
required

Where to attach the document: exactly one of packagingSpecId or componentId.

allowDuplicate
boolean

Send true to attach a second copy of a file that a 409 reported as a duplicate.

Response

Document attached

id
string<uuid>
required

The new document's id.

extractionQueued
boolean
required

True when AI extraction was queued for this document.

aiSkippedReason
enum<string>

Why an extractable document did NOT queue extraction; absent when it did, or when the type is not analysed.

Available options:
no_unit,
quota,
spend,
enqueue,
disabled