Tag API
API cho phép tạo mới , chỉnh sửa và xóa tag
Lấy danh sách tag
GET {{ base_url }}/tags
Cho phép lấy danh sách tag
Query Parameters
merchant_id_app
string
id merchant
pos_id
string
id địa điểm
Headers
Authentication
string
Bearer <access_token>
{
"status": 200,
"message": "success",
"data": [
{
"_id": "5b5e8dc89f573c371a123e63",
"name": "Nhân viên",
"description": ""
},
{
"_id": "5b836aff9f573c1275de0109",
"name": "nhân viên test",
"description": "nhân viên"
}
]
}{
"status_code": 404,
"message": "pos_id does not exist!"
}Truyền vào merchant_id_app hoặc pos_id:
+ Nếu truyền vào merchant_id_app sẽ lấy danh sách tất cả các tag của merchant
+ Nếu truyền vào pos_id sẽ lấy danh sách tất cả các tag của shop
Tạo mới và chỉnh sửa tag
POST {{ base_url }}/tags
api cho phép tạo mới và chỉnh sửa tag
Query Parameters
pos_id
string
id địa điểm
tag_id
string
id tag (nếu không truyền vào sẽ tạo mới, nếu có sẽ update thông tin tag)
Headers
Authorization
string
Bearer <access_token>
Content-Type
string
multipart/form-data
Request Body
name
string
tên tag
description
string
mô tả tag
{
"status": 200,
"message": "success"
}{
"status": 400,
"message": "Tag name is exists!"
}Xóa tag
DELETE {{ base_url }}/tags
cho phép xóa tag
Query Parameters
pos_id
string
id địa điểm
tag_id
string
id tag
Headers
Authorization
string
Bearer <access_token>
{
"status": 200,
"message": "success"
}{
"status_code": "404",
"message": "pos_id does not exist!"
}Last updated
Was this helpful?