Create a document
Changed onCreate a new document record and receive a pre-signed URL for uploading the file.
Workflow
- Supply fileName, contentType and 1–100 validated attachments. There is no standalone-file create or top-level type.
- Receive the created document with an uploadUrl
- Upload the file directly to S3 using the uploadUrl (PUT request)
- Document status changes from PENDING_UPLOAD to UPLOADED automatically; a normal TMS refresh then shows the attachments.
Exclusive CARRIER/CUSTOMER/VENDOR/LOCATION/PAYMENT/BILL_PAYMENT uploads require exactly one mapping. ORDER/LOAD/SERVICE mappings may share a file only within one shipment. Profiles mixed with shipment owners, two exclusive owners, and different shipments return DOCUMENT_ATTACHMENT_COMBINATION_INVALID before any writes. SHIPMENT and QUOTE are not upload owners. Duplicate resolved targets are rejected. A load selector is a carrier assignment UUID; omitting it requires exactly one eligible assignment.
201 means the file and every mapping persisted, not that bytes arrived. Download URL is null while pending. Manual load/service rate-cons get their own UPLOAD signing request, recorded SIGNED at creation as in a TMS upload. Reuse the same Idempotency-Key and complete request for retries within 14 days, including partial failures. Keep the request unchanged when retrying. Individual writes use the standard mutation idempotency rules. Requests without a key cannot promise safe automatic retries after an unknown result.
Upload Instructions
The uploadUrl is a pre-signed S3 URL. Upload your file with:
curl -X PUT -H "Content-Type: application/pdf" \
--data-binary @your-file.pdf \
"https://s3.amazonaws.com/bucket/key?signature=..."
Important:
- The uploadUrl expires after 5 minutes; GET the file again to refresh an expired URL
- Use the exact contentType specified in the request
- Maximum file size: 100MB
Request
- Base URL: https://api.mvmnt.io/v1
- URL: https://api.mvmnt.io/v1/documents
- Auth: HTTP bearer
Request body
Example request
{
"key": "doc-inv-2025-001",
"fileName": "invoice-2025-001.pdf",
"contentType": "application/pdf",
"fileSize": 102400,
"tags": {
"invoiceNumber": "INV-2025-001"
}
}Response
Document created successfully
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"key": "doc-inv-2025-001",
"fileName": "invoice-2025-001.pdf",
"extension": "pdf",
"contentType": "application/pdf",
"fileSize": 102400,
"uploadUrl": "https://s3.amazonaws.com/bucket/key?signature=...",
"downloadUrl": "https://s3.amazonaws.com/bucket/key?signature=...",
"tags": {
"invoiceNumber": "INV-2025-001",
"customerPO": "PO-12345"
},
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:35:00Z"
}Changes
- breaking
added the new required request property
- breaking
the response's body type changed from
objectto no type for status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - warning
removed the request property
- warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - info
added
subschema #2to the response bodyallOflist for the response status - info
added the non-success response with the status
- breaking
- breaking
the response's body type changed from
objectto no type for status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - info
added
subschema #2to the response bodyallOflist for the response status - info
media type
application/jsonwas changed to a more specific media typeapplication/problem+jsonfor the response status - info
media type
application/jsonwas changed to a more specific media typeapplication/problem+jsonfor the response status - info
media type
application/jsonwas changed to a more specific media typeapplication/problem+jsonfor the response status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking