> For the complete documentation index, see [llms.txt](https://docs.etelecom.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.etelecom.vn/tich-hop-api/zalo-cloud/zalo-cloud-api/khoi-tao-journey-token.md).

# Khởi tạo Journey Token

{% hint style="info" %}
**Lưu ý:**

* Đối với các API sử dụng cho Shop thì API\_KEY: [`<api_key>`](https://docs.etelecom.vn/tich-hop-api/shop/tai-khoan#api-key).Thông tin base\_url của [Shop](https://docs.etelecom.vn/tich-hop-api/shop/tai-khoan)
* Đối với các API sử dụng cho Partner thì API\_KEY: [`<shop_key>`](https://docs.etelecom.vn/tich-hop-api/partner/su-dung#ket-noi-lan-thu-hai-tro-di).Thông tin base\_url của [Partner](https://docs.etelecom.vn/tich-hop-api/partner/tai-khoan)
  {% endhint %}

{% openapi src="/files/yEC15i0shc48jxOVJGdy" path="$BASE\_URL.Zalo/CreateJourney" method="post" %}
[swagger (4).json](https://4211996220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9CUTEBoYNqJaZqxNp3Eh%2Fuploads%2FDSjNRcr1CvPi3IF1XaDo%2Fswagger%20\(4\).json?alt=media\&token=4f6e8fa5-0b57-40f4-bcae-a710d90ae37d)
{% endopenapi %}

**Request:**

```json
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:**

```json
{
  "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**

<table><thead><tr><th width="175.33333333333331">Tham số</th><th width="191">Kiểu dữ liệu</th><th>Mô tả</th></tr></thead><tbody><tr><td>oa_id<br><mark style="color:red;">require</mark></td><td>int64</td><td>ID của OA</td></tr><tr><td>phone<br><mark style="color:red;">require</mark></td><td>string</td><td><p>Số điện thoại của người nhận.</p><p>Lưu ý: SĐT phải được liên kết với tài khoản Zalo</p></td></tr><tr><td>token_type</td><td>string (uqTokenType) Enum</td><td><mark style="color:red;"><strong>"<code>unknown</code>" "<code>token_logistics_7</code>" "<code>token_logistics_30</code>" "<code>token_coach_bus_7</code>" "<code>token_coach_bus_30</code>"</strong></mark><br>Nếu không truyền token_type mặc định là <mark style="color:red;"><strong><code>token_logistics_7</code></strong></mark></td></tr></tbody></table>

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

<table><thead><tr><th width="161.33333333333331">Tham số</th><th width="210">Kiểu dữ liệu</th><th>Mô tả</th></tr></thead><tbody><tr><td>id</td><td>int64</td><td>ID của journey trên hệ thống của eTelecom</td></tr><tr><td>journey_id</td><td>string</td><td>ID của journey</td></tr><tr><td>journey_token</td><td>string</td><td>Mã hành trình được kích hoạt</td></tr><tr><td>expires_at</td><td>string&#x3C;date-time></td><td>Thời gian hết hạn</td></tr><tr><td>phone</td><td>string</td><td>Số điện thoại người nhận</td></tr><tr><td>status</td><td>string</td><td>Trạng thái<br><mark style="color:red;"><strong><code>Z</code></strong></mark>: Mới tạo<br><mark style="color:red;"><strong><code>P</code></strong></mark>: Enable<br><mark style="color:red;"><strong><code>N</code></strong></mark>: Disable</td></tr><tr><td>error_code</td><td>int</td><td>Mã lỗi</td></tr><tr><td>error_message</td><td>string</td><td>Thông tin lỗi </td></tr><tr><td>is_charged</td><td>bool</td><td>Tính phí hay không tính phí</td></tr><tr><td>updated_at</td><td>string&#x3C;date-time></td><td>Thời gian cập nhật</td></tr><tr><td>created_at</td><td>string&#x3C;date-time></td><td>Thời gian tạo </td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.etelecom.vn/tich-hop-api/zalo-cloud/zalo-cloud-api/khoi-tao-journey-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
