# Installments API



<EndpointIndex
  names={[
  	'fetchInstallmentsForQuote',
  	'fetchInstallmentsForPolicy',
  	'fetchInstallmentsForPolicyTransaction',
  	'previewInstallmentsForStatelessQuote',
  	'updateInstallments',
  ]}
  titles={{
  	fetchInstallmentsForQuote: 'Fetch Installments for a Quote',
  	fetchInstallmentsForPolicy: 'Fetch Installments for a Policy',
  	fetchInstallmentsForPolicyTransaction:
  		'Fetch Installments for a Policy Transaction',
  	previewInstallmentsForStatelessQuote:
  		'Preview Installments for a Stateless Quote',
  }}
/>

Fetch Installments for a Quote [#fetch-installments-for-a-quote]

<ApiEndpoint name="fetchInstallmentsForQuote" title="Fetch Installments for a Quote" />

Fetch Installments for a Policy [#fetch-installments-for-a-policy]

<ApiEndpoint name="fetchInstallmentsForPolicy" title="Fetch Installments for a Policy" />

Fetch Installments for a Policy Transaction [#fetch-installments-for-a-policy-transaction]

<ApiEndpoint name="fetchInstallmentsForPolicyTransaction" title="Fetch Installments for a Policy Transaction" />

<ApiSchema name="InstallmentListResponse" />

<ApiSchema name="Installment" />

<ApiSchema name="InstallmentItem" />

Preview Installments for a Stateless Quote [#preview-installments-for-a-stateless-quote]

<ApiEndpoint name="previewInstallmentsForStatelessQuote" title="Preview Installments for a Stateless Quote" />

<ApiSchema name="QuoteBillingPreviewRequest" />

<ApiSchema name="PreviewChargeRequest" />

<ApiSchema name="InstallmentsPreview" />

<ApiSchema name="ChargeQueueItem" />

<ApiSchema name="ChargeMetadata" />

<ApiSchema name="Settings" />

Update Installments [#update-installments]

<ApiEndpoint name="updateInstallments" />

<ApiSchema name="PatchInstallmentsRequest" />


## API Reference

GET /billing/{tenantLocator}/installments/quotes/{quoteLocator}/list — fetchInstallmentsForQuote
Tags: installments-controller
Permissions: read, list
Parameters:
  tenantLocator (uuid, path, required)
  quoteLocator (ulid, path, required)
  offset (integer, query)
  count (integer, query)
  extended (boolean, query)
Responses:
  200 InstallmentListResponse — OK

GET /billing/{tenantLocator}/installments/policies/{policyLocator}/list — fetchInstallmentsForPolicy
Tags: installments-controller
Permissions: read, list
Parameters:
  tenantLocator (uuid, path, required)
  policyLocator (ulid, path, required)
  offset (integer, query)
  count (integer, query)
  extended (boolean, query)
Responses:
  200 InstallmentListResponse — OK

GET /billing/{tenantLocator}/installments/transactions/{transactionLocator}/list — fetchInstallmentsForPolicyTransaction
Tags: installments-controller
Permissions: read, list
Parameters:
  tenantLocator (uuid, path, required)
  transactionLocator (ulid, path, required)
  offset (integer, query)
  count (integer, query)
  extended (boolean, query)
Responses:
  200 InstallmentListResponse — OK

GET /billing/{tenantLocator}/installments/quotes/statelessPreview — previewInstallmentsForStatelessQuote
Tags: installments-controller
Permissions: read
Parameters:
  tenantLocator (uuid, path, required)
  quotePreviewRequest (QuoteBillingPreviewRequest, query, required)
Responses:
  200 InstallmentsPreview — OK

PATCH /billing/{tenantLocator}/installments — updateInstallments
Tags: installments-controller
Permissions: write
Parameters:
  tenantLocator (uuid, path, required)
Request body (PatchInstallmentsRequest):
Responses:
  200 Installment[] — OK

InstallmentListResponse
Properties:
  listCompleted (boolean, required)
  items (Installment[], required)

Installment
Properties:
  locator (ulid, required)
  installmentLatticeLocator (ulid, required)
  accountLocator (ulid, required)
  currency (string, required)
  timezone (string, required)
  installmentFrameIndex (integer, required)
  quoteLocator (ulid)
  policyLocator (ulid)
  transactionLocator (ulid)
  installmentStartTime (datetime, required)
  installmentEndTime (datetime, required)
  coverageStartTime (datetime, required)
  coverageEndTime (datetime, required)
  installmentDuration (number, required)
  coverageDuration (number, required)
  generateTime (datetime, required)
  dueTime (datetime, required)
  invoiceLocator (ulid)
  createdAt (datetime, required)
  createdBy (uuid, required)
  updatedAt (datetime, required)
  updatedBy (uuid, required)
  installmentItems (InstallmentItem[], required)
  reversalOfInstallmentLocator (ulid)
  termLocator (ulid)
  migratedFromInstallmentLocator (ulid)
  autopayTime (datetime)
  enhancedByPlugin (boolean)

InstallmentItem
Properties:
  locator (ulid, required)
  installmentLocator (ulid, required)
  chargeLocator (ulid, required)
  elementLocator (ulid, required)
  elementStaticLocator (ulid, required)
  chargeType (string, required)
  chargeCategory (string, required)
  amount (number, required)
  invoiceItemLocator (ulid)
  createdAt (datetime, required)
  createdBy (uuid, required)
  reversalOfInstallmentItemLocator (ulid)

QuoteBillingPreviewRequest
Properties:
  accountLocator (ulid, required)
  productName (string, required)
  termStartTime (datetime, required)
  termEndTime (datetime, required)
  timezone (string)
  durationBasis (Enum years | months | weeks | days | hours)
  currency (string)
  invoiceFeeAmount (number)
  installmentPreferences (InstallmentPreferences)
  charges (PreviewChargeRequest[], required)

PreviewChargeRequest
Properties:
  amount (number, required)
  chargeType (string, required)
  elementLocator (ulid)
  elementStaticLocator (ulid)

InstallmentsPreview
Properties:
  installments (Installment[], required)
  accountLocator (ulid, required)
  quoteLocator (ulid)
  policyLocator (ulid)
  transactionLocator (ulid)
  queuedPolicyCharges (ChargeQueueItem[], required)
  durationBasis (Enum years | months | weeks | days | hours, required)
  settings (Settings, required)
  persistedInstallmentLocators (ulid[], required)

ChargeQueueItem
Properties:
  chargeLocator (ulid, required)
  accountLocator (ulid, required)
  invoiceItemLocator (ulid)
  chargeSource (Enum billing | policy, required)
  currency (string, required)
  amount (number, required)
  chargeType (string, required)
  chargeMetadata (ChargeMetadata, required)

ChargeMetadata
Properties:
  policyLocator (ulid)
  transactionLocator (ulid)
  elementStaticLocator (ulid)
  timezone (string)
  invoicing (Enum scheduled | next | immediate)

Settings
Properties:
  locator (ulid, required)
  installmentSettings (InstallmentSettings, required)
  createdAt (datetime, required)
  createdBy (uuid, required)

PatchInstallmentsRequest
Properties:
  installmentLocators (ulid[], required)
  generateTime (datetime)
  dueTime (datetime)
  autopayTime (datetime)