Delete Service Group API
Remove a service group and its associated configuration from the system
Delete Service Group API
Permanently remove service groups from the system. Use with caution as this affects all associated groups and may impact existing subscriptions.
Permanent Removal
Completely remove service group configuration.
Cascading Effect
May affect associated groups and users.
Admin Only
Requires administrative privileges.
Endpoint Overview
/graphqlDelete a service group by its ID. This operation is permanent and may affect all groups and subscriptions associated with the service group.
Request Parameters
idInt!RequiredThe unique identifier of the service group to delete.
GraphQL Mutation
mutation deleteServiceGroup($id: Int!) {
deleteServiceGroup(id: $id)
}Variables:
{
"id": 5
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"query": "mutation deleteServiceGroup($id: Int!) { deleteServiceGroup(id: $id) }",
"variables": {
"id": 5
}
}'Response
{
"data": {
"deleteServiceGroup": true
}
}{
"errors": [
{
"message": "Service group not found",
"path": ["deleteServiceGroup"],
"extensions": {
"code": "NOT_FOUND"
}
}
],
"data": null
}{
"errors": [
{
"message": "Cannot delete service group with active subscriptions",
"path": ["deleteServiceGroup"],
"extensions": {
"code": "HAS_ACTIVE_SUBSCRIPTIONS",
"activeCount": 150
}
}
],
"data": null
}Before Deleting
Check Active Users
Verify no users have active subscriptions in this service group.
Migrate Groups
Move any valuable groups to another service group first.
Backup Data
Export configuration data before deletion for records.
Notify Stakeholders
Inform relevant team members of the planned deletion.
Deletion Consequences
Groups Removed
All groups within the service group may be deleted.
Config Lost
Discount tiers and gateway assignments are removed.
Cannot Undo
Deletion is permanent - no recovery option.
User Impact
Users may need migration to different service groups.
Best Practices
Verify First
Double-check the service group ID before deleting.
Empty Groups
Delete or migrate all groups within before removing service group.
Document Reason
Record why the service group was deleted for audit purposes.
Test Environment
Test deletion process in staging environment first.
Related Endpoints
Irreversible Action
Deleting a service group is permanent and cannot be undone. Ensure all associated data is backed up or migrated before proceeding.
Review Before Deleting
Carefully review the service group and its contents before deletion to avoid unintended data loss.