Group Account Product Adjustment Rules Operation

The purpose of this operation is to retrieve, create, update and delete group account product adjustment values (override). Note that this API does not support creations, updates or deletes of adjustment rules. To load adjustment rules please refer to the Adjustment and Surcharge Rules API chapter of the Premium Configuration implementation guide for more information on the related model.

Requests

Fetch group account product adjustment rules

The GET method can be use to fetch group account product adjustment (override) values for a group account product adjustment and group account product time period. This request will return all the adjustment rules (lines) corresponding to a default time period applicable for the group account time period context along with its overrides, if there are any. System returns adjustment rules only for the group account time periods that are applicable within the context of the group account product adjustment. All the time periods overlapping between start date and end date of group account adjustments are considered.

Note::This IP uses HTTP status codes as defined in Response Messages

The link to the following resource to fetch group account product adjustment rules will be available on every group account product adjustment.

"groupaccountproductadjustment": {
  "type": "object",
  "required": [
    "scheduleDefinition",
    "sequence",
    "startDate"
  ],
  "properties": {
   .....

    "groupAccountProductAdjustmentRuleList":[
      {
        "startDate": "<startDate of group account time period 1>",
        "links": [
          {
            http://<hostname>:<port>/<contextRoot>/groupaccountproductadjustmentrules/groupaccountproductadjustment/{group account product adjustment id}/groupaccounttimeperiod/{timeperiod_id 1}",
            "rel": "canonical",
            "httpMethod": "GET"
          },
          {
            http://<hostname>:<port>/<contextRoot>/groupaccountproductadjustmentrules/groupaccountproductadjustment/{group account product adjustment id}/groupaccounttimeperiod/{timeperiod_id 1}",
            "rel": "oi:rulepatch",
            "httpMethod": "PATCH"
          },
          {
            "rel": "oi:definition",/
            "http://<hostname>:<port>/<contextRoot>/groupaccountproductadjustmentrules/groupaccountproductadjustment/{group account product adjustment id}/groupaccounttimeperiod/{timeperiod_id 1}/definition"
          }]
      },
      {
        "startDate": "<startDate of group account product time period 2>",
        "links": [
          {
            "http://<hostname>:<port>/<contextRoot>/groupaccountproductadjustmentrules/groupaccountproductadjustment/{group account product adjustment id}/groupaccounttimeperiod/{timeperiod_id 2}",
            "rel": "canonical",
            "httpMethod": "GET"
          },
          {
            "http://<hostname>:<port>/<contextRoot>/groupaccountproductadjustmentrules/groupaccountproductadjustment/{group account product adjustment id}/groupaccounttimeperiod/{timeperiod_id 2}",
            "rel": "oi:rulepatch",
            "httpMethod": "PATCH"
          },
          {
            "rel": "oi:definition",/
            "http://<hostname>:<port>/<contextRoot>/groupaccountproductadjustmentrules/groupaccountproductadjustment/{group account product adjustment id}/groupaccounttimeperiod/{timeperiod_id 2}/definition"
          }]
      }
    ]
  }
}

Example response:

  "groupAccountProductAdjustmentRuleList":
     [{
      "lineId":"",
      "amount": {
        "value": ""
      },
      "percentage": "",
      "functionDynamicLogic": {
        "id": "",
        "code" : ""
      },
      "functionDynamicLogicNotProrated": {
        "id": "",
        "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": ""
        }
      },
      "overrideAmount" :{
         "value": "",
         "currency": ""
      },
      "overridePercentage" : "",
      "overrideFunctionDynamicLogic": {
        "id": "",
        "code" : ""
      },
      "overrideFunctionDynamicLogicNotProrated": {
        "id": "",
        "code" : ""
      }
    },
    {
      ... other line(s)
    }
  ]
}
Note

The payloads presented in this section are just examples. Please use the Swagger metadata to find out what all is possible.

Definition

The definition of the IP, is available as a link in the group account product adjustment resource.

All the attributes in the definition related to the adjustment schedule line are marked as readOnly, only the metadata of the override fields are updatable.

When the POST is successful, the system returns a resource representation of the created adjustment schedule like this:

{
  "MED_COND": {
    "type": "object",
    "properties": {
      "amount": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "xml": {
              "attribute": true
            },
            "minimum": -9999999999.9999,
            "maximum": 9999999999.9999,
            "readOnly": true
          }
        }
      },
      "functionDynamicLogic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "xml": {
              "attribute": true
            },
            "minimum": -99999999999999,
            "maximum": 99999999999999
          },
          "code" : {
            "type": "string",
            "xml": {
               "attribute": true
             },
             "maxLength": 30,
          }
        },
        "readOnly": true,
      },
      "functionDynamicLogicNotProrated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "xml": {
              "attribute": true
            },
            "minimum": -99999999999999,
            "maximum": 99999999999999
          },
          "code" : {
            "type": "string",
            "xml": {
               "attribute": true
             },
             "maxLength": 30,
          }
        },
        "readOnly": true,
      },
      "percentage": {
        "type": "number",
        "xml": {
          "attribute": true
        },
        "minimum": -999.9999,
        "maximum": 999.9999,
        "readOnly": true
      },
      "medicalCondition": {
        "type": "string",
        "xml": {
          "attribute": true
        },
        "maxLength": 1000,
        "readOnly": true
      },
      "overrideAmount" :{
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "xml": {
              "attribute": true
            },
            "minimum": -9999999999.9999,
            "maximum": 9999999999.9999
          },
          "currency" :{
             "type": "string",
             "xml": {
               "attribute": true
             }
          },
        },
        "overridePercentage": {
           "type": "number",
           "xml": {
             "attribute": true
           },
           "minimum": -999.9999,
           "maximum": 999.9999
          },
         "overrideFunctionDynamicLogic": {
            "type": "object",
            "properties": {
               "id": {
                 "type": "number",
                 "xml": {
                   "attribute": true
                 },
                 "minimum": -99999999999999,
                 "maximum": 99999999999999
                },
                "code" : {
                  "type": "string",
                  "xml": {
                    "attribute": true
                  },
                  "maxLength": 30,
                }
             }
         },
         "overrideFunctionDynamicLogicNotProrated": {
            "type": "object",
            "properties": {
               "id": {
                 "type": "number",
                 "xml": {
                   "attribute": true
                 },
                 "minimum": -99999999999999,
                 "maximum": 99999999999999
                },
                "code" : {
                  "type": "string",
                  "xml": {
                    "attribute": true
                  },
                  "maxLength": 30,
                }
             }
         }
    }
  }
}

Create/Update/Delete group account product adjustment values

Group account product adjustment values (override) can be created/updated or deleted using the same url with PATCH method.

In order to give override value(s) to an adjustment rule, send the payload with operation "replace" and id of the adjustment rule id for which the override is required. The processing of such a request, will look up adjustment rule with the lineId, if it is not found, GEN-HTTP-002 will be returned as lookup failed.

If the adjustment schedule rule is fetched, then following can happen:

  • If there is no existing override for the combination of line and group account time period, a new one is created.

  • If there is an existing override, it is updated ** If after update, all the three override fields don’t have value, then the override row is deleted.

{
  "groupAccountProductAdjustmentRuleList":
     [{
      "op": "replace"
      "lineId" : 123,
      "overrideAmount" :{
         "value": "123",
         "currency": "USD"
      }
    },
    {
      ... other line(s) if they need to be changed.
    }
  ]
}

Authorization

This operation is protected by access restriction "groupaccountproductadjustmentrules IP".