API Documentation
Entitlements ¶
Entitlements ¶
GET /api/v2/entitlements
Requests
GET /api/v2/entitlements
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+jsonResponses
Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": [
{
"id": "41",
"type": "entitlements",
"attributes": {
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": "21.5",
"used": "0.0",
"pending": "0.0",
"note": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "496"
}
},
"event": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
},
"approval_workflow": {
"meta": {
"included": false
}
}
}
},
{
"id": "42",
"type": "entitlements",
"attributes": {
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": "21.0",
"used": "0.0",
"pending": "0.0",
"note": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "496"
}
},
"event": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
},
"approval_workflow": {
"meta": {
"included": false
}
}
}
},
{
"id": "43",
"type": "entitlements",
"attributes": {
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": "21.0",
"used": "0.0",
"pending": "0.0",
"note": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "496"
}
},
"event": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
},
"approval_workflow": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/entitlements?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/entitlements?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 3,
"page_size": 30,
"max_page_size": 200
}
}Get entitlementsGET/api/v2/entitlements
GET /api/v2/entitlements/1
Requests
GET /api/v2/entitlements/44
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+jsonResponses
Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "44",
"type": "entitlements",
"attributes": {
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": "21.5",
"used": "0.0",
"pending": "0.0",
"note": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "497"
}
},
"event": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
},
"approval_workflow": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Gets a entitlementGET/api/v2/entitlements/{id}
URI Parameters
- id
number(required) Example: 1entitlement id
POST /api/v2/entitlements
Requests
POST /api/v2/entitlements
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": "entitlements",
"attributes": {
"id": null,
"account_id": 498,
"event_id": 104,
"person_id": 1651,
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": 19.5,
"used": "0.0",
"deleted_at": null,
"created_at": null,
"updated_at": null,
"creator_id": null,
"updater_id": null,
"note": null,
"approval_workflow_id": null,
"pending": "0.0",
"import_id": null,
"deleted_item_id": null
}
}
}Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "45",
"type": "entitlements",
"attributes": {
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": "19.5",
"used": "0.0",
"pending": "0.0",
"note": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "498"
}
},
"event": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
},
"approval_workflow": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/entitlements
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": "entitlements",
"attributes": {}
}
}Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/event"
}
}
]
}Creates an entitlementPOST/api/v2/entitlements
URI Parameters
- event_id
number(required) Example: 1Event id
- person_id
number(required) Example: 1Person id
- start_date
date(required) Example: 2025-11-04+05%3A02%3A51+%2B0100Entitlement start date
- end_date
date(required) Example: 2026-02-01+05%3A02%3A51+%2B0100Entitlement end date
- allocated
number(required) Example: 10This depends on the limitation type of the event for which the entitlement is made. If the event is limited by days, allocated is the number of allocated days. If the event is limited by hours, allocated is the number of allocated minutes (e.g. 40hrs > 2400mins => allocated = 2400)
PATCH /api/v2/entitlements/1
Requests
PATCH /api/v2/entitlements/46
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": "entitlements",
"attributes": {
"allocated": 15
}
}
}Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "46",
"type": "entitlements",
"attributes": {
"start_date": "2025-11-01",
"end_date": "2025-11-21",
"allocated": "15.0",
"used": "13.0",
"pending": "4.0",
"note": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "500"
}
},
"event": {
"meta": {
"included": false
}
},
"person": {
"meta": {
"included": false
}
},
"approval_workflow": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/entitlements/47
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": "entitlements",
"attributes": {}
}
}Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "must be >= used",
"source": {
"pointer": "data/attributes/allocated"
}
}
]
}Updates an entitlementPATCH/api/v2/entitlements/{id}
URI Parameters
- id
number(required) Example: 1entitlement id
DELETE /api/v2/entitlements/1
Requests
DELETE /api/v2/entitlements/48
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+jsonResponses
This response has no content.
Deletes an entitlementDELETE/api/v2/entitlements/{id}
URI Parameters
- id
number(required) Example: 1entitlement id
Generated by aglio on 01 Nov 2025