Get File by ID
GET
https://api.cargopanel.co/v1/files/id/:idGET
https://sandbox-api.cargopanel.co/v1/files/id/:idRetrieves the metadata information of a specific file by its database identifier. This is a public endpoint that does not require an API token.
Request Fields
idrequiredstringThe 6-digit identifier of the file (e.g. 539103).
Example Response
200
{
"originalName": "invoice.pdf",
"fileName": "invoice_usr_xyz789_539103",
"url": "https://api.cargopanel.co/v1/files/invoice_usr_xyz789_539103",
"path": "/files/invoice_usr_xyz789_539103",
"id": "539103",
"userId": "usr_xyz789",
"shipmentId": "12345678",
"documentType": "invoice"
}Response Fields
idstringUnique 6-digit identifier of the file.
originalNamestringThe original name of the file uploaded by the user.
fileNamestringThe unique normalized name in storage.
urlstringPublic gateway proxy API URL to view or download the file.
userIdstringAssociated user ID.
shipmentIdstringAssociated shipment ID.
documentTypestringAssociated document classification type.
Responses
200File metadata retrieved successfully
404File not found