cargopanel logocargopanel for developers

Get File by ID

GEThttps://api.cargopanel.co/v1/files/id/:id
GEThttps://sandbox-api.cargopanel.co/v1/files/id/:id

Retrieves 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

idrequiredstring

The 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

idstring

Unique 6-digit identifier of the file.

originalNamestring

The original name of the file uploaded by the user.

fileNamestring

The unique normalized name in storage.

urlstring

Public gateway proxy API URL to view or download the file.

userIdstring

Associated user ID.

shipmentIdstring

Associated shipment ID.

documentTypestring

Associated document classification type.

Responses

200File metadata retrieved successfully
404File not found