Creating a recovery
When creating recoveries from Cloud API, there is no POST endpoint whose root resource is a recovery. Recoveries are created in the context of a recovery set.
When you create a recovery set, you must specify the recoveriesToWrite.
At a minimum, it must consist of the following items:
- The
reserveLinethat specifies where the money is coming from. To identify this, you must specify:costCategory(a value from theCostCategorytypelist)costType(a value from theCostTypetypelist)- The recovery category (a value from the
RecoveryCategorytypelist) - The id of the parent exposure
- The
reservingCurrency
- An array of one or more transaction
lineItems, each of which must specify:- The
transactionAmount, including the amount and currency - Currency (a value from the
currencytypelist)
- The
If you want your recovery to reference a recovery reserve, and have its transaction amount go toward the total of the expected recovery reserve, you must duplicate the following information from the recovery reserve:
costCategory(a value from theCostCategorytypelist)costType(a value from theCostTypetypelist)- The recovery category (a value from the
RecoveryCategorytypelist) - The id of the parent exposure
- The
reservingCurrency
The currency in the lineItem object must also be the same.
Example of creating a recovery
The following payload is an example of creating a recovery that references the previous example recovery reserve:
- The
reserveLineoffsets money coming from a single exposure:- The exposure’s ID is cc:SB1
- The cost type is
claimcost. - The cost category is Auto Body (
body).
- The recovery category is salvage.
- The reserving currency is USD.
- The
transactionAmountis for 3000.00.
- The
POST /claim/v1/claims/
{
"data": {
"attributes": {
"recoveriesToWrite": [
{
"reserveLine": {
"costCategory": {
"code": "body"
},
"costType": {
"code": "claimCost"
},
"exposure": {
"id": " cc:SB1"
},
"recoveryCategory": {
"code": "salvage"
},
"reservingCurrency": {
"code": "usd"
}
},
"lineItems": [
{
"transactionAmount": {
"amount": "3000.00",
"currency": "usd"
}
}
],
"currency": {
"code": "usd"
}
}
]
}
}
}