Filtering transaction examples
{
"data": {
"attributes": {
"claimLevel": true,
"exposure": {
"id": "<exposureId>"
},
"costType": {
"code": "<costTypeCode>"
},
"costCategory": {
"code": "<costCategoryCode>"
},
"reservingCurrency": {
"code" : "<currencyCode>"
},
"recoveryCategory": {
"code" : "<recoveryCategoryCode>"
}
}
}
}Example: Only claim-level transactions
The claimLevel property can be used to filter out all exposure-level
transactions. By default, the claimLevel property is
false. The body needs to include claimLevel
only when setting it to true. Also, you cannot set
claimLevel to true if you include the exposure
property.
When you explicitly set the claimLevel property, it is
included in the response.
Claim cc:202 transactions
| Exposure | CostType | CostCategory | Currency | Amount |
| (claim level) | ClaimCost | Other | USD | $400 |
| cc:1 | ClaimCost | Auto body | USD | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | USD | $500 |
| cc:22 | ClaimCost | Medical payments | USD | $250 |
Command
POST /claim/v1/claims/cc:202/financial-calculations/AvailableReserves/get-amount
{
"data": {
"attributes": {
"claimLevel": true
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "400.00",
"currency": "usd"
},
"claimLevel": true,
"name": "AvailableReserves",
"reportingAmount": {
"amount": "400.00",
"currency": "usd"
}
},
...Example: Only one exposure
The
exposure property can be used to filter out all transactions
except for those related to the specified exposure. The property must be set to the
ID of an exposure on the claim.
exposure property, information about the exposure is included in
the response. If the body includes the exposure property, it cannot set
claimLevel to true.Claim cc:202 transactions
| Exposure | CostType | CostCategory | Currency | Amount |
| (claim level) | ClaimCost | Other | USD | $400 |
| cc:1 | ClaimCost | Auto body | USD | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | USD | $500 |
| cc:22 | ClaimCost | Medical payments | USD | $250 |
Command
POST /claim/v1/claims/cc:202/financial-calculations/AvailableReserves/get-amount
{
"data": {
"attributes": {
"exposure": {
"id": "cc:1"
}
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "3000.00",
"currency": "usd"
},
"exposure": {
"displayName": "(1) 1st Party Vehicle - Ray Newton",
"id": "cc:1",
"type": "Exposure",
"uri": "/claim/v1/claims/cc:202/exposures/cc:1"
},
"name": "AvailableReserves",
"reportingAmount": {
"amount": "3000.00",
"currency": "usd"
}
},Example: Only one CostType
You can use the costType property to filter transactions
based on cost type. costType must be set to a valid typecode from
the CostType typelist.
When you explicitly set the costType property, it is
included in the response.
Claim cc:202 transactions
| Exposure | CostType | CostCategory | Currency | Amount |
| (claim level) | ClaimCost | Other | USD | $400 |
| cc:1 | ClaimCost | Auto body | USD | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | USD | $500 |
| cc:22 | ClaimCost | Medical payments | USD | $250 |
Command
POST /claim/v1/claims/cc:202/financial-calculations/AvailableReserves/get-amount
{
"data": {
"attributes": {
"costType": {
"code": "ClaimCost"
}
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "3150.00",
"currency": "usd"
},
"costType": {
"code": "claimcost",
"name": "Claim Cost"
},
"name": "AvailableReserves",
"reportingAmount": {
"amount": "3150.00",
"currency": "usd"
}
},Example: Only one CostCategory
You can use the costCategory property to filter transactions based
on cost category. costCategory must be set to a valid typecode from
the CostCategory typelist.
When you explicitly set the costCategory property, it is
included in the response.
Claim cc:202 transactions
| Exposure | CostType | CostCategory | Currency | Amount |
| (claim level) | ClaimCost | Other | USD | $400 |
| cc:1 | ClaimCost | Auto body | USD | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | USD | $500 |
| cc:22 | ClaimCost | Medical payments | USD | $250 |
Command
POST /claim/v1/claims/cc:202/financial-calculations/AvailableReserves/get-amount
{
"data": {
"attributes": {
"costCategory": {
"code": "body"
}
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "2500.00",
"currency": "usd"
},
"costCategory": {
"code": "body",
"name": "Auto body"
},
"name": "AvailableReserves",
"reportingAmount": {
"amount": "2500.00",
"currency": "usd"
}
},Example: Only one currency
You can use the reservingCurrency property to filter transactions
based on reserving currency. reservingCurrency must be set to a
valid typecode from the Currency typelist.
When you explicitly set the reservingCurrency property, it
is included in the response.
Claim cc:303 transactions
| Exposure | CostType | CostCategory | Currency | Amount |
| (claim level) | ClaimCost | Other | USD | $400 |
| cc:1 | ClaimCost | Auto body | EUR | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | EUR | $500 |
| cc:22 | ClaimCost | Medical payments | USD | $250 |
Command
POST /claim/v1/claims/cc:303/financial-calculations/AvailableReserves/get-amount
{
"data": {
"attributes": {
"reservingCurrency": {
"code": "USD"
}
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "650.00",
"currency": "usd"
},
"name": "AvailableReserves",
"reportingAmount": {
"amount": "650.00",
"currency": "usd"
},
"reservingAmount": {
"amount": "650.00",
"currency": "usd"
},
"reservingCurrency": {
"code": "usd",
"name": "USD"
}
},Example: Only one Recovery Category
You can use the recoveryCategory property to filter transactions
based on recovery category. recoveryCategory must be set to a valid
typecode from the RecoveryCategory typelist.
When you explicitly set the recoveryCategory property, it
is included in the response.
Claim cc:303 transactions
| Exposure | CostType | CostCategory | Recovery Category | Currency | Amount |
| cc:1 | ClaimCost | Auto body | n/a | USD | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | n/a | USD | $500 |
| cc:1 | ClaimCost | Auto body | Salvage | USD | $1200 |
Command
Note that unlike the other examples, which used the
AvailableReserves expression, this example is using the
OpenRecoveryReserves expression.
POST /claim/v1/claims/cc:303/financial-calculations/OpenRecoveryReserves/get-amount
{
"data": {
"attributes": {
"recoveryCategory": {
"code" : "salvage"
}
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "1200.00",
"currency": "usd"
},
"name": "OpenRecoveryReserves",
"recoveryCategory": {
"code": "salvage",
"name": "Salvage"
},
"reportingAmount": {
"amount": "1200.00",
"currency": "usd"
}
},Example: Multiple filter criteria
A single request can include multiple filter criteria. For example, the following
request gets the available reserves for exposure cc:1 where
CostType is claimcost.
Claim cc:202 transactions
| Exposure | CostType | CostCategory | Currency | Amount |
| (claim level) | ClaimCost | Other | USD | $400 |
| cc:1 | ClaimCost | Auto body | USD | $2500 |
| cc:1 | Expense - A&O | Vehicle inspection | USD | $500 |
| cc:22 | ClaimCost | Medical payments | USD | $250 |
Command
POST /claim/v1/claims/cc:202/financial-calculations/AvailableReserves/get-amount
{
"data": {
"attributes": {
"exposure": {
"id": "cc:1"
},
"costType": {
"code": "claimcost"
}
}
}
}{
"data": {
"attributes": {
"claimAmount": {
"amount": "2500.00",
"currency": "usd"
},
"costType": {
"code": "claimcost",
"name": "Claim Cost"
},
"exposure": {
"displayName": "(1) 1st Party Vehicle - Ray Newton",
"id": "cc:1",
"type": "Exposure",
"uri": "/claim/v1/claims/cc:202/exposures/cc:1"
},
"name": "AvailableReserves",
"reportingAmount": {
"amount": "2500.00",
"currency": "usd"
}
},