Get service parameters
This endpoint retrieves the value of the parameters configured for a service.
GET /api/v1/businesses/{business_id}/services/{service_id}/service_parameters/{key}
|
The value of key can be found in the Business configuration > Defined parameters section, in the key column. |
If the data included in the request is correct — businessId, serviceId and key — the response will contain the value defined for the parameter within the indicated service.
Response example
To query the counters displayed in the payroll report, the following request is made:
GET /api/v1/businesses/{business_id}/services/{service_id}/service_parameters/payroll.businesscounters
The response indicates the configuration established for this parameter, including the category (Reports) and the identifiers of the selected counters.
[
{
"key": "payroll.businesscounters",
"categoryType": "REPORTS",
"values": {
"value": [
4866,
4865
]
}
}
]
To query the schedules configured for the HD (home delivery) section, the following request is made:
GET /api/v1/businesses/{business_id}/services/{service_id}/service_parameters/HDTimetable
The response indicates the configuration established for this parameter, including the category (Needs) and the different values for each type of day.
[
{
"key": "HDTimetable",
"categoryType": "NEEDS",
"values": {
"value": true,
"dayTypeId": "MONDAY",
"initTime": "10:00",
"endTime": "15:00"
}
},
{
"key": "HDTimetable",
"categoryType": "NEEDS",
"values": {
"value": true,
"dayTypeId": "WEEKENDS",
"initTime": "08:00",
"endTime": "10:00"
}
},
{
"key": "HDTimetable",
"categoryType": "NEEDS",
"values": {
"value": false,
"dayTypeId": "WEDNESDAY",
"initTime": "10:00",
"endTime": "14:00"
}
}
]
Details
-
key: identifier for the parameter.
-
categoryType: category in which the parameter is included. Can be:
PLANNING(Planning management),NEEDS(Needs management),CLOCK_GUARD(Clockings management),REPORTS(Reports management) orOTHER(Global parameters). -
values: defined values for the parameter.
As shown in the examples, the content of the response varies depending on the service parameter being queried and how it is configured in the system.
Error codes
In addition to the common errors, this endpoint can return the following codes:
| Code | Message | Description |
|---|---|---|
|
Service Param not Found |
The key ( |
Useful links
What is a service/store parameter?