List Documents

This API lists the documents for a specific consignment.

Endpoint Information

Property Value
URL {{BASE_URL}}/api/v1/consignments/{consignmentId}/documents
HTTP Method GET
Content Type application/json
Authentication APIKEY header

Request Parameters

URL Parameters

Parameter Name Parameter Type Required Description
consignmentId Integer Required Consignment ID

Example Usage

API Request

Below is an example HTTP raw request for the API request.

GET {{BASE_URL}}/api/v1/consignments/632236/documents
Content-Type: application/json
APIKEY: {{APIKEY}}

API Response

On a successful request, the API will return a response like this:

{
    "status": true,
    "message": null,
    "data": [
        {
            "id": 149495,
            "documentType": 8,
            "consignment": {
                "id": 632280
            },
            "fileName": "proforma.pdf",
            "fileSize": "24840",
            "mimeType": "application/pdf",
            "status": 0
        },
        {
            "id": 149496,
            "documentType": 10,
            "consignment": {
                "id": 632280
            },
            "fileName": "cn22.pdf",
            "fileSize": "27126",
            "mimeType": "application/pdf",
            "status": 0
        }
    ]
}

Error Responses

If the API request fails, the API will return an error response like this:

{
    "status": false,
    "errors": [
        {
            "message": "Consignment not found"
        }
    ]
}