List Files
GET
https://api.cargopanel.co/v1/filesGET
https://sandbox-api.cargopanel.co/v1/filesRetrieves the files matching a specific file identifier. Only files owned by the authenticated API user are returned; files belonging to other accounts are never included. Requires the shipment:read scope.
Query Request Fields
idrequiredstringThe numeric identifier of the file (returned as fileId by the upload endpoint).
Example Response
200
{
"files": [
{
"originalName": "invoice.pdf",
"fileName": "48213907Xk3fP9qLmZ2vQa",
"url": "https://api.cargopanel.co/v1/files/48213907Xk3fP9qLmZ2vQa",
"path": "/files/48213907Xk3fP9qLmZ2vQa",
"id": "48213907",
"userId": "usr_xyz789",
"shipmentId": "shp_abc123",
"documentType": "invoice"
}
],
"id": "48213907"
}Response Fields
filesarrayAn array containing matching file's metadata objects.
idstringThe queried file ID parameter.
Responses
200Files retrieved successfully
400Bad Request (missing query parameter id)
401Unauthorized (invalid or missing API key)