API Documentation
Service Types ¶
Service Types ¶
For more details about what service types are, please refer to the help article.
The service type object represents one category or type for a service your company offers. This categorization helps in organizing your workflows, time tracking and analyzing profitability.
Following diagram shows service types in our data hierarchy:
Supported attributes
-
name (string, mandatory)
-
description (text)
Supported filters
-
name
-
description
-
person_id
-
query
As each service type can be assigned to a specific person via service type assignments, the person_id filter enables to retrieve a list of service types assigned to that specific person.
When name of a service type is known in full you may use the name filter. Otherwise, when only partial name is known, you may use query to filter service types.
Supported sort params
There are no supported params for service type objects. Default sorting is by name followed by its id, both in ascending order.
GET /api/v2/service_types
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": [
{
"id": "1260",
"type": "service_types",
"attributes": {
"name": "test service type",
"archived_at": null,
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1906"
}
},
"assignees": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/service_types?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/service_types?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}Get service typesGET/api/v2/service_types
GET /api/v2/service_types/1261
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "1261",
"type": "service_types",
"attributes": {
"name": "test service type",
"archived_at": null,
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1907"
}
},
"assignees": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Gets a service typeGET/api/v2/service_types/{id}
- id
number(required) Example: 1service type id
POST /api/v2/service_types
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "service_types",
"attributes": {
"name": "test name"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "1263",
"type": "service_types",
"attributes": {
"name": "test name",
"archived_at": null,
"description": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1908"
}
},
"assignees": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/service_types
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "service_types",
"attributes": {
"name": ""
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}PATCH /api/v2/service_types/1265
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "service_types",
"attributes": {
"name": "new name"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "1265",
"type": "service_types",
"attributes": {
"name": "new name",
"archived_at": null,
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1910"
}
},
"assignees": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/service_types/1266
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "service_types",
"attributes": {
"name": ""
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}Update a service typePATCH/api/v2/service_types/{id}
- id
number(required) Example: 1service type id
PATCH /api/v2/service_types/1267/archive
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "1267",
"type": "service_types",
"attributes": {
"name": "test service type",
"archived_at": "2025-10-25T06:21:14.000+02:00",
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1912"
}
},
"assignees": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Archives a service typePATCH/api/v2/service_types/{id}/archive
- id
number(required) Example: 1service type id
DELETE /api/v2/service_types/1272
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonDeletes a service typeDELETE/api/v2/service_types/{id}
- id
number(required) Example: 1service type id
Generated by aglio on 25 Oct 2025