Skip to content

Pickup API

Pickup task management endpoints.

Endpoints Overview

EndpointMethodDescription
/api/v1/carrier/pickup/submitPOSTSubmit pickup task
/api/v1/pickup/listPOSTGet pickup task list
/api/v1/pickup/re-sendPOSTRe-send webhook notification
/api/v1/pickup/re-createPOSTRe-create pickup order
/api/v1/pickup/authorize/refreshPOSTRefresh authorization

Submit Pickup Task

Submit a new pickup task to carrier.

Request

Endpoint: POST /api/v1/carrier/pickup/submit

Headers:

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

Request Body:

json
{
  "request_id": "pickup_001",
  "service_code": "DHL_PICKUP",
  "authorize_id": "auth_123",
  "sender_address": {
    "postal_code": "10001",
    "country_code": "US",
    "province": "NY",
    "city": "New York",
    "address_1": "123 Main St"
  },
  "loading_address": {
    "postal_code": "10001",
    "country_code": "US",
    "province": "NY",
    "city": "New York",
    "address_1": "456 Warehouse Blvd"
  },
  "consignee_address": {
    "postal_code": "90001",
    "country_code": "US",
    "province": "CA",
    "city": "Los Angeles",
    "address_1": "789 Delivery Ave"
  },
  "reference_order_number": "ORDER_12345",
  "loading_time": {
    "start_date": "2025-03-10",
    "start_time": "09:00",
    "end_date": "2025-03-10",
    "end_time": "18:00"
  },
  "delivery_time": {
    "start_date": "2025-03-12",
    "start_time": "09:00",
    "end_date": "2025-03-12",
    "end_time": "18:00"
  },
  "item_lines": [
    {
      "weight": 10,
      "length": 30,
      "width": 20,
      "height": 15,
      "declare_name": "Electronics",
      "weight_class": "kg",
      "length_class": "cm"
    }
  ],
  "webhook_url": "https://your-domain.com/webhook",
  "sign_string": "signature_string",
  "meta_data": {
    "order_type": "B2B"
  }
}

Field Description

FieldTypeRequiredDescription
request_idstringYesUnique request ID
service_codestringYesCarrier service code
authorize_idstringYesAuthorization ID
sender_addressobjectYesSender address
loading_addressobjectYesPickup address
consignee_addressobjectYesConsignee address
reference_order_numberstringYesReference order number
loading_timeobjectYesExpected pickup time window
delivery_timeobjectYesExpected delivery time window
item_linesobject[]YesPackage items
webhook_urlstringYesWebhook notification URL
sign_stringstringYesSignature string
meta_dataobjectNoAdditional metadata

Time Window Fields

FieldTypeRequiredDescription
start_datestringYesStart date (YYYY-MM-DD)
start_timestringYesStart time (HH:MM)
end_datestringYesEnd date (YYYY-MM-DD)
end_timestringYesEnd time (HH:MM)

Pickup Task List

Get paginated list of pickup tasks.

Request

Endpoint: POST /api/v1/pickup/list

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

Response

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "total": 50,
    "currPage": 1,
    "data": [
      {
        "id": 1,
        "request_id": "pickup_001",
        "reference_order_number": "ORDER_12345",
        "process": "create",
        "state": true,
        "loading_time": {...},
        "delivery_time": {...}
      }
    ]
  }
}

Re-send Notification

Re-trigger webhook notification for a pickup task.

Request

Endpoint: POST /api/v1/pickup/re-send

json
{
  "taskId": 123
}

Re-create Pickup Order

Re-initiate pickup order creation.

Request

Endpoint: POST /api/v1/pickup/re-create

json
{
  "taskId": 123
}

Refresh Authorization

Refresh carrier authorization for a pickup task.

Request

Endpoint: POST /api/v1/pickup/authorize/refresh

json
{
  "taskId": 123
}

Error Codes

CodeDescription
please configure hot api key firstAPI key not configured
please do not repeat submit the same orderDuplicate order
request_id must be uniqueRequest ID already exists
the task id is requiredTask ID missing
the task id is not existTask not found
the task is not in the pickup stateTask cannot be recreated
the task is in the processingTask already being processed