Process Draft Consignment

This API is used to convert an existing draft consignment into a real consignment. As a result of the process, a shipping label is created and the consignment is sent to the carrier.

Endpoint Information

Property Value
URL {{BASE_URL}}/api/v1/consignments/draft/{draft_consignment_id}/start-process
HTTP Method POST
Content Type application/json
Authentication APIKEY header

Process Flow

Draft Consignment (status: 24) → Process → Active Consignment (status: 2/3)
                                   ↓
                             Shipping Label Created
Before After
status: 24 (New Draft) status: 2 or status: 3
No label Label created
Not sent to carrier Sent to carrier

Request Parameters

URL Parameters

Parameter Type Required Description
draft_consignment_id Integer REQUIRED Draft consignment ID

Body Parameters (Optional)

By sending body parameters in the process request, you can update and then process the draft. This way, both update and processing are done in a single request.

For available parameters, see the Create Draft Consignment page.

Tip: You can complete the package information that you left out when creating the draft at the process stage.


Example Usage

Process Only (Without Update)

If the draft is already complete, you can process with an empty body:

curl -X POST "{{BASE_URL}}/api/v1/consignments/draft/243/start-process" \
  -H "Content-Type: application/json" \
  -H "APIKEY: {{APIKEY}}"

Process + Update (Adding Package Information)

Processing by adding missing package information to the draft:

POST {{BASE_URL}}/api/v1/consignments/draft/243/start-process
Content-Type: application/json
APIKEY: {{APIKEY}}

{
    "packages": [
        {
            "package_type": 1,
            "post_type": 4,
            "weight": 2,
            "length": 30,
            "width": 20,
            "height": 15,
            "dangerous_goods": false,
            "items": [
                {
                    "description": "Bosch Coffee Machine",
                    "gtip": "851671900000",
                    "origin": "TR",
                    "currency_code": "EUR",
                    "quantity": 1,
                    "unit_price": 200
                }
            ]
        }
    ]
}

API Response

Successful Response

{
    "status": true,
    "message": "Draft Consignment process start successfully",
    "data": {
        "consignment": 243,
        "barcode": "C2H32972076995",
        "c2hBarcode": "C2H32972076995",
        "providerTrackingCode": "1Z999AA10123456784",
        "trackingUrl": "https://provider.com/track/1Z999AA10123456784",
        "contentType": "application/pdf",
        "base64label": "...base64_label_data..."
    }
}

Response Fields

Field Type Description
consignment Integer Consignment ID
barcode String Carrier barcode
c2hBarcode String ComToHome system barcode
providerTrackingCode String Carrier tracking code
trackingUrl String Cargo tracking URL
contentType String Label format
base64label String Base64 encoded shipping label

Error Responses

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

Common Error Scenarios

Error Description Solution
Consignment not found Draft not found Use the correct ID
Not in draft status Consignment already processed Only status: 24 drafts can be processed
Reference number has already been used Reference number used before Use a unique reference
Validation errors Required fields missing Send missing fields in the body

Next Steps

After successful processing:

  1. Print Label: Decode the base64label field to print the label
  2. Tracking: Track the consignment using trackingUrl or c2hBarcode
  3. Webhook: Set up Webhook to receive status changes