Tài liệu API
Bạn cần thêm tham số api_token=YOUR_API_TOKEN vào url kết nối tới hệ thống Zozo WS
Ví dụ: https://worker.zozo.vn/api/v1/lists?api_token=YOUR_API_TOKEN
Authentication
Phương thức |
API |
Chức năng |
POST
|
/api/v1/login-token
|
Generate one time login token
|
|
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/login-token? \
-d api_token=api_token
User can login by visiting the following URL:
https://worker.zozo.vn/login/token/*|token_string|*
|
EMAIL
Phương thức |
API |
Chức năng |
POST
|
/api/v1/email/send
|
Powerful APIs that enable you to send, receive and track email effortlessly
|
|
Thông số
- $subject
- Subject of email
- $fromEmail
- Email send
- $fromName
- Sender name
- $reply_to
- Sender email
- $to
- Email recipient
- $cc
- cc email
- $bcc
- bcc email
- $merchantName
- Merchant name
- $template
- Template name
- $params
- Extensive parameters added to email body
Trả về
Creation messages in json
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/mail/send? \
-d api_token=api_token \
-d subject=subject \
-d fromEmail=contact@zozo.vn \
-d fromName=zozo \
-d reply_to=noreply@yourdomain.com \
-d to=email1@gmail.com \
-d cc=email2@gmail.com \
-d bcc=email3@gmail.com \
-d merchantName=zozo.vn \
-d template=index \
-d params={
"customerName": "Nguyen Van A", \
"customerEmail": "recipient@gmail.com" \
}
|
CONVERT HTML TO AMP
Phương thức |
API |
Chức năng |
POST
|
/api/v1/teamplate/amp
|
Converting html code to amp helps your code run faster
|
|
Thông số
Trả về
successfully converted html to amp
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/template/amp? \
-d api_token=api_token \
-d teamplate=Hello World
|
MINIFY
Phương thức |
API |
Chức năng |
POST
|
/api/v1/teamplate/minify
|
We can reduce html file size up to 85%
|
|
Thông số
Trả về
successfully compression code
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/template/minify? \
-d api_token=api_token \
-d teamplate=Hello World
|
Kiểm tra IP
Phương thức |
API |
Chức năng |
POST
|
/api/v1/ip/ipinfo
|
Check information from ip address
|
|
Thông số
Trả về
successfully ip location
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/ip/ipinfo? \
-d api_token=api_token \
-d ip=66.249.84.252
|
Nén ảnh
Phương thức |
API |
Chức năng |
POST
|
/api/v1/image/shrink
|
We can reduce the file size by 60- 80%
|
|
Thông số
Trả về
successfully compression images
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/image/shrink? \
-d api_token=api_token \
-d image=file
|
Xác thực email
Phương thức |
API |
Chức năng |
POST
|
/api/v1/email/verify
|
Fast, accurate email validation.
|
|
Thông số
Trả về
successfully compression images
|
Example:
curl -X GET -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/image/shrink? \
-d api_token=api_token \
-d email=ws@zozo.vn
|
SCREENSHOT URL
Phương thức |
API |
Chức năng |
POST
|
/api/v1/url/screenshot
|
Take pictures through the link.
|
|
Thông số
Trả về
successfully compression images
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/url/screenshot? \
-d api_token=api_token
|
SHORT URL
Phương thức |
API |
Chức năng |
POST
|
/api/v1/url/short
|
shorten your path.
|
|
Thông số
Trả về
successfully compression images
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/url/short? \
-d api_token=api_token
|
QR CODE
Phương thức |
API |
Chức năng |
POST
|
/api/v1/qr-code/encode
|
shorten your path.
|
|
Thông số
- $type
- type:text, mecard, vcard
- $content
- Enter the text to be converted
Trả về
successfully compression images
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/qr-code/encode? \
-d api_token=api_token
|
SEARCH ELASTICSEARCH
Phương thức |
API |
Chức năng |
POST
|
/api/v1/elasticsearch/trending-keywords
|
search trending keyword.
|
|
Thông số
- $merchant
- merchant name
- $from
- insert time start
- $to
- insert time end
- $limit
- Inset limit data
Trả về
data index
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/trending-keywords? \
-d api_token=api_token
|
POST
|
/api/v1/elasticsearch/search
|
search.
|
|
Thông số
- $index
- index name
- $keyword
- insert text here
- $fields
- Enter field name in index
Trả về
data index
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/search? \
-d api_token=api_token
|
POST
|
/api/v1/elasticsearch/insert
|
Insert data.
|
|
Thông số
- $index
- index name
- $data
- field array and you must enter the field name with the value
Trả về
successfully
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/insert? \
-d api_token=api_token
|
POST
|
/api/v1/elasticsearch/get
|
Get data.
|
|
Thông số
- $index
- index name
- $id
- id in field on index
Trả về
successfully get data
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/get? \
-d api_token=api_token
|
POST
|
/api/v1/elasticsearch/delete
|
Delete data.
|
|
Thông số
- $index
- index name
- $id
- id in field on index
Trả về
successfully delete data
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/delete? \
-d api_token=api_token
|
POST
|
/api/v1/elasticsearch/create-index
|
create index name.
|
|
Thông số
Trả về
successfully create index name
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/create-index? \
-d api_token=api_token
|
POST
|
/api/v1/elasticsearch/delete-index
|
Delete index name.
|
|
Thông số
Trả về
successfully delete index name
|
Example:
curl -X POST -H "accept:application/json" -G \
https://worker.zozo.vn/api/v1/elasticsearch/delete-index? \
-d api_token=api_token
|