Khởi tạo Journey Token

Lưu ý:

  • Đối với các API sử dụng cho Shop thì API_KEY: <api_key>.Thông tin base_url của Shop

  • Đối với các API sử dụng cho Partner thì API_KEY: <shop_key>.Thông tin base_url của Partner

CreateJourney

post
Body
oa_idstring · int64Optional
phonestringOptional
token_typestring · enumOptionalPossible values:
Responses
200
A successful response
application/json
post
POST /CreateJourney HTTP/1.1
Host: $BASE_URL.Zalo
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "oa_id": "text",
  "phone": "text",
  "token_type": "unknown"
}
200

A successful response

{
  "created_at": "2025-06-30T20:00:36.882Z",
  "error_code": 1,
  "error_message": "text",
  "expired_at": "2025-06-30T20:00:36.882Z",
  "id": "text",
  "is_charged": true,
  "journey_id": "text",
  "journey_token": "text",
  "phone": "text",
  "status": "Z",
  "updated_at": "2025-06-30T20:00:36.882Z"
}

Request:

curl --location '$BASE_URL.Zalo/CreateJourney' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
    "oa_id": "<int64>",
    "phone": "<string>",
    "token_type": "unknown"
}'

Response:

{
  "created_at": "2019-08-24T14:15:22Z",
  "error_code": 0,
  "error_message": "string",
  "expired_at": "2019-08-24T14:15:22Z",
  "id": "string",
  "is_charged": true,
  "journey_id": "string",
  "journey_token": "string",
  "phone": "string",
  "status": "Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Cấu trúc body của request

Tham số
Kiểu dữ liệu
Mô tả

oa_id require

int64

ID của OA

phone require

string

Số điện thoại của người nhận.

Lưu ý: SĐT phải được liên kết với tài khoản Zalo

token_type

string (uqTokenType) Enum

"unknown" "token_logistics_7" "token_logistics_30" "token_coach_bus_7" "token_coach_bus_30" Nếu không truyền token_type mặc định là token_logistics_7

Cấu trúc thuộc tính dữ liệu trả về

Tham số
Kiểu dữ liệu
Mô tả

id

int64

ID của journey trên hệ thống của eTelecom

journey_id

string

ID của journey

journey_token

string

Mã hành trình được kích hoạt

expires_at

string<date-time>

Thời gian hết hạn

phone

string

Số điện thoại người nhận

status

string

Trạng thái Z: Mới tạo P: Enable N: Disable

error_code

int

Mã lỗi

error_message

string

Thông tin lỗi

is_charged

bool

Tính phí hay không tính phí

updated_at

string<date-time>

Thời gian cập nhật

created_at

string<date-time>

Thời gian tạo

Last updated