Delete Service Group API
POST /deleteServiceGroup
Description
This API endpoint allows users to delete an existing service group by providing its unique identifier. The deletion will remove the service group and its associated attributes, such as discounts, language settings, and geolocation restrictions.
Request Body
The request utilizes GraphQL to perform the deleteServiceGroup
mutation.
Mutation:
mutation deleteServiceGroup ($id: Int!) {
deleteServiceGroup (id: $id) {
id
name
}
}
Variables:
{
"id": 0
}
- id (Int): The unique identifier of the service group that needs to be deleted.
Response:
-
Success (200 OK):
{
"data": {
"deleteServiceGroup": {
"id": "<Service_Group_ID>",
"name": "<Service_Group_Name>",
"description": "<Service_Group_Description>",
"language": "<Language_Code>",
"discount": "<Base_Discount>",
"discount3": "<3_Month_Discount>",
"discount6": "<6_Month_Discount>",
"discount12": "<12_Month_Discount>",
"discount24": "<24_Month_Discount>",
"discount36": "<36_Month_Discount>",
"discountLifetime": "<Lifetime_Discount>"
}
}
}id
(String): The unique identifier of the deleted service group.name
(String): The name of the service group.description
(String): The description of the service group.language
(String): The language code in which the service group was offered.discount
(String): The base discount that was applied to the service group.discount3
(String): The discount applied for a 3-month subscription.discount6
(String): The discount applied for a 6-month subscription.discount12
(String): The discount applied for a 12-month subscription.discount24
(String): The discount applied for a 24-month subscription.discount36
(String): The discount applied for a 36-month subscription.discountLifetime
(String): The discount applied for a lifetime subscription.
-
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid data, missing required fields, or server errors.
Note:
Ensure that the id
corresponds to an existing service group that needs to be deleted. Once deleted, the service group and its settings cannot be recovered. Ensure that all necessary backups or exports are made before performing this action.