Returns a list of all documents associated with shipments
Success
{- "_object": "/api/response",
- "version": 2,
- "data": {
- "_object": "/api/collections/paginated",
- "next": null,
- "total_count": 121,
- "data": [
- {
- "_object": "/document",
- "id": "ABC123",
- "file_name": "readme.txt",
- "document_type": "billing_packet",
- "memo": null,
- "archived_at": null,
- "file_metadata": {
- "_object": "file/metadata",
- "size": 20000,
- "uploaded_at": "2019-06-12T02:00:00.338Z"
}, - "shipment": {
- "_object": "/api/refs/object",
- "ref_type": "/shipment",
- "id": 123456
}
}
]
}
}
Create a new document for this client using the request payload
Created
error
{- "file_name": "Flexport-Booking.pdf",
- "mime_type": "application/pdf",
- "document_type": "packing_list",
- "memo": null,
- "document": "SGVsbG8sIFdvcmxkIQ==",
- "user_email": "johndoe@flexport.com",
- "shipment_id": 1234567
}
Success
{- "_object": "/api/response",
- "version": 3,
- "data": [
- {
- "_object": "/document",
- "id": "ABC123",
- "file_name": "readme.pdf",
- "document_type": "packing_list",
- "memo": "",
- "archived_at": null,
- "file_metadata": {
- "_object": "file/metadata",
- "size": 2000,
- "uploaded_at": "2019-06-12T02:00:00.338Z"
}, - "shipment": {
- "_object": "/api/refs/object",
- "ref_type": "/shipment",
- "id": 123456
}
}
]
}
Retrieves the details of a single document.
Success
_object | string | ||||||||||||||||||
self | string | ||||||||||||||||||
version | integer | ||||||||||||||||||
object (Document) | |||||||||||||||||||
|
error
Success
{- "_object": "/api/response",
- "version": 2,
- "data": {
- "_object": "/document",
- "id": "ABC123",
- "file_name": "readme.txt",
- "document_type": "billing_packet",
- "memo": null,
- "archived_at": null,
- "file_metadata": {
- "_object": "file/metadata",
- "size": 20000,
- "uploaded_at": "2019-06-12T02:00:00.338Z"
}, - "shipment": {
- "_object": "/api/refs/object",
- "ref_type": "/shipment",
- "id": 123456
}
}
}
Retrieves the contents of a specified file. Returns the file as a stream of bytes.
Success
error
{- "_object": "/api/response",
- "version": 2,
- "data": null,
- "error": {
- "_object": "/api/error",
- "status": 400,
- "code": "unknown_error",
- "message": "Please try again later."
}
}