API Documentation
Service Assignments ¶
Service Assignments ¶
To restrict time tracking & expense logging, there is an option to assign specific people to specific services. After enabling “Restricted by person” option on a budget, services with no one assigned will ignore this restriction, until you assign someone. For more details about how to achieve that, please refer to the help article.
Supported filter params
-
id
-
service_id (array)
-
person_id (array)
Supported sort params
There are no supported params for service assignment objects. There is also no default sorting.
GET /api/v2/service_assignments?filter[service_id]=1136
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": "9",
"type": "service_assignments",
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1859"
}
},
"person": {
"meta": {
"included": false
}
},
"service": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/service_assignments?filter%5Bservice_id%5D=1136&page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/service_assignments?filter%5Bservice_id%5D=1136&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 assignmentsGET/api/v2/service_assignments
GET /api/v2/service_assignments/10
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": "10",
"type": "service_assignments",
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1860"
}
},
"person": {
"meta": {
"included": false
}
},
"service": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Gets a service assignmentGET/api/v2/service_assignments/{id}
- id
number
(required) Example: 1service assignment id
POST /api/v2/service_assignments
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_assignments",
"attributes": {},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "1138"
}
},
"person": {
"data": {
"type": "people",
"id": "7515"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "12",
"type": "service_assignments",
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1861"
}
},
"person": {
"meta": {
"included": false
}
},
"service": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/service_assignments
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_assignments",
"attributes": {},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "0"
}
},
"person": {
"data": {
"type": "people",
"id": "7518"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/service"
}
}
]
}
POST /api/v2/service_assignments
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_assignments",
"attributes": {},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "1141"
}
},
"person": {
"data": {
"type": "people",
"id": "7522"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "only one assignment per service, per person is allowed",
"source": {
"pointer": "data/attributes/service"
}
}
]
}
Create a service assignmentPOST/api/v2/service_assignments
PATCH /api/v2/service_assignments/16
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_assignments",
"attributes": {},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "1143"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "16",
"type": "service_assignments",
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1865"
}
},
"person": {
"meta": {
"included": false
}
},
"service": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/service_assignments/17
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_assignments",
"attributes": {},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "0"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/service"
}
}
]
}
PATCH /api/v2/service_assignments/18
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_assignments",
"attributes": {},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "1146"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "only one assignment per service, per person is allowed",
"source": {
"pointer": "data/attributes/service"
}
}
]
}
Update a service assignmentPATCH/api/v2/service_assignments/{id}
- id
number
(required) Example: 1service assignment id
DELETE /api/v2/service_assignments/20
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 assignmentDELETE/api/v2/service_assignments/{id}
- id
number
(required) Example: 1service assignment id
Generated by aglio on 02 Aug 2025