In this article, you can read about retrieving service types, retrieving service type groups, and retrieving projects filtered by a specific service type value via the API.
Service Type
A service type is a parameter that can be connected to a company or to a specific project. Each service type belongs to a service type group, so you can retrieve service types either by their group or by their individual IDs.
Retrieving Service Types
GET
https://api.recman.io/v2/get/index.php?key={{api_key}}&scope=
serviceType&serviceTypeGroupId=60&serviceTypeIds=423Use serviceTypeGroupId to retrieve all service types belonging to a specific service type group, or use serviceTypeIds to retrieve information about one or more specific service types.
| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your API key |
| scope | string | Required | Must be set to serviceType |
| serviceTypeGroupId | integer | Optional | Search criteria. Filters service types belonging to the given service type group |
| serviceTypeIds | integer | Optional | Extra parameter. Filters results to the given service type ID(s) |
Each returned service type includes the following fields:
| Field | Type | Description |
|---|---|---|
| serviceTypeId | integer | The ID of the service type |
| name | string | The name of the service type |
| serviceTypeGroupId | integer | The ID of the service type group this service type belongs to |
| occupationId | integer | The ID of the related occupation, if any |
| created | date-time | Creation date, format "Y-m-d H:i:s" |
| createUserId | integer | The ID of the user who created the service type |
Retrieving Service Type Groups
GET
https://api.recman.io/v2/get/index.php?key={{api_key}}&scope=
serviceTypeGroupRetrieves a list of all available service type groups.
| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your API key |
| scope | string | Required | Must be set to serviceTypeGroup |
Each returned service type group includes the following fields:
| Field | Type | Description |
|---|---|---|
| serviceTypeGroupId | integer | The ID of the service type group |
| name | string | The name of the service type group |
| number | integer | Sort order/sequence number of the group |
| created | date-time | Creation date, format "Y-m-d H:i:s" |
| createUserId | integer | The ID of the user who created the service type group |
Retrieving Projects with Service Type Value
GET
https://api.recman.io/v2/get/index.php?scope=project&key=
{{api_key}}&page=1&fields=name,serviceTypeId&serviceTypeId=413You can search for projects with a specific service type by adding the optional query parameterserviceTypeId to a standard project retrieval request.
| Field | Type | Required | Description |
|---|---|---|---|
| scope | string | Required | Must be set to project |
| key | string | Required | Your API key |
| page | integer | Required | Page number |
| fields | string | Required | Comma-separated list of fields to return, e.g.name,serviceTypeId |
| serviceTypeId | integer | Optional | Filters projects to only those with the given service type ID |
Note
This uses the same project scope covered in the Projects article; service type filtering is just an additional query parameter on that endpoint.