Socotra
API ReferenceBilling API

Flat Charges API

ActionEndpoint
Add ChargesPOST/billing/{tenantLocator}/accounts/{accountLocator}/charges
Reverse ChargesPOST/billing/{tenantLocator}/accounts/{accountLocator}/charges/reverse
Add or update invoice fee on a quotePATCH/policy/{tenantLocator}/quotes/{locator}/invoiceFeeAmount
Add or update invoice fee on a policyPATCH/policy/{tenantLocator}/policies/{locator}/invoiceFeeAmount
Fetch Charges by AccountGET/billing/{tenantLocator}/accounts/{accountLocator}/charges/list
Fetch Charges by PolicyGET/billing/{tenantLocator}/policies/{policyLocator}/charges/list
Fetch Charges by TransactionGET/billing/{tenantLocator}/transactions/{transactionLocator}/charges/list

Create and Reverse

Add Charges

Add ChargesaddCharges
POST/billing/{tenantLocator}/accounts/{accountLocator}/charges

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
accountLocatorpathulidYes
Response:ChargeResponse[]
Security Group:charges
Permission:
write
ChargesCreateRequest

Required properties

PropertyTypeDescription
chargesChargeCreateRequest[]

Optional properties

PropertyTypeDescription
policyLocatorulid?
currencystring?
invoicingEnum? scheduled | next | immediate
ChargeCreateRequest

Required properties

PropertyTypeDescription
amountnumber
chargeTypestring

Optional properties

PropertyTypeDescription
transactionLocatorulid?
elementLocatorulid?
elementStaticLocatorulid?
tagstring?

Since charges are created with reference to an account, any policyLocator or transactionLocator in the charge creation request must belong to the account. If transactionLocator and elementLocator are provided, the elementLocator must belong to the transaction specified by transactionLocator.

If the charge creation request references a specific policyLocator, the resulting invoice item or items will assume the policy's timezone. Otherwise, the timezone will be set to the tenant's defaultTimezone.

ChargeResponse

Required properties

PropertyTypeDescription
locatorulid
accountLocatorulid
currencystring
amountnumber
chargeCategoryEnum none | premium | tax | fee | credit | invoiceFee | cededPremium | nonFinancial | surcharge
chargeInvoicingEnum scheduled | next | immediate
chargeTypestring

Optional properties

PropertyTypeDescription
policyLocatorulid?
transactionLocatorulid?
elementLocatorulid?
elementStaticLocatorulid?
reversalOfLocatorulid?
tagstring?

Reverse Charges

Reverse ChargesreverseCharges
POST/billing/{tenantLocator}/accounts/{accountLocator}/charges/reverse

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
accountLocatorpathulidYes
Response:ChargeResponse[]
Security Group:charges
Permission:
write
ChargesReversalRequest

Required properties

PropertyTypeDescription
invoicingEnum scheduled | next | immediate
chargesulid[]

Add Invoice Fee to Policy or Quote

Add or update invoice fee on a quote

Add or update invoice fee on a quoteupdateQuoteInvoiceFeeAmount
PATCH/policy/{tenantLocator}/quotes/{locator}/invoiceFeeAmount

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Response:QuoteResponse
Security Group:quotes
Permission:
write

Add or update invoice fee on a policy

Add or update invoice fee on a policyupdatePolicyInvoiceFeeAmount
PATCH/policy/{tenantLocator}/policies/{locator}/invoiceFeeAmount

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
locatorpathulidYes
Security Group:policies
Permission:
write
UpdateInvoiceFeeAmountRequest

Required properties

PropertyTypeDescription
invoiceFeeAmountnumber

Fetch

Fetch Charges by Account

Fetch Charges by AccountfetchChargesByAccount
GET/billing/{tenantLocator}/accounts/{accountLocator}/charges/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
accountLocatorpathulidYes
offsetqueryinteger?No
countqueryinteger?No
Security Group:charges
Permissions:
read,list
ListPageResponseChargeResponse

Required properties

PropertyTypeDescription
listCompletedboolean
itemsChargeResponse[]

Fetch Charges by Policy

Fetch Charges by PolicyfetchChargesByPolicy
GET/billing/{tenantLocator}/policies/{policyLocator}/charges/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
policyLocatorpathulidYes
offsetqueryinteger?No
countqueryinteger?No
Security Group:charges
Permissions:
read,list

Fetch Charges by Transaction

Fetch Charges by TransactionfetchChargesByTransaction
GET/billing/{tenantLocator}/transactions/{transactionLocator}/charges/list

Parameters

NameInTypeRequiredDescription
tenantLocatorpathuuidYes
transactionLocatorpathulidYes
includeAllqueryboolean?No
offsetqueryinteger?No
countqueryinteger?No
Security Group:charges
Permissions:
read,list

On this page