Costs and transactions

When a policy is quoted, the associated expenses are broken down into costs and transactions. The costs include the details on the various costs associated with quoting the policy premiums. The transactions are details of changes to the costs. For complete details on costs and transactions, see Application Guide

You can use Cloud API to retrieve collections of costs and transactions. You cannot use these endpoints to modify costs or transactions, only to retrieve them.

Retrieving costs

Use the following endpoints to retrieve costs associated with a job or a policy:

  • GET /job/v1/jobs/{jobId}/costs
  • GET /job/v1/jobs/{jobId}/costs/{costId}
  • GET /policy/v1/policies/{policyId}/costs

For example:

Command

GET /policy/v1/policies/pc:101/costs
Java

Response

{
    "data": [
        {
            "attributes": {
                "amount": {
                    "amount": "84066.00",
                    "currency": "usd"
                },
                "chargePattern": {
                    "code": "Premium",
                    "name": "Premium"
                },
                "coverable": {
                    "displayName": "California",
                    "id": "1"
                },
                "effectiveDate": "2023-11-16T08:01:00.000Z",
                "expirationDate": "2024-11-16T08:01:00.000Z",
                "id": "2",
                "policyLine": {
                    "displayName": "Workers' Comp Line",
                    "id": "WorkersCompLine",
                    "uri": "/policy/v1/policies/pc:101/lines/WorkersCompLine"
                },
                "rateAmountType": {
                    "code": "StdPremium",
                    "name": "Standard premium"
                },
                "termAmount": {
                    "amount": "84066.00",
                    "currency": "usd"
                }
            },
Java

Retrieving transactions

Use the following endpoints to retrieve a transactions on a job:

  • GET /job/v1/jobs/{jobId}/transactions
  • GET /job/v1/jobs/{jobId}/transactions/{transactionId}

For example:

Command

GET /job/v1/jobs/pc:500/transactions
Java

Response

{
    "data": [
        {
            "attributes": {
                "amount": {
                    "amount": "84066.00",
                    "currency": "usd"
                },
                "amountBilling": {
                    "amount": "84066.00",
                    "currency": "usd"
                },
                "charged": false,
                "cost": {
                    "displayName": "Emp liab increased limits",
                    "id": "pc:890"
                },
                "displayName": "Emp liab increased limits",
                "effectiveDate": "2023-11-16",
                "expirationDate": "2024-11-16",
                "id": "107",
                "postedDate": "2023-11-28T19:19:00.976Z",
                "toBeAccrued": false,
                "written": true,
                "writtenDate": "2023-11-28"
            },},
        {
            "attributes": {
                "amount": {
                    "amount": "-24361.00",
                    "currency": "usd"
                },
                "amountBilling": {
                    "amount": "-24361.00",
                    "currency": "usd"
                },
                "charged": false,
                "cost": {
                    "displayName": "Emp liab increased limits",
                    "id": "pc:978"
                },
                "displayName": "Emp liab increased limits",
                "effectiveDate": "2023-11-16",
                "expirationDate": "2024-11-16",
                "id": "106",
                "postedDate": "2023-11-28T19:19:00.976Z",
                "toBeAccrued": false,
                "written": true,
                "writtenDate": "2023-11-28"
            },},
Java