Documents

Add document attachment

Changed on

Reuse an existing file and its bytes. Validate the complete resulting set, including inaccessible and quote mappings. Exclusive owners permit one mapping per file; ORDER/LOAD/SERVICE sharing requires one canonical shipment. Incompatible sets return 409 DOCUMENT_ATTACHMENT_COMBINATION_INVALID before relationship or signing writes. A separately requested duplicate target/file pair returns 409 DOCUMENT_ATTACHMENT_EXISTS. Additions to one file run one at a time; a concurrent addition returns 409 DOCUMENT_ATTACHMENT_BUSY. Retry it with backoff. Retry an unchanged request with the same Idempotency-Key to resume individually committed writes. A new LOAD/SERVICE RATE_CON mapping gets its own UPLOAD signing request, recorded SIGNED at creation.

post/documents/{id}/attachments

Request

  • Base URL: https://api.mvmnt.io/v1
  • URL: https://api.mvmnt.io/v1/documents/{id}/attachments
  • Auth: HTTP bearer

Path parameters

idstring required

Resource ID (UUID) or client key

Query parameters

by'id' | 'key'

Specify lookup type for faster retrieval. If omitted, defaults to looking up by ID first, then falls back to client key if not found. Use by=key when you know you're providing a client key for best performance.

Request body

OR
OR
OR
OR
OR
OR
OR
OR

Response

Successful response

attachmentIdstring uuid required

Existing relationship UUID, used for individual edits and removal.

documentIdstring uuid required

Stored file UUID used by /documents/{id}.

resourceType'ORDER' | 'LOAD' | 'SERVICE' | 'CARRIER' | 'CUSTOMER' | 'VENDOR' | 'LOCATION' | 'PAYMENT' | 'BILL_PAYMENT' required

Immutable business owner of one attachment. SHIPMENT is a read aggregate; QUOTE management is deferred.

resourceIdstring uuid required

Immutable owner UUID.

loadCarrierIdstring uuid

Carrier assignment, present only for LOAD.

typestring required

Relationship category. Existing unrecognized categories are returned unchanged; new writes require the owner's supported enum.

fileNamestring required

Relationship display name, falling back to the file name when absent.

attachToInvoiceboolean nullable

Stored relationship preference. True selects an eligible file by default; false excludes it. Null inherits current invoice/customer defaults. Create omission stores null; PATCH omission leaves it unchanged. Supported only by ORDER, LOAD and SERVICE. True is rejected for ineligible categories or .xlsx/.xls/.doc/.docx/.csv display names. Does not generate, send or modify an existing invoice PDF.

Changes