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
application/vnd.api+json, you will get a list of the supported formats of that file. This list can contain the following mime types:
The shipment label file will become available in the format you have specified, by default this will be
If you use a Zebra printer and want the label file in
application/zpl, you need to specify this in the request meta when creating the shipment.
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