Querying for policies and policy periods
Every account typically has one or more policies. Every policy has one of more policy periods. In BillingCenter, each policy period represents a different term for the policy.
Querying for an account's policies
Use the following endpoint to query for all the policies for an account:
- GET
/billing/v1/accounts/{accountId}/policies
For example, the following requests retrieves the policies for account bc:101.
GET /billing/v1/accounts/bc:101/policies
{
"count": 2,
"data": [
{
"attributes": {
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "PA-234553",
"doNotArchive": false,
"id": "bc:701",
"lobCode": {
"code": "PersonalAuto",
"name": "Personal Auto"
}
},
...
},
{
"attributes": {
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "HO-980077",
"doNotArchive": false,
"id": "bc:S97mvBd9ts7YnAh6Dw_kx"
"lobCode": {
"code": "Homeowners",
"name": "Homeowners"
}
},
...
}
...
Use the following endpoint to retrieve a specific policy.
- GET
/billing/v1/accounts/{accountId}/policies/{policyId}
For example, the following requests retrieves policy bc:701
for account
bc:717
.
GET /billing/v1/accounts/bc:717/policies/bc:701
{
"data": {
"attributes": {
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "PA-234553",
"doNotArchive": false,
"id": "bc:701",
"lobCode": {
"code": "PersonalAuto",
"name": "Personal Auto"
}
},
...
Querying for a policy's policy periods
Use the following endpoints to query for a given policy's policy periods:
- GET
/billing/v1/accounts/{accountId}/policies/{policyId}/policy-periods
- GET
/billing/v1/accounts/{accountId}/policies/{policyId}/policy-periods/{policyPeriodId}
For example, the following request retrieves the policy periods for policy
bc:701
. on account bc:717.
GET /billing/v1/accounts/bc:717/policies/bc:701/policy-periods
{
"count": 1,
"data": [
{
"attributes": {
"assignedRisk": false,
"billingMethod": {
"code": "DirectBill",
"name": "Direct Bill"
},
"boundDate": "2023-02-23",
"cancelStatus": {
"code": "open",
"name": "Open"
},
"chargeHeld": false,
"closureStatus": {
"code": "open",
"name": "Open"
},
"confirmationNotificationState": {
"code": "DoNotNotify",
"name": "Do Not Notify"
},
"currency": {
"code": "usd",
"name": "USD"
},
"delinquencyPlan": {
"displayName": "Test Standard Delinquency Plan UOXWHS94",
"id": "bc:S-M11Lrkk9KhVOcId2f88"
},
"effectiveDate": "2023-02-23",
"eligibleForFullPayDiscount": false,
"equityBuffer": 30,
"equityWarningsEnabled": true,
"expirationDate": "2024-02-23",
"fullPayDiscountEvaluated": false,
"heldForInvoiceSending": false,
"holdInvoicingWhenDelinquent": true,
"id": "bc:SfKiqNhrcUNEOzvpPV1UD",
"paymentDistributionEnabled": true,
"paymentPlan": {
"displayName": "Foot-97-Star",
"id": "bc:ScxNukNXFq3F7wvvbgSsf"
},
"pendingRemainingBalanceFix": false,
"policyNumber": "PolicyNumber_LMPPXU98",
"policyNumberLong": "PolicyNumber_LMPPXU98-1",
"retrieved": false,
"returnPremiumPlan": {
"displayName": "Default Return Premium Plan",
"id": "ret_premium_plan:1"
},
"termConfirmed": true,
"termNumber": 1,
"westernMethod": false
},
Additional filter options
Some GET endpoints that return collections have filter options that may not appear in the API definition for one reason or another. This documentation refers to them as additional filter options.
The GET
/billing/v1/accounts/{accountId}/policies/{policyId}/policy-periods
endpoint has the following additional filter options:
archiveSummaryDelinquencyCount
archiveSummaryOtherCharges
archiveSummaryPaid
archiveSummaryPremiumCharges
archiveSummaryWrittenOff