Working with charge patterns
Querying for charge patterns
Use the following endpoints to retrieve information about charge patterns:
- GET
/admin/v1/charge-patterns - GET
/admin/v1/charge-patterns/{chargePatternId}
For example, the following request retrieves information about charge pattern default_data:16.
GET /admin/v1/charge-patterns/default_data:16
{
"data": {
"attributes": {
"category": {
"code": "premium",
"name": "Premium"
},
"chargeCode": "PremiumIncludingTaxes",
"chargeName": "Premium Including Taxes",
"id": "default_data:16",
"includedInEquityDating": true,
"internalCharge": true,
"invoiceTreatment": {
"code": "depositandinstallments",
"name": "Down Payment and Installments"
},
"periodicity": {
"code": "monthly",
"name": "Monthly"
},
"priority": {
"code": "medium",
"name": "Medium"
},
"reversible": false,
"subtype": "ProRataCharge",
"tAccountOwnerType": "PolicyPeriod",
"tAccountsLazyLoaded": true
}
...
}
}
Creating charge patterns
To create a charge pattern, use the following endpoint:
- POST
/admin/v1/charge-patterns
When you create a charge pattern, you must specify all the fields in the following table.
| Name | Datatype | Comments |
|---|---|---|
category |
A value from the ChargeCategory typelist, such
as premium or tax |
|
chargeCode |
A unique code for the charge pattern | |
chargeName |
A user-friendly name for the charge pattern | |
includedInEquityDating |
Boolean | |
invoiceTreatment |
A value from the InvoiceTreatment typelist, such
as depositandinstallments or
onetime |
|
periodicity |
A value from the Periodicity typelist, such as
monthly or weekly |
This field is required only for ProRataCharge
charge patterns. |
subtype |
The charge pattern's subtype, such as
ProRataCharge or
ImmediateCharge |
|
tAccountOwnerType |
The type of entity that owns the T-account that tracks this type of charge. |
The valid values for this field depend on the charge pattern's
subtype. For example, for ProRataCharge charge
patterns, the only valid value
isPolicyPeriod. For a complete
discussion of the valid values, see Application Guide. |
tAccountsLazyLoaded |
Boolean |
For example, the following request creates a new charge pattern.
POST /admin/v1/charge-patterns
{
"data": {
"attributes": {
"category": {
"code": "premium"
},
"chargeCode": "PremiumExcludingTaxes",
"chargeName": "Premium Excluding Taxes",
"includedInEquityDating": true,
"invoiceTreatment": {
"code": "depositandinstallments"
},
"periodicity": {
"code": "monthly"
},
"subtype": "ProRataCharge",
"tAccountOwnerType": "PolicyPeriod",
"tAccountsLazyLoaded": true
}
}
}