List Labels

This API lists the labels for a specific consignment.

Endpoint Information

Property Value
URL {{BASE_URL}}/api/v1/consignments/{consignmentId}/labels
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/labels
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": 149536,
            "consignment": {
                "id": 632236
            },
            "consignmentProvider": {
                "id": 1
            },
            "customer": {
                "id": 1
            },
            "fileName": "label_gknAlH.pdf",
            "fileMimeType": "application/pdf",
            "templateName": "c2h-shipment-label.twig",
            "templateType": "twig",
            "providerTrackingCode": "C2H42208773085",
            "labelType": 0
        }
    ]
}

Error Responses

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

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