Edit Service Group API

Modify existing service group settings including discounts, gateways, and geolocation restrictions

Group Management

Edit Service Group API

Update service group configurations. Modify pricing tiers, discount percentages, gateway assignments, and geolocation restrictions for existing service groups.

Flexible Updates

Modify any service group attribute.

Adjust Discounts

Update pricing and discount tiers.

Geo Controls

Change geographic availability.


Endpoint Overview

MUTATION/graphql

Update an existing service group's attributes including name, description, discount tiers, gateway assignments, and geolocation restrictions.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

idInt!Required

The unique identifier of the service group to update.

serviceGroupServiceGroupEdit!Required

Object containing the fields to update.

nameString

Updated name for the service group.

descriptionString

Updated description.

discountFloat

Base discount percentage.

discount3Float

3-month subscription discount.

discount6Float

6-month subscription discount.

discount12Float

Annual subscription discount.

discount24Float

2-year subscription discount.

discount36Float

3-year subscription discount.

discountLifetimeFloat

Lifetime subscription discount.

gateways[Int]

Updated gateway assignments.

allowedGeolocations[Int]

Updated allowed geographic regions.

disAllowedGeolocations[Int]

Updated blocked geographic regions.


GraphQL Mutation

mutation editServiceGroup($id: Int!, $serviceGroup: ServiceGroupEdit!) {
  editServiceGroup(id: $id, serviceGroup: $serviceGroup) {
    id
    name
    description
    discount
    discount12
    discount24
  }
}

Variables:

{
  "id": 5,
  "serviceGroup": {
    "name": "Premium Plans - Updated",
    "discount12": 35,
    "discount24": 45
  }
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation editServiceGroup($id: Int!, $serviceGroup: ServiceGroupEdit!) { editServiceGroup(id: $id, serviceGroup: $serviceGroup) { id name discount12 } }",
    "variables": {
      "id": 5,
      "serviceGroup": {
        "discount12": 35
      }
    }
  }'

Response

200Service Group Updated Successfully
{
  "data": {
    "editServiceGroup": {
      "id": "5",
      "name": "Premium Plans - Updated",
      "description": "Premium VPN service with priority support",
      "discount": 0,
      "discount12": 35,
      "discount24": 45
    }
  }
}
400Service Group Not Found
{
  "errors": [
    {
      "message": "Service group not found",
      "path": ["editServiceGroup"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

Common Updates

Promotional Discounts

Temporarily increase discount percentages for sales events.

Gateway Expansion

Add new servers to improve coverage and performance.

Region Updates

Modify geographic availability based on demand or licensing.

Pricing Adjustments

Update base prices or discount structures.


Best Practices

Partial Updates

Only include fields that need to change in the request.

Test Changes

Verify updates on staging before applying to production.

Communicate Changes

Notify users of significant pricing or availability changes.

Audit Trail

Keep records of changes for compliance and troubleshooting.



Impact on Existing Users

Changes to service groups may affect users on existing plans. Discount changes typically apply to new subscriptions only, not existing renewals.

Review Before Editing

View the current service group configuration before making changes to ensure you understand the impact.

Get Service Group API