A file resource can represent all kinds of files like shipment labels, available in different file formats.
|document_type||Category the file belongs to, for example label or invoice.|
|formats||List of Format objects holding the extension and mime type in which the file is available.|
If you request a file using the default Accept header
application/vnd.api+json, you will get a list of the supported formats of that file. This list can contain the following mime types:
Use one of the available formats in the Accept header to retrieve the actual file as binary data. For example:
GET /files/a9e3852c-b8b2-4066-a32a-651ea661ba30 HTTP/1.1 Accept: application/pdf
The response will be of the same mime type and contain the raw file data.
HTTP/1.1 200 OK Content-Type: application/pdf %PDF-1.4 [...] %%EOF