Create CN22

This API creates a CN22 document for the relevant consignment.

Endpoint Information

Property Value
URL {{BASE_URL}}/api/v1/consignments/{consignmentId}/cn22
HTTP Method POST
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.

POST {{BASE_URL}}/api/v1/consignments/632236/cn22
Content-Type: application/json
APIKEY: {{APIKEY}}

API Response

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

{
    "status": true,
    "message": "CN22 document created successfully",
    "data": {
        "consignment_id": 632280,
        "uuid": "3c1563eb-9afd-4eda-8c26-51174d805b08",
        "document_id": 149495,
        "base64pdf": "....base64data"
    }
}

Error Responses

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

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