Skip to content

Async request status

Request

Policy issuing happens asynchronously.

Call current endpoint to validate, if policy has been issued before requesting policy data.

The endpoint needs to be called until the success or failure status is returned.

In case of pending status, please repeat the call again with some delay. The pending means its still processing.

Security
bearerAuth
Path
requestIdstring, (uuid)required

request id

Query
longPollingbool
Default:"false"
Example:longPolling=true
Headers
X-TENANT-IDstringrequired

Tenant tag

Example:{$inputs.tenant}
curl -i -X GET \
  'https://ledger.app.beta.insly.training/api/v1/ledger/requests/{requestId}?longPolling=true' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-TENANT-ID: {$inputs.tenant}'

Responses

Request status

Bodyapplication/json
requestIdstring, (uuid)

Request ID

Example:"8bb0e40f-6841-47fc-a283-b6a43c6e299e"
statusstring

Status of running request

Example:"pending"
dataobject

Request data if complete

Response
{ "requestId": "a202dc2a-9e32-4bb8-8c74-18c73c235129", "status": "success", "data": { "policyId": 286532, "message": "Policy issued" } }