Skip to content

Ledger/Sales service (1.0)

Using Swagger documentation in Postman


You can find instructions on how to convert swagger documentation to Postman collection here.
There is a known problem in Postman with env variables being imported as parameters (:schemaName instead of {{schemaName}}. More info on the issue can be found here.
Possible workaround is to find and replace all parameters with env variables inside Postman. For example search for :schemaName and replace with {{schemaName}}. Instructions how to do it in Postman are here.

Authorization

To obtain a token, start by visiting the identifier service documentation and make a request with your username and password.
Once you receive the response, copy the access_token and use it for making requests to ledger services.
Download OpenAPI description
Languages
Servers
Mock server

https://ledger.docs.insly.com/_mock/apis/ledger/bundled/

Beta

https://ledger.app.beta.insly.training/

Demo

https://ledger.app.demo.insly.com/

Operations
Operations
Operations
Operations

Request

Calculate quote

Security
bearerAuth
Path
idintegerrequired

Quote id

Query
withNotificationsbooleanrequired

Forced Required to use in documentation, to get additional data about quote status: meta block from example with warnings, errors. Plan to make it as default behaviour.

Default "true"
Headers
X-TENANT-IDstringrequired

Tenant tag

Example: {$inputs.tenant}
Bodyapplication/json

Full request structure per product can be taken from json scheme Product json scheme. with type: policy and name: {name of the insurance product}.

any
curl -i -X POST \
  'https://ledger.docs.insly.com/_mock/apis/ledger/bundled/api/v1/ledger/sales/policies/{id}/calculate?withNotifications=true' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-TENANT-ID: {$inputs.tenant}' \
  -d '{}'

Responses

Full structure per product can be taken from json scheme Product json scheme. with type: policy and name: {name of the insurance product}.

Bodyapplication/json
dataany
Example: ["See response description for more details."]
Response
application/json
[]

Request

Get quote financials by quote id

Security
bearerAuth
Path
idstringrequired

id of quote

Headers
X-TENANT-IDstringrequired

Tenant tag

Example: {$inputs.tenant}
curl -i -X GET \
  'https://ledger.docs.insly.com/_mock/apis/ledger/bundled/api/v1/ledger/sales/policies/{id}/calculation' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-TENANT-ID: {$inputs.tenant}'

Responses

Quote financials

Bodyapplication/json
dataobject
data.​periodPremiumnumber
Example: 500
fieldsArray of objects

Array of fields to show in UI

fields[].​namestring
Example: "periodPremium"
fields[].​titlestring
Example: "Premium"
installmentsArray of objects

Optional array of installments entries to be created when quote is issued

Response
application/json
{ "data": { "periodPremium": 500 }, "fields": [ { … } ], "installments": [ {} ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations