Edit
Edit Group
curl --location --request PUT 'https://{{base_url}}/v3/group/446401ea-bb08-4a71-9fd8-22dfb15072e5' \
--header 'Authorization: Bearer {{TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"group_name": "Group Updated",
"group_description": "For U"
}'
Response trả về:
{
"data": {
"group_uuid": "446401ea-bb08-4a71-9fd8-22dfb15072e5",
"domain_uuid": "c275b950-9885-4775-b1bd-09fc865afa48",
"group_name": "Group Updated",
"group_description": "For U",
"department_uuid": ""
},
"message": "success"
}
Error Response trả về:
{
"error": "group is not found"
}
API này dùng để update thông tin nhóm.
HTTP Request
PUT https://{{base_url}}/v3/group/{{group_uuid}}
Body
Sample data:
{
"group_name": "TEL4VN Group Updated",
"group_description": "For U"
}
Parameter | Description | Required |
---|---|---|
group_name | Tên nhóm | x |
group_description | Mô tả nhóm |
Assign User Into Group
curl --location --request PUT 'https://{{base_url}}/v3/group/446401ea-bb08-4a71-9fd8-22dfb15072e5' \
--header 'content-type: application/json' \
--header 'authorization: Bearer {{token}}' \
--data '{
"group_name": "Group Updated",
"group_description": "",
"group_priority": 0,
"user_assigns": [
"e0406808-4be4-4e43-9ec5-512d91e2b95e"
],
"campaign_assigns": [],
"department_uuid": ""
}'
Response trả về:
{
"data": {
"group_uuid": "446401ea-bb08-4a71-9fd8-22dfb15072e5",
"domain_uuid": "c275b950-9885-4775-b1bd-09fc865afa48",
"group_name": "Group Updated",
"group_description": "",
"department_uuid": ""
},
"message": "success"
}
Error Response trả về:
{
"error": [
{
"group_name": "String length must be greater than or equal to 1"
},
{
"group_name": "Does not match pattern '^[a-zA-Z0-9\\s.\\-\\_]+$'"
}
]
}
API này dùng để update thông tin nhóm.
HTTP Request
PUT https://{{base_url}}/v3/group/{{group_uuid}}
Body
Sample data:
{
"group_name": "Group Updated",
"group_description": "",
"group_priority": 0,
"user_assigns": [
"e0406808-4be4-4e43-9ec5-512d91e2b95e"
],
"campaign_assigns": [],
"department_uuid": ""
}
Parameter | Description | Required |
---|---|---|
group_name | Tên nhóm | x |
group_description | Mô tả nhóm | |
group_priority | Mức độ ưu tiên | |
user_assigns | Danh sách user cần assign | |
campaign_assigns | Danh sách chiến dịch | |
department_uuid | UUID phòng ban chứa nhóm |