Service Group API
POST /serviceGroup
Description
This API endpoint retrieves details of a specific service group based on the provided id
.
Request Body
The request utilizes GraphQL to perform the serviceGroup
query.
Query:
query serviceGroup ($id: Int!) {
serviceGroup (id: $id) {
id
name
description
language
discount
discount3
discount6
discount12
discount24
discount36
discountLifetime
}
}
Variables:
{
"id": 0
}
Example Request:
curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query serviceGroup ($id: Int!) {\n serviceGroup (id: $id) {\n id\n name\n description\n language\n discount\n discount3\n discount6\n discount12\n discount24\n discount36\n discountLifetime\n }\n}","variables":{"id":0}}'
Response:
-
Success (200 OK):
- The response contains details of the requested service group.
{
"data": {
"serviceGroup": {
"id": 1,
"name": "Premium Services",
"description": "High-end service package",
"language": "en",
"discount": 10,
"discount3": 15,
"discount6": 20,
"discount12": 25,
"discount24": 30,
"discount36": 35,
"discountLifetime": 40
}
}
} -
Error (4XX/5XX):
- If there is an issue with retrieving the service group, such as invalid ID or server errors, the response will include an appropriate error message and status code.
Note:
Make sure to provide a valid id
in the variables to retrieve the correct service group details.