Lấy danh sách params của từng Template

Khi có nhu cầu lấy danh sách Template trong mỗi OA, sử dụng API sau đây

Lưu ý: Api này sẽ sử dụng cặp api-key khác được gọi là Integration Api Key

HTTP request

URL: https://apis.infinix.vn/v1/zalo-oa/<slug-api-key>/template-params/<template-id>

Method: GET

Content Type: application/json

Example request

curl --location 'https://apis.infinix.vn/v1/zalo-oa/vng-db-integration-2d70/template-params/356338' \
--header 'api-key: 2037a0b0455fb35f05406d763acfac'

Tham số header

Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả

api-key

String

yes

Đoạn mã cần truyền vào để xác minh quyền sử dụng API. Sử dụng integration api key

Cấu trúc các thuộc tính param

Tham số
Kiểu dữ liệu

templateId

String

templateId cần lấy params

Example response

{
    "success": true,
    "data": {
        "templateId": "356338",
        "templateName": "Xác nhận đơn hàng",
        "price": 200,
        "note": "Xác nhận đơn hàng",
        "params": [
            {
                "name": "name",
                "type": "STRING",
                "require": true,
                "maxLength": 30,
                "minLength": 0,
                "acceptNull": false
            },
            {
                "name": "order_code",
                "type": "STRING",
                "require": true,
                "maxLength": 30,
                "minLength": 0,
                "acceptNull": false
            },
            {
                "name": "phone_number",
                "type": "STRING",
                "require": true,
                "maxLength": 15,
                "minLength": 0,
                "acceptNull": false
            },
            {
                "name": "price",
                "type": "NUMBER",
                "require": true,
                "maxLength": 20,
                "minLength": 0,
                "acceptNull": false
            },
            {
                "name": "status",
                "type": "STRING",
                "require": true,
                "maxLength": 30,
                "minLength": 0,
                "acceptNull": false
            },
            {
                "name": "date",
                "type": "DATE",
                "require": true,
                "maxLength": 20,
                "minLength": 0,
                "acceptNull": false
            },
            {
                "name": "url_callback",
                "type": "STRING",
                "require": true,
                "maxLength": 200,
                "minLength": 0,
                "acceptNull": false
            }
        ],
        "sample": {
            "date": "01/01/1970",
            "name": "name_sample",
            "price": 1000,
            "status": "status_sample",
            "order_code": "order_code_sample",
            "phone_number": "phone_number_sample",
            "url_callback": "url_callback_sample"
        }
    },
    "meta": {
        "sessionId": "f12e8c3d-2c49-44af-a765-6b27d13728e2"
    }
}

Cấu trúc các thuộc tính response

  1. Cấu trúc response

Tham số
Kiểu dữ liệu

success

Boolean

Xác định gọi api thành công

data

Array Object

Dữ liệu trả về

meta

Object

Metadata của request

  1. Cấu trúc data

Tham số
Kiểu dữ liệu

id

String

Định danh OA trong hệ thống InfiniX

templateName

String

Tên Template trong hệ thống InfiniX

templateId

String

Mã định danh template trong hệ thống Zalo

price

Number

Đơn giá của template.

note

String

Ghi chú của template

logo

String

Logo khi request template trên hệ thống InfiniX

params

Array Object

Mảng các dữ liệu params

sample

Object

Params mẫu của template

  1. Cấu trúc params

Tham số
Kiểu dữ liệu

name

String

Tên thuộc tính.

type

String

Định dạng validate của thuộc tính.

require

Boolean

Tính bắt buộc của thuộc tính.

maxLength

Number

Số kí tự tối đa được truyền vào thuộc tính.

minLength

Number

Số kí tự tối thiểu được truyền vào thuộc tính.

acceptNull

Boolean

Thông tin cho biết thuộc tính có thể nhận giá trị rỗng hay không.

  1. Cấu trúc meta

Tham số
Kiểu dữ liệu

sessionId

String

Mã định danh mỗi request

total

Number

Tổng số kết quả theo điều kiện tìm kiếm

page

Number

Số trang hiện tại

size

Number

Số lượng kết quả lấy về mỗi trang

Last updated