Skip to content

Waybill API

Electronic waybill/label management endpoints.

Endpoints Overview

EndpointMethodDescription
/api/v1/label/createPOSTCreate electronic waybill
/api/v1/label/pagePOSTGet waybill list
/api/v1/label/reorderPOSTRe-purchase waybill
/api/v1/label/renotifyPOSTManual notification
/api/v1/label/resyncPOSTRe-sync label
/api/v1/label/updatePOSTUpdate waybill info
/api/v1/label/price/estimatePOSTPrice estimation
/api/v1/label/service/availablePOSTAvailable services

Create Waybill

Create a new electronic waybill/label.

Request

Endpoint: POST /api/v1/label/create

Headers:

  • Content-Type: application/json
  • Authorization: appToken {token}

Request Body:

json
{
  "request_id": "string",
  "sender": {
    "postal_code": "string",
    "country_code": "string",
    "province": "string",
    "city": "string",
    "suburb": "string",
    "address_1": "string",
    "address_2": "string"
  },
  "recipient": {
    "postal_code": "string",
    "country_code": "string",
    "province": "string",
    "city": "string",
    "suburb": "string",
    "address_1": "string",
    "address_2": "string"
  },
  "shipperId": "string",
  "weight_unit": "g",
  "size_unit": "cm",
  "pkg_weight": 1000,
  "pkg_volume": {
    "length": 30,
    "width": 20,
    "height": 10
  },
  "declare": [
    {
      "name": "Product Name",
      "quantity": 2,
      "unit_code": "pcs",
      "weight": 500,
      "price": {
        "amount": 25.00,
        "currency": "USD"
      },
      "hs_code": "123456",
      "origin_country_code": "CN"
    }
  ],
  "parcels": [
    {
      "parcel_number": 1,
      "weight": 1000,
      "width": 20,
      "height": 10,
      "length": 30
    }
  ],
  "additional_service": [
    {
      "service_code": "INSURANCE",
      "service_value": {
        "amount": 100.00,
        "currency": "USD"
      }
    }
  ]
}

Response

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "ok": true,
    "errors": [],
    "dato": {
      "id": "waybill_id",
      "tracking_number": "123456789",
      "label": "https://...",
      "process": "preOrder"
    }
  }
}

Waybill List

Get paginated list of waybills.

Request

Endpoint: POST /api/v1/label/page

Request Body:

json
{
  "pageNumber": 1,
  "pageSize": 20,
  "process": "processing"
}

Response

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "total": 100,
    "currPage": 1,
    "data": [...]
  }
}

Re-purchase Waybill

Re-purchase a failed waybill.

Request

Endpoint: POST /api/v1/label/reorder

json
{
  "id": "waybill_id"
}

Update Waybill

Update waybill information.

Request

Endpoint: POST /api/v1/label/update

json
{
  "id": "waybill_id",
  "label": "new_label_url",
  "tracking_number": "new_tracking_number",
  "weight": 1500,
  "width": 25,
  "height": 15,
  "length": 35
}

Available Update Fields:

  • label
  • tracking_number
  • exchange_tracking_number
  • confirm
  • service_code
  • exchange_label
  • lifts
  • tail_lift
  • weight
  • width
  • height
  • length
  • tax_id
  • delivery_datetime
  • pickup_datetime

Manual Notification

Re-trigger webhook notification.

Request

Endpoint: POST /api/v1/label/renotify

json
{
  "id": "waybill_id"
}

Re-sync Label

Re-fetch label from carrier.

Request

Endpoint: POST /api/v1/label/resync

json
{
  "id": "waybill_id"
}