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+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "1250",
"type": "service_types",
"attributes": {
"name": "test service type",
"archived_at": null,
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1879"
}
},
"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/1251
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+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "1251",
"type": "service_types",
"attributes": {
"name": "test service type",
"archived_at": null,
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1880"
}
},
"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+json
Body
{
"data": {
"type": "service_types",
"attributes": {
"name": "test name"
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "1253",
"type": "service_types",
"attributes": {
"name": "test name",
"archived_at": null,
"description": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1881"
}
},
"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+json
Body
{
"data": {
"type": "service_types",
"attributes": {
"name": ""
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
PATCH /api/v2/service_types/1255
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+json
Body
{
"data": {
"type": "service_types",
"attributes": {
"name": "new name"
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "1255",
"type": "service_types",
"attributes": {
"name": "new name",
"archived_at": null,
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1883"
}
},
"assignees": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/service_types/1256
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+json
Body
{
"data": {
"type": "service_types",
"attributes": {
"name": ""
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"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/1257/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+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "1257",
"type": "service_types",
"attributes": {
"name": "test service type",
"archived_at": "2025-08-01T06:18:02.000+02:00",
"description": "test description"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1885"
}
},
"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/1262
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+json
Deletes a service typeDELETE/api/v2/service_types/{id}
- id
number
(required) Example: 1service type id
Generated by aglio on 01 Aug 2025