Premium Reporting API

Note

See the Premium Reporting feature topic for details about how to use this API.

Create a premium report

POST /policies/{policyLocator}/premiumReports

Fetch a premium report

GET /premiumReports/{premiumReportLocator}

Fetch all premium reports for a policy

GET /policies/{policyLocator}/premiumReports

Update a draft premium report

PATCH /premiumReports/{premiumReportLocator}

Issue a premium report

PATCH /premiumReports/{premiumReportLocator}/issue

Discard a premium report

PATCH /premiumReports/{premiumReportLocator}/discard
  • Request:

    Name

    Position

    Type

    Required

    premiumReportLocator

    path

    string

    required

  • Response:void

PremiumReportCreateRequest

{
  // Required
  "endTimestamp" : integer
  "fieldGroups" : [FieldGroupCreateRequest]
  "fieldValues" : map<string,[string]>

  // Optional
  "invoiceDueTimestamp" : integer
  "issue" : boolean
}

PremiumReportUpdateRequest

{
  // Optional
  "endTimestamp" : integer
  "fieldGroups" : [FieldGroupCreateRequest]
  "fieldValues" : map<string,[string]>
  "invoiceDueTimestamp" : integer
}

PremiumReportResponse

{
  // Required
  "commissions" : [CommissionResponse]
  "configVersion" : integer
  "createdTimestamp" : integer
  "displayId" : string
  "endTimestamp" : integer
  "fees" : [FeeResponse]
  "fieldErrors" : FieldErrors
  "fieldGroupsByLocator" : map<string,map<string,[string]>>
  "fieldValues" : map<string,[string]>
  "grossCommissions" : number
  "grossFees" : number
  "grossPremium" : number
  "grossTaxes" : number
  "invoiceDueTimestamp" : integer
  "issuedTimestamp" : integer
  "locator" : string
  "policyLocator" : string
  "premiums" : [PremiumReportPremiumResponse]
  "startTimestamp" : integer
  "state" : string draft | discarded | issued | revised | reversed
  "taxGroups" : [TaxGroupResponse]
  "updatedTimestamp" : integer

  // Optional
}

PremiumReportPremiumResponse

{
  // Required
  "category" : string
  "premium" : number
}

PremiumReportingInvoiceResponse

{
  // Required
  "createdTimestamp" : integer
  "displayId" : string
  "dueTimestamp" : integer
  "endTimestamp" : integer
  "locator" : string
  "policyholderLocator" : string
  "policyLocator" : string
  "premiumReportLocator" : string
  "premiumReportName" : string
  "settlementStatus" : string outstanding | settled
  "startTimestamp" : integer
  "totalDue" : number
  "totalDueCurrency" : string
  "updatedTimestamp" : integer

  // Optional
  "settlementType" : string paid | writtenOff | zeroDue | invalidated
}

PremiumReportingDocumentResponse

{
  // Required
  "displayName" : string
  "fileName" : string
  "locator" : string
  "premiumReportLocator" : string
  "type" : string pdf | html
  "url" : string
  "urlExpirationTimestamp" : integer

  // Optional
  "createdTimestamp" : integer
}

PremiumReportingPaymentResponse

{
  // Required
  "amount" : number
  "amountCurrency" : string
  "displayId" : string
  "fieldValues" : map<string,[string]>
  "invoiceLocator" : string
  "locator" : string
  "mediaByLocator" : map<string,Media>
  "policyholderLocator" : string
  "postedTimestamp" : integer
  "tenantLocator" : string
}

PremiumReportingInvoiceStatusAndTimeResponse

{
  // Required
  "status" : string unfulfilled | paid | writtenOff | zeroDue | invalidated
  "timestamp" : integer
}

FieldErrors

{
  // Required
  "errors" : [ValidationFieldError2]
  "fieldGroupErrors" : [FieldGroupErrors]
  "hasErrors" : boolean

  // Optional
  "errorMessage" : string
}

FieldGroupErrors

{
  // Required
  "errors" : [ValidationFieldError2]
  "fieldName" : string

  // Optional
  "index" : integer
  "locator" : string
}

ValidationFieldError2

{
  // Required
  "code" : string MISSING | INVALID_FIELD | INVALID_TYPE | INVALID_VALUE
  "fieldName" : string

  // Optional
  "message" : string
}