HTTP API Resource - Fee Schedule Lines API
The purpose of this API is to create, update and delete fee schedule lines. Refer to the fee Schedule chapter of the Premium and Fee Configuration page in the Configuration Guide for more information on the related model.
Fee Schedule Lines
The collection resource for feeschedulelines can be accessed using get on:
http://[hostName]:[portNumber]/[api-context-root]/generic/feeschedulelines
The section "Discoverability" in Concepts describes how to discover a collection resource from the root URI. |
GET on the above url returns fee schedule lines for each fee schedule.
Example payload:
{ "items":[ { "name": "fee schedule code", "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feeschedulelines/<fee schedule code>", "rel": "canonical" }, { "href": "http://<hostname>:<port>/<contextRoot>/generic/feeschedulelines/<fee schedule code>/definition", "rel": "oi:definition" } .... Other links like create form, edit form etc. ] }, ... ] }
The payloads presented in this section are just examples. Please use the Swagger metadata to find out what all is possible. |
The "oi:definition" represents the definition of the dimensions of the fee schedule. For example, when a fee schedule is based on schedule definition FEE_INSURABLECLASS that has a insurableClass dimension (alphanumeric), then the link of type "oi:definition" returns:
{ "fee_INSURABLECLASS": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "value": { "type": "number", "xml": { "attribute": true }, "minimum": 0, "maximum": 9999999999.9999 } } }, "functionDynamicLogic": { "$ref": "http://<hostname>:<port>/<contextRoot>/generic/feeschedulelines/dynamiclogic/definition#/dynamiclogic" "x-oi-resource-name": "dynamiclogic" }, "insurableClass": { "type": "string", "xml": { "attribute": true }, "maxLength": 1000 } } } }
In general, the definition resource is like this:
{
"type": "object",
"properties": {
"amount": {
"type": "object",
"properties": {
"value": {
"type": "number",
"xml": {
"attribute": true
},
"minimum": 0,
"maximum": 9999999999.99
}
}
},
"functionDynamicLogic": {
"$ref": "http://<hostname>:<port>/<contextRoot>/generic/feeschedulelines/dynamiclogic/definition#/dynamiclogic"
"x-oi-resource-name": "dynamiclogic"
},
"<amountField>": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"xml": {
"attribute": true
}
},
"valueAmount": {
"type": "number",
"xml": {
"attribute": true
},
"minimum": -9999999999.9999,
"maximum": 9999999999.9999
}
}
},
"<charField>": {
"type": "string",
"xml": {
"attribute": true
},
"maxLength": 1000
},
"<charFlexCodeField>": {
"type": "string",
"xml": {
"attribute": true
},
"maxLength": 1000,
"x-oi-dyn-flex-link": "<URL>"
},
"<charRangeField>": {
"type": "object",
"properties": {
"valueFrom": {
"type": "string",
"xml": {
"attribute": true
},
"maxLength": 1000
},
"valueTo": {
"type": "string",
"xml": {
"attribute": true
},
"maxLength": 1000
}
}
},
"<dateField>": {
"type": "string",
"format": "date",
"xml": {
"attribute": true
}
},
"<numberField>": {
"type": "number",
"xml": {
"attribute": true
}
}
}
}
The collection resource for feeschedulelines for a fee schedule can be accessed using GET on:
http://[hostName]:[portNumber]/[api-context-root]/generic/feeschedulelines/<fee schedule code>
Get on the above url returns links to maintain fee schedule lines (of the fee schedule) for each default time period.
Example payload:
{ "items":[ { "startDate": "<startDate of default time period 1>", "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feeschedulelines/[fee schedule code]/defaulttimeperiod/[defaultTimePeriodStartDate 1]", "rel": "canonical" }] }, { "startDate": "<startDate of default time period 2>", "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feescheduleslines/<fee schedule code>/defaulttimeperiod/[defaultTimePeriodStartDate 2]", "rel": "canonical" }] } ] }
The resource representation has links for each defined default time period. These links can be followed to retrieve, create, update or delete lines for that time period and fee schedule. For more details, see sections below.
Accessing Fee Schedule Lines through Fee Schedule API
Existing fee schedules can be retrieved using the Query API against the collection resource, using the POST operation.
Example URL:
POST http://[hostName]:[portNumber]/[api-context-root]/generic/feeschedules/search { "resource": { "q": "code.eq('<some code>')" } }
The system returns a resource representation of the fee schedule like this:
{ "id": , "code": "<code>", "amountInterpretation": "<amountInterpretation C or Y>", ... more attributes ... "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feeschedules/", "rel": "self" } ], "feeScheduleLineList": [ { "startDate": "<startDate of default time period 1>", "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feescheduleslines/<fee schedule code>/defaulttimeperiod/<defaultTimePeriodStartDate 1>", "rel": "canonical" }] }, { "startDate": "<startDate of default time period 2>", "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feescheduleslines/<fee schedule code>/defaulttimeperiod/<defaultTimePeriodStartDate 2>", "rel": "canonical" }] } ] }
The resource representation has a property "feeScheduleLineList" with links for each defined default time period. These links can be followed to retrieve, create, update or delete lines for that time period and fee schedule. For more details, see sections below.
Retrieve Fee Schedule Lines
Existing lines can be retrieved using the GET operation against the URL found within the context of the fee schedule and the applicable default time period.
{ "items": [{ "amount": { "value": 10, "currency":"USD" }, "insurableClass": "family" .... Other attributes .... "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feescheduleslines/<fee schedule code>/defaulttimeperiod/<defaultTimePeriodStartDate 1>",, "rel": "self" } ] } { "amount": { "value": 5", "currency: "USD" }, "insurableClass": "Employees" .... Other attributes .... "links": [ { "href": "http://<hostname>:<port>/<contextRoot>/generic/feescheduleslines/<fee schedule code>/defaulttimeperiod/<defaultTimePeriodStartDate 2>", "rel": "self" } ] } ] }
Add, Update, and Delete Fee Schedule Lines
Use a GET operation to retrieve the URL of the fee schedule lines of a fee schedule within the default time period.
Use the startDate
matching the default time period.
-
POST operation adds a fee schedule line to the fee schedule within the default time period.
-
Collection PATCH adds, updates, or deletes multiple fee schedule lines that belong to a fee schedule within the default time period.
-
PUT and PATCH operations update a fee schedule line.
-
DELETE operation deletes a fee schedule line.
This is the message format for POST,PUT, or PATCH:
{ "amount": { "value": "", "currency":"" }, "functionDynamicLogic": { "code": "" }, "<field name of schedule dimension with type value and datatype other than amount>": "", "<field name of schedule dimension with type value and datatype amount>": { "valueAmount" : { "value": "", "currency": "" } }, "<field name of schedule dimension with type range and datatype other than amount>": { "valueFrom": "", "valueTo": "" }, "<field name of schedule dimension with type range and datatype amount>": { "valueFromAmount": { "value": "", "currency": "" }, "valueToAmount": { "value": "", "currency": "" } }
Create a Fee Schedule Line
Adds a fee schedule line to a fee schedule.
- URL
-
http://[hostName]:[portNumber]/[api-context-root]/generic/feeschedulelines/[fee schedule code]/defaulttimeperiod/[period]
where [hostName] is the hostname of the device accessing the API.
[portNumber] is the port number.
[api-context-root] is the top level.
[fee schedule code] is the Code of the fee schedule.
[period] is the default time period.
Example payload for creating a fee schedule line using an Amount having dimension productLine:
{ "amount”: { "currency": "USD", "value": 50 }, "productLine" : "individual" }
Example payload for creating a fee schedule line using a Dynamic Logic function:
{ "functionDynamicLogic": { "code": "additional_card_fees" }, "productLine" : "individual" }
Collection PATCH Payload
Example payload for inserting two fee schedule lines:
{ "items": [{ "op": "add" "amount": { "value": 10 "currency":"USD" }, "insurableClass": "family" } { "op": "add" "amount": { "value": 5" "currency: "USD" }, "insurableClass": "employees" } ] }
See HTTP API PATCH for more details about "op".
Collection PATCH uses the technical id of the adjustment rule to match the payload with existing data.
For details on how values in the request messages are handled, Property Representation and Handling (PUT, POST, PATCH). |
This API uses HTTP status codes as defined in Response Messages. |