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

Request

Security
bearerAuth
Path
policyIdstringrequired
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}
Accept-Languagestringrequired

Chosen language

curl -i -X GET \
  'https://ledger.docs.insly.com/_mock/apis/ledger/bundled/api/v1/ledger/sales/policies/{policyId}?withNotifications=true' \
  -H 'Accept-Language: string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-TENANT-ID: {$inputs.tenant}'

Responses

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

Bodyapplication/json
dataobject
metaobject
meta.​schemaPathstringrequired

Path to json scheme used for validation. Sometimes required fields are removed based on business logic.

meta.​errorsArray of objects(metaMessage)

Error that can't be overcomed/retried in most of the cases. Connection time-out to integration, connection fail.

meta.​errors[].​codestringrequired
meta.​errors[].​titlestringrequired
meta.​errors[].​statusnumber
meta.​warningsArray of objects(metaMessage)

Error that can be handled manually by inserting data manually, edit the data, retry. Not blocking the flow. Vehicle make and model not found, insert it manually.

meta.​warnings[].​codestringrequired
meta.​warnings[].​titlestringrequired
meta.​warnings[].​statusnumber
Response
application/json

The full data block structure per product can be taken from product json scheme with type: policy and name: {name of the insurance product}.

[ { "data": {} }, { "meta": null, "schemaPath": "policy/regular/{product}", "warnings": [ … ], "errors": [ … ] } ]

Request

Get available actions. This route has to be called after each change quote data to get to know that action is done

Security
bearerAuth
Path
idstringrequired

id of quote

Query
longPollingbool
Default "false"
Example: longPolling=true
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/actions/{id}?longPolling=true' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-TENANT-ID: {$inputs.tenant}'

Responses

Resource unlocked. No background logic running. List of allowed actions for the quote.

Bodyapplication/json
dataArray of items
linksobject(quoteLinks)
links.​quote:changesstring
Example: "https://app.beta.insly.training/api/v1/ledger/sales/policies/1/changes"
Response
application/json
{ "data": [ "quote:download", "quote:update", "quote:copy", "quote:calculate", "quote:issue" ], "meta": [], "links": { "quote:changes": "https://app.beta.insly.training/api/v1/ledger/sales/policies/1/changes" } }

Request

Security
bearerAuth
Path
policyIdintegerrequired
Example: 123
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/123/installments-schedule \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-TENANT-ID: {$inputs.tenant}'

Responses

Success

Bodyapplication/json
instalmentsArray of objects
instalments[].​dueDatedate
Example: "2024-01-01"
instalments[].​premiumnumber
Example: "1234.56"
Response
application/json
{ "instalments": [ { … } ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations