API Documentation

API Endpoint

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:

ServiceType diagram

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
Requestsreturns service types

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
Responses200
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 types
GET/api/v2/service_types


GET /api/v2/service_types/1
Requestsreturns service type

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
Responses200
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 type
GET/api/v2/service_types/{id}

URI Parameters
HideShow
id
number (required) Example: 1

service type id


POST /api/v2/service_types
Requestscreates service typereturns error

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"
    }
  }
}
Responses201
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": ""
    }
  }
}
Responses422
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"
      }
    }
  ]
}

Create a service type
POST/api/v2/service_types

URI Parameters
HideShow
name
string (required) Example: Name

name


PATCH /api/v2/service_types/1
Requestsupdates service_typereturns error

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"
    }
  }
}
Responses200
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": ""
    }
  }
}
Responses422
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 type
PATCH/api/v2/service_types/{id}

URI Parameters
HideShow
id
number (required) Example: 1

service type id


PATCH /api/v2/service_types/1/archive
Requestsarchives service_type

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
Responses200
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-02T02:19:33.000+02:00",
      "description": "test description"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "1885"
        }
      },
      "assignees": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Archives a service type
PATCH/api/v2/service_types/{id}/archive

URI Parameters
HideShow
id
number (required) Example: 1

service type id


DELETE /api/v2/service_types/1
Requestsdeletes service type

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
Responses204
This response has no content.

Deletes a service type
DELETE/api/v2/service_types/{id}

URI Parameters
HideShow
id
number (required) Example: 1

service type id


Generated by aglio on 02 Aug 2025