API Documentation

API Endpoint

Entitlements

Entitlements

GET /api/v2/entitlements
Requestsreturns entitlements

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+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "41",
      "type": "entitlements",
      "attributes": {
        "start_date": "2025-08-02",
        "end_date": "2025-08-22",
        "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-08-02",
        "end_date": "2025-08-22",
        "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-08-02",
        "end_date": "2025-08-22",
        "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 entitlements
GET/api/v2/entitlements


GET /api/v2/entitlements/1
Requestsreturns entitlement

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+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "44",
    "type": "entitlements",
    "attributes": {
      "start_date": "2025-08-02",
      "end_date": "2025-08-22",
      "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 entitlement
GET/api/v2/entitlements/{id}

URI Parameters
HideShow
id
number (required) Example: 1

entitlement id


POST /api/v2/entitlements
Requestscreates the entitlementreturns error

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+json
Body
{
  "data": {
    "type": "entitlements",
    "attributes": {
      "id": null,
      "account_id": 498,
      "event_id": 108,
      "person_id": 1730,
      "start_date": "2025-08-02",
      "end_date": "2025-08-22",
      "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
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "45",
    "type": "entitlements",
    "attributes": {
      "start_date": "2025-08-02",
      "end_date": "2025-08-22",
      "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+json
Body
{
  "data": {
    "type": "entitlements",
    "attributes": {}
  }
}
Responses422
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/event"
      }
    }
  ]
}

Creates an entitlement
POST/api/v2/entitlements

URI Parameters
HideShow
event_id
number (required) Example: 1

Event id

person_id
number (required) Example: 1

Person id

start_date
date (required) Example: Aug++5%2C+2025+at++2%3A04+am

Entitlement start date

end_date
date (required) Example: Nov++2%2C+2025+at++2%3A04+am

Entitlement end date

allocated
number (required) Example: 10

This 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
Requestsupdates entitlementreturns error

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+json
Body
{
  "data": {
    "type": "entitlements",
    "attributes": {
      "allocated": 15
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "46",
    "type": "entitlements",
    "attributes": {
      "start_date": "2025-08-02",
      "end_date": "2025-08-22",
      "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+json
Body
{
  "data": {
    "type": "entitlements",
    "attributes": {}
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "must be >= used",
      "source": {
        "pointer": "data/attributes/allocated"
      }
    }
  ]
}

Updates an entitlement
PATCH/api/v2/entitlements/{id}

URI Parameters
HideShow
id
number (required) Example: 1

entitlement id


DELETE /api/v2/entitlements/1
Requestsdeletes entitlement

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

Deletes an entitlement
DELETE/api/v2/entitlements/{id}

URI Parameters
HideShow
id
number (required) Example: 1

entitlement id


Generated by aglio on 02 Aug 2025