Policies

Overview

The /api/Policies collection support day-two transactions on policies (ie, everything that happens after a policy is initially created). This includes managing proposal workflow states, creating endorsements for cancellations and reinstatements, adjusting billing, and recording payments.

All endpoints use POST, including the two lookup endpoints that are semantically read-only.

Example Use Cases

Proposal Workflow

These endpoints transition a proposal through its lifecycle states. Each accepts a proposalID in the route and optional comments as a query parameter.

EndpointRoutePurpose
AcceptPOST {proposalID}/AcceptMark a proposal as accepted
UndoAcceptPOST {proposalID}/UndoAcceptReverse an acceptance
RejectPOST {proposalID}/RejectMark a proposal as rejected
UndoRejectPOST {proposalID}/UndoRejectReverse a rejection
UndoBindingPOST {proposalID}/UndoBindingReverse a binding
                  ┌──────────┐
                  │ Proposed │
                  └────┬─────┘
                       │
            ┌──────────┼──────────┐
            ▼                     ▼
      ┌──────────┐          ┌──────────┐
      │ Accepted │          │ Rejected │
      └────┬─────┘          └────┬─────┘
           │                     │
      UndoAccept            UndoReject
           │                     │
           ▼                     ▼
      ┌──────────┐          ┌──────────┐
      │ Proposed*│          │ Proposed*│
      └────┬─────┘          └──────────┘
           │
           ▼
      ┌──────────┐
      │  Bound   │
      └────┬─────┘
           │
      UndoBinding
           │
           ▼
      ┌──────────┐
      │ Proposed*│
      └──────────┘
      

* When "SetProposalStatustoPreAcceptOrRejectAfterUndo" is enabled, undo operations restore the proposal to its status before the accept or reject, rather than always reverting to "Proposed."


Policy Lifecycle

These endpoints create endorsement proposals that modify an existing policy. Each accepts a policyID in the route.

EndpointRoutePurpose
EndorsePOST {policyID}/EndorseCreate a general endorsement
CancelPOST {policyID}/CancelCreate a cancellation endorsement
ReinstatePOST {policyID}/ReinstateCreate a reinstatement endorsement

Cancel and Reinstate both accept a JSON request body with PolicyTransaction fields (reason codes, descriptions, custom fields, etc.). See the individual endpoint docs for the full list of supported fields.


Billing

EndpointRoutePurpose
ChangeBillingFrequencyPOST {policyID}/ChangeBillingFrequencyChange how often invoices are generated
MakePaymentPOST {policyID}/MakePaymentRecord a payment and allocate it against outstanding invoices

Lookup

These endpoints return reference data used by other Policies endpoints. Both use POST but are semantically read-only — they do not modify any data.

EndpointRoutePurpose
CancellationReasonCodesPOST Codes/CancellationReasonCodesList valid cancellation reason codes for a policy
ReinstatementReasonCodesPOST Codes/ReinstatementReasonCodesList valid reinstatement reason codes