Skip to main content

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"
}
ParameterDescriptionRequired
group_nameTên nhómx
group_descriptionMô 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": ""
}
ParameterDescriptionRequired
group_nameTên nhómx
group_descriptionMô tả nhóm
group_priorityMức độ ưu tiên
user_assignsDanh sách user cần assign
campaign_assignsDanh sách chiến dịch
department_uuidUUID phòng ban chứa nhóm