Zum Hauptinhalt springen
POST
Attach Document

Autorisierungen

Authorization
string
header
erforderlich

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>
erforderlich

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

Verfügbare Optionen:
heavy_metals,
pfas,
recycled_content,
technical_doc,
declaration_of_conformity,
other,
technical_drawing,
marking,
supplier_statement
storageKey
string
erforderlich

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
erforderlich

File name to record for the document, or null.

Minimum string length: 1
target
object
erforderlich

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.

Antwort

Document attached

id
string<uuid>
erforderlich

The new document's id.

extractionQueued
boolean
erforderlich

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.

Verfügbare Optionen:
no_unit,
quota,
spend,
enqueue,
disabled