cargopanel logocargopanel for developers

List Files

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

Retrieves 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

idrequiredstring

The 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

filesarray

An array containing matching file's metadata objects.

idstring

The queried file ID parameter.

Responses

200Files retrieved successfully
400Bad Request (missing query parameter id)
401Unauthorized (invalid or missing API key)