Splash Page API

API quản lý trang chào WIFI

Lấy danh sách trang chào

GET {{base_url}}/splash_pages

Cho phép lấy danh sách trang chào của một địa điểm

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

type_page

string

Loại trang chào. Nếu truyền vào type_page sẽ lấy ra chi tiết thông tin của loại trang chào đó , nếu không truyền vào type_page sẽ lấy ra danh sách tất cả các trang chào

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

{
    "status": 200,
    "message": "List splash pages",
    "data": [

    ]
}

Tên

Type_page

Trang đăng ký

register

Trang chào mặc định

default

Chúc mừng sinh nhật

birthday

Trang chào theo lượt đến

loyal

Trang chào theo tag

tag

Trang chào theo khung giờ

hour

Trang chào theo khoảng ngày

promotion

Trang khảo sát

survey

curl -X GET \
  '{{ base_url }}/splash_pages?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}'

Tạo mới trang chào mặc định

POST {{base_url}}/splash_pages/default

Cho phép tạo mới trang chào mặc định

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hotspot_method

string

Hình thức hotspot ( profile_code or default )

photo

string

Ảnh trang chào

content

string

Nội dung ảnh

title

string

Tiêu đề ảnh

auto_popup

string

Trang popup tự động chuyển hướng sau khi đăng nhập

welcome_text

string

Lời chào khi kết nối WIFI

connect_button

string

Tên nút kết nối WIFI

ignore_register

string

Bỏ qua đăng ký ("True" or "False")

wifi_access_code_default

string

Mã truy cập wifi mặc định

facebook_pixel_id

string

Pixel ID

facebook_pixel_code

string

Pixel code

google_pixel_code

string

Google remarketing code

{
    "status": 200,
    "status_code": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/default?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F content={{ content }} \
  -F title={{ title }} \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F welcome_text=Hello \
  -F connect_button=connect \
  -F ignore_register=False

hotspot_method ( Hình thức hotspot )

giải thích

profile_code

default

Cấu hình trang chào đăng ký

POST {{base_url}}/splash_pages/register

Cho phép cấu hình trang chào đăng ký

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

application/json

Request Body

NameTypeDescription

hotspot_method

string

Hình thức hotspot ( profile_code or default )

default_code

string

Mã truy cập wifi mặc định

name

string

Cấu hình trang đăng ký có yêu cầu họ và tên hay không, "True" or "False"

name_require

string

Bắt buộc người dùng phải nhập họ và tên hay có thể bỏ qua, "True" or "False"

email

string

Cấu hình trang đăng ký có yêu cầu email hay không, "True" or " False"

email_require

string

Bắt buộc người dùng phải nhập email hay có thể bỏ qua, "True" or "False"

birthday

string

Cấu hình trang đăng ký có yêu cầu ng sinh hay không, "True" or "False"

birthday_require

string

Bắt buộc người dùng phải nhập ngày sinh hay có thể bỏ qua, "True" or "False"

year_birthday

string

Cấu hình trang đăng ký có yêu cầu năm sinh hay không, "True" or "False"

year_birthday_require

string

Bắt buộc người dùng phải nhập năm sinh hay có thể bỏ qua, "True" or "False"

gender

string

Cấu hình trang đăng ký có yêu cầu giới tính hay không, "True" or "False"

gender_require

string

Bắt buộc người dùng phải nhập giới tính hay có thể bỏ qua, "True" or "False"

welcome_text

string

Lời chào mời đăng ký

birthday_text

string

Lời chào mời nhập sinh nhật

welcome_button

string

Tên nút kết nối

otp

string

Sử dụng otp khi đăng ký, "True" or "False"

{
    "status": 200,
    "status_code": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/register?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: application/json' \
  -d '{
	"name": "False",
	"name_require": "False",
	"email": "False",
	"email_require": "False",
	"birthday": "False",
	"birthday_require": "False",
	"year_birthday": "False",
	"year_birthday_require": "False",
	"gender": "False",
	"gender_require": "False",
	"welcome_text": "HELLO",
	"birthday_text": "Moi ban Nhap Vao Ngay sinh",
	"welcome_button": "Connect",
	"otp": "True"
}'

Lấy chi tiết thông tin trang chào của shop

GET {{base_url}}/splash_pages/<type_page>

Cho phép lấy chi tiết thông tin trang chào

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

curl -X GET \
  '{{ base_url }}/splash_pages/{{ type_page }}?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}'

Loại trang chào

type_page

Trang chào theo khoảng ngày

promotion

Trang chào theo giờ

hour

Trang chào khảo sát

survey

Trang chào sinh nhật

birthday

Trang chào theo lượt đến

loyal

Trng chào theo tag

tag

Trang chào mặc định

default

Trang đăng ký

register

Trang chào theo ngày trong tuần

weekday

Xóa ảnh trong trang chào mặc định

DELETE {{base_url}}/splash_pages/default

Cho phép xóa ảnh trong trang chào mặc định

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

card_id

string

id ảnh trang chào

{
    "status": 200,
    "message": [
        {
            "message": "Detele success!",
            "card_id": "5d960c99a066db1615fbbf40",
            "isError": false
        },
        {
            "message": "Card does not exist!",
            "card_id": "5d960c99a066db1615fbbf3e",
            "isError": true
        }
    ]
}
curl -X DELETE \
  '{{ base_url }}/splash_pages/default?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ card_id }}' \
  -H 'Content-Type: multipart/form-data' \
  -F card_id={{ card_id }}

Update ảnh trang chào mặc định

PUT {{base_url}}/splash_pages/default/card

Cho phép update ảnh trang chào mặc định

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

card_id

string

id ảnh

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

photo

string

Ảnh trang chào

content

string

Nội dung ảnh

title

string

Tiêu đề ảnh

curl -X PUT \
  '{{ base_url }}/splash_pages/default/card?pos_id={{ pos_id }}&card_id={{ card_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F content={{ content }} \
  -F title={{ title }}

Tạo và chỉnh sửa trang chào theo khoảng ngày

POST {{ base_url }}/splash_pages/promotion

Cho phép tạo mới và chỉnh sửa trang chào theo khoảng ngày

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_id

string

id trang chào ( trường hợp không truyền vào sẽ tạo mới trang chào, nếu truyền vào sẽ update thông tin ) ( lấy id trong trường "_id" , url: "{{ base_url }}/splash_pages?pos_id=abcdef&type_page=promotion")

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hotspot_method

string

Hình thức hotspot (profile_code or default)

default_code

string

Mã truy cập wifi mặc định

auto_pop

string

Trang popup tự động chuyển hướng sau đăng nhập

photo

string

ảnh nền trang chào

title

string

Lời chào

content

string

Nội dung

date_from

string

ngày bắt đầu ( fomat : "dd-mm-yyyy" ,vd: "04-10-2019")

date_to

string

ngày kết thúc ( fomat: "dd-mm-yyyy",vd: "05-10-2019")

active

string

trạng thái kích hoạt ( ví dụ : "True" hoặc "False")

{
    "status": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/promotion?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F photo=@{{ photo_path }} \
  -F title={{ title }} \
  -F content={{ content }} \
  -F date_from=04-10-2019 \
  -F date_to=05-10-2019 \
  -F active=False

Tạo mới và chỉnh sửa trang chào theo tag khách hàng

POST {{ base_url }}/splash_pages/tag

cho phép tạo mối và chỉnh sửa trang chào theo tag khách hàng

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_id

string

id trang chào ( nếu không có dữ liệu truyền vào sẽ tạo mới trang và nếu có thì sẽ update thông tin trang chào có id đó)

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hotspot_method

string

Hình thức hotspot (profile_code or default)

default_code

string

Mã truy cập wifi mặc định

photo

string

ảnh nền trang chào

title

string

lời chào

content

string

nội dung

auto_popup

string

trang popup tự động chuyển hướng sau xem trang chào

active

string

trạng thái trang chào ( ví dụ : "True" hoặc "False")

tags

string

id các tag hiện có của chi nhánh, địa điểm

{
    "status": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/tag?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F tags={{ tag_id }} \
  -F tags={{ tag_id }} \
  -F title={{ title }} \
  -F content={{ content }} \
  -F auto_popup={{ auto_popup }}

Tạo mới và chỉnh sửa trang chào theo lượt đến

POST {{ base_url }}/splash_pages/loyal

Cho phép tạo mới và chỉnh sửa trang chào theo lượt đến

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_id

string

id trang chào ( trường hợp truyền vào sẽ là update thông tin, nếu không truyền vào sẽ là tạo trang mới)

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

default_code

string

Mã truy cập wifi mặc định

hotspot_method

string

Hình thức hotspot (profile_code or default)

photo

string

ảnh nền trang chào

visit_by

string

số lượt đến tính theo ( "shop" hoặc "merchant"), mặc định là theo shop

title

string

lời chào

content

string

nội dung

loyal_count

string

lượt đến giới hạn dưới

loyal_count_max

string

lượt đến giới hạn trên

active

string

trạng thái kích hoạt trang chào (vd : "True" hoặc "False"

auto_popup

string

trang popup tự động chuyển hướng sau xem trang chào

{
    "status": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/loyal?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F title={{ title }} \
  -F content={{ content }} \
  -F loyal_count=1 \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F active=true \
  -F loyal_count_max=10 \
  -F visit_by=shop

Tạo mới và chỉnh sửa trang chào theo ngày trong tuần

POST {{ base_url }}/splash_pages/weekday

Cho phép tạo mới và chỉnh sửa trang chào theo ngày trong tuần

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_id

string

id trang chào ( trường hợp truyền vào sẽ update thông tin trang chào, nếu không truyền vào sẽ tạo trang mới )

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hotspot_method

string

Hình thức hotspot (profile_code or default)

default_code

string

Mã truy cập wifi mặc định

weekday

string

ngày trong tuần, chọn trong danh sách sau : 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday' .

active

string

Trạng thái kích hoạt trang chào (vd : 'True' hoặc 'False')

photo

string

ảnh trang chào

title

string

Tiêu đề

content

string

Nội dung trang chào

auto_popup

string

Trang chuyển hướng sau đăng nhập

{
    "status": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/weekday?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F title={{ title }} \
  -F 'content=Bạn nghĩ gì về dịch vụ của chúng tôi' \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F active=true \
  -F weekday=monday

Tạo mới và chỉnh sửa trang chào theo giờ

POST {{ base_url }}/splash_pages/hour

Cho phép tạo mới và chỉnh sửa thông tin trang chào theo giờ

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_id

string

id trang chào ( trường hợp không truyền vào sẽ tạo mới trang chào, nếu truyền vào sẽ chỉnh sửa thông tin trang chào) ( lấy ở trường "_id" info_page, API lấy danh sách trang chào )

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hotspot_method

string

Hình thức hotspot (profile_code or default)

default_code

string

Mã truy cập wifi mặc định

active

string

trạng thái kích hoạt trang chào ( ví dụ "True" hoặc "False")

title

string

lời chào

photo

string

ảnh nền trang chào

content

string

nội dung

hour_to

string

giờ kết thúc ( fomat: "hh:ii", vd: "12:20")

hour_from

string

giờ bắt đầu (fomat: "hh:ii", vd: "11:20")

auto_popup

string

trang popup tự động chuyên hướng sau đăng nhập

{
    "status": 200,
    "message": "Success!"
}
curl -X POST \
  '{{ base_url }}/splash_pages/hour?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F title={{ title }} \
  -F 'content=Bạn nghĩ gì về dịch vụ của chúng tôi' \
  -F hour_to=13:00 \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F active=true \
  -F hour_from=11:00

Tạo mới trang chào chúc mừng sinh nhật

POST {{base_url}}/splash_pages/birthday

Cho phép tạo mới và chỉnh sửa trang chào đăng kí

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hostpot_method

string

Hình thức hotspot (profile_code or default)

default_code

string

Mã truy cập wifi mặc định

photo

string

Ảnh nền trang chào

title

string

Tiêu đề

content

string

Nội dung

auto_popup

string

Trang popup tự động chuyển hướng sau đăng nhập

active

string

kích hoạt (True or False)

{
    "status": 200,
    "message": "success",
    "data": {
    
    }
}
curl -X POST \
  '{{ base_url }}/splash_pages/birthday?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F title={{ title }} \
  -F 'content={{ content }}' \
  -F auto_popup={{ auto_popup }} \
  -F active=true

Tạo mới trang chào khảo sát

POST {{base_url}}/splash_pages/survey

Cho phép tạo mới và chỉnh sửa trang chào khảo sát

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

Content-Type

string

multipart/form-data

Request Body

NameTypeDescription

hostpot_method

string

Hình thức hotspot (profile_code or default)

default_code

string

Mã truy cập wifi mặc định

photo

string

Ảnh nền trang chào

survey_type

string

Loại khảo sát

question

string

Câu hỏi

answer

string

Câu trả lời

auto_popup

string

Trang chuyển hướng sau đăng nhập

active

string

Kích hoạt (True or False)

min_point

string

Điểm thấp nhất

max_point

string

Điểm nhiều nhất

{
    "status": 200,
    "message": "Success!"
}

Loại khảo sát

survey_type

Mô tả

Chọn nhiều đáp án

multi_select

Bắt buộc phải có trường answer

Chọn một đáp án

one_select

Bắt buộc phải có trường answer

Chấm điểm

rating

Bắt buộc phải có trường min_point, max_point

# survey_type: rating
curl -X POST \
  '{{ base_url }}/splash_pages/survey?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F survey_type=rating \
  -F 'question=Bạn nghĩ gì về dịch vụ của chúng tôi' \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F active=true \
  -F min_point=1 \
  -F max_point=5

# survey_type: multi_select
curl -X POST \
  '{{ base_url }}/splash_pages/survey?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}' \
  -H 'Content-Type: multipart/form-data' \
  -F photo=@{{ photo_path }} \
  -F survey_type=multi_select \
  -F 'question=Bạn nghĩ gì về dịch vụ của chúng tôi' \
  -F auto_popup=https://www.facebook.com/nextifyvn/ \
  -F active=true \
  -F 'answer={
    "tag": {{ tag_id }},
    "value": "Nội dung câu trả lời"
}' \
  -F 'answer={
    "tag": {{ tag_id }},
    "value": "Nội dung câu trả lời"
}'
Form câu trả lời

{
    "tag": {{ id_tag }},
    "value": "Nội dung câu trả lời"
}

Update trang chào khảo sát

PUT {{ base_url }}/splash_pages/survey

Cho phép update trạng thái trạng chào khảo sát

Query Parameters

NameTypeDescription

pos_id

string

i​d địa

splash_id

string

id trang chào

status

string

trạng thái kích hoạt (true hoặc false)

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

{
    "status": 200,
    "message": "active splash page success!"
}
curl -X PUT \
  '{{ base_url }}/splash_pages/survey?pos_id={{ pos_id }}&splash_id={{ splash_id }}&status={{ status }}'
  -H 'Authorization: Bearer {{ access_token }}'

Xóa trang chào

DELETE {{ base_url }}/splash_pages/<type_page>

Cho phép xóa trang chào

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_id

string

id trang chào

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

curl -X DELETE \
  '{{ base_url }}/splash_pages/{{ type_page }}?pos_id={{ pos_id }}&splash_id={{ splash_id }}'
  -H 'Authorization: Bearer {{ access_token }}'

Loại trang chào

type_page

Trang chào theo khoảng ngày

promotion

Trang chào theo giờ

hour

Trang chào khảo sát

survey

Trang chào sinh nhật

birthday

Trang chào theo lượt đến

loyal

Trang chào theo tag

tag

Lấy danh sách thứ tự ưu tiên trang chào

GET {{ base_url }}/splash_pages/priority

Cho phép lấy danh sách thứ tự ưu tiên trang chào của một địa điểm

Query Parameters

NameTypeDescription

pos_id

string

i​d địa điểm

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

{
    "status": 200,
    "message": "Success!",
    "data": {
        "priority_splash_page": [
            thứ tự ưu tiên trang chào
        ],
        "priority_splash_page_status": [
            trang chào đã được kích hoạt và theo thứ tự ưu tiên
        ]
    }
}
curl -X GET \
  '{{ base_url }}/splash_pages/priority?pos_id={{ pos_id }}' \
  -H 'Authorization: Bearer {{ access_token }}'

Thiết lập thứ tự ưu tiên trang chào

POST {{ base_url }}/splash_pages/priority

Cho phép thiết lập thứ tự ưu tiên trang chào

Query Parameters

NameTypeDescription

pos_id

string

id địa điểm

splash_pages

string

thứ tự ưu tiên trang chào

Headers

NameTypeDescription

Authorization

string

Bearer <access_token>

{
    "status": 200,
    "message": "Success!",
    "data": {
        "priority_splash_page": [
            thứ tự ưu tiên trang chào
        ]
    }
}
curl -X POST \
  '{{ base_url }}/splash_pages/priority?pos_id={{ pos_id }}&splash_pages=survey,birthday,weekday,hour,promotion,tag,loyal,plus_register,default' \
  -H 'Authorization: Bearer {{ access_token }}'

Last updated