Using Pensure, API and Testing

This document describes how to set up and use the Pensure API both for testing and production purposes. All necessary documentation for understanding and describing the API should be contained in this document along with the needed test users that can be used.

The testing environment located on https://demo.pensure.dk and your subdomain https://(yourcompany).demo.pensure.dk can only be used with NemID testing users provisioned by Nets. We have included several of those in this document to allow you to pass the NemID step.

A short description of the user journey

The user's journey through our system starts from either a user entering the flow via one of your created apps on Pensure e.g. https://(yourcompany).demo.pensure.dk/onboarding or through calling our API to start the flow at https://api.demo.pensure.dk/api/crm/v1/flow/questions/(name). Following is a description of these two paths through the flow, so you can follow along with whichever solution you are implementing.

1. Using the Pensure UI

This url can contain a key from you site, so you can identify the user when we call back through the webhook and the redirect. By setting a url parameter; ?l=(your customer identifier). There is no limitations on the string length, but remind the general rule of url length and the identifier must not of contain any personal information like a social security number.

It is also poosible to pass custom data though the flow. By providing xparam=(string of data) in the start, the same data will be part of the webhook content and the redirect url. (remember to urlencode/escape the xparam value)

1.1 Specific for the Demo environemnt

In the Demo environment it also possible to specify a alternative webhook url and a forward url. This gives the opportunity to work on localhost.

demo-webhookurl=(url) will override the default webhook url. demo-forwardurl=(url) will override the default redirect url. (remember to urlencode/escape the urls)

These two parameters are ignored in production_

This webhook call will contain some metadata, including the url parameter (customer identifier and xparam) if present. When a succesive response is made from the webhook the browser will be redirected back to your site, including the url parameter (customer identifier and xparam) if present.

2. Using the Pensure API

This request needs to include your API keys. You will then receive a response with the data needed to display the correct question.

You will then get the next page in the flow, and the response will look the same as the response described above.

Webhook and Redirect

The webhook is called at the end of the flow.

Webhook

The content of the webhook call will contain a set of properties:

{
    state: string, // (complete)
    apiToken: string, // (api token, for use to the pensure api)
    identity: string, // (customer identity or we can provide social security number)
    xparam: string,   // Data being passed in the start of the flow
    demo: boolean, // true if a test user
    providers: string[] // name(s) of the provider.
    flowQuestions: string[]  // name(s) of question flows.
    documents: string[] // name(s) of documents
    uploads: string[] // name(s) of upload files
}
field nullable description
state complete
apiToken token to be used in the API callscomplete
identity this can be a key you specify in the flow start, or SSN we provide
xparam true data provided in url on start
demo always false in demo env., but can be true in production if internal testing is being done
providers array of providers; pensionsInfo
flowQuestions array of packages names
documents array of available documents names
uploads array of upload file names

Content:

{
  "apiToken": "CfDJ8Pwq.....e6m2E1M6s",
  "demo": false,
  "identity": "68A5755E-A0A0-4DC2-8AB6-15C7E24B6AF4",
  "xparam": "answer=42",
  "providers": ["pensionsinfo"],
  "state": "complete"
}

API

Short description of environment, and methods followed by examples.

Environments

Environment Url
Demo https://api.demo.pensure.dk
Prod https://api.pensure.dk

Security

For all calls to the API, two security headers must be included.

Example of receiving pensionsinfo pdf through the api.

curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/providers/pensionsinfo/file/pdf`

API Methods

Gateway

Last thing first. When you are finished collecting data from the various API's, you must call exported as the very last. This is important since that request will mark the user's data as received by you, lock it and process it.

All gateway methods is within this path: /api/crm/v1/gateway/

Method for gateway exported

When this method is called, all data will be removed shortly afterwards.

Path: exported Method: POST

It is posssible to put a failure status on the url like: exported?failed=(some status text here)

Example: curl -X POST -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/gateway/exported

PensionsInfo

All PensionsInfo methods is within this path: /api/crm/v1/providers/pensionsinfo/

Method for PensionsInfo PDF

Path: file/pdf Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/providers/pensionsinfo/file/pdf

Response: will be the binary pdf file.

Method for PensionsInfo Data (json)

Path: file/data Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/providers/pensionsinfo/file/data

Response: The raw output from PensionsInfo in json format.

{
  "Header": {
    "VersionNumber": 8,
    "TransactionId": "a651962521af42b3",
    "TransactionsTypeNumber": 110,
    "EventTime": "2021-06-08T14:07:31.2323617Z",
    "SocialSecurityNumber": "0104880000",
    "CohabitantSocialSecurityNumber": null,
    "CustomerRemark": "VGVsZWZvbm51bW1lcjogCkVtYWlsOiAKVHLDpmZmZXMgYmVkc3Q6IGZlbHQgaWtrZSB1ZGZ5bGR0CkJlc2tlZDogZmVsdCBpa2tlIHVkZnlsZHQ=",
    "SystemInfo": "",
    "PensionProviderId": 267
  },
  "Pdf": {
    "PdfReport": ""
  },
  "CohabitantPdf": null,
  "PensionProviders": [
    {
      "PensionProviderId": 54,
      "PensionProviderName": "Danica Pension",
      "WordSplitCharacter": 20,
      "WebSiteUrl": "https://www.danicapension.dk",
      "CurrencyCode": "DKK",
      "AdvisorName": null,
      "ReceiveDataForAdvisory": true,
      "TransactionStatus": 1,
      "Schemes": [
        {
          "TransactionStatus": 1,
          "ReferenceNumber": "1111111111",
          "TypeNumber": 2,
          "Phone": 70112525,
          "Contact": "Servicecenter",
          "Email": "kontakt@danicapension.dk",
          "Payment": 1807,
          "PaymentDate": "2020-02-01T00:00:00",
          "SavedValue": 0,
          "SavedValueDate": "2020-02-01T00:00:00",
          "SavedValuePresentation": null,
          "SystemInfoScheme": null,
          "Remarks": [],
          "Benefits": [
            {
              "TransactionStatus": 1,
              "TypeNumber": 5,
              "TypeText": "Sundhed",
              "SubscriptionTypeNumber": 2,
              "SubscriptionTypeText": "Ikke led i et ansættelsesforhold",
              "CanBeShownInGraph": false,
              "MoreInfoUrl": null,
              "SystemInfo": null,
              "PremiumWaiverBenefit": {
                "IsEligible": false,
                "IsActive": null,
                "Value": null
              },
              "Payment": {
                "BenefitPayment": 1807,
                "PaymentYearToDate": null,
                "LatestPaymentDate": null
              },
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 4,
                "PaymentFormText": "Anden udbetalingsform",
                "PaymentTaxationNumber": 51,
                "PaymentTaxationText": "Skatte- og afgiftsfri",
                "ReceiverNumber": 99,
                "ReceiverText": "Modtager er ikke oplyst",
                "ConditionNumber": 4,
                "ConditionText": "Udbetales jf. forsikringsbetingelserne",
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": null,
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": null,
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": {
                "ShadowBenefit": null,
                "Amount": 1500000,
                "AmountDate": "2020-02-01T00:00:00",
                "RiskTermination": {
                  "Date": "2055-11-01T00:00:00",
                  "Age": 67
                },
                "BenefitExtentNumber": 1,
                "BenefitDetail": [
                  1,
                  2,
                  3,
                  4,
                  8,
                  9,
                  11,
                  17
                ]
              },
              "Pension": null,
              "Remarks": [
                {
                  "TypeNumber": 4,
                  "Number": 14,
                  "Text": "Den maksimale udbetaling i løbet af ét år."
                }
              ]
            }
          ],
          "BusinessPartnerNumber": null,
          "BusinessPartner": null,
          "WordSplitCharacter": 20
        }
      ],
      "TransactionRemarks": []
    },
    {
      "PensionProviderId": 55,
      "PensionProviderName": "Danske Bank",
      "WordSplitCharacter": 20,
      "WebSiteUrl": "https://www.danskebank.dk",
      "CurrencyCode": "DKK",
      "AdvisorName": null,
      "ReceiveDataForAdvisory": true,
      "TransactionStatus": 1,
      "Schemes": [
        {
          "TransactionStatus": 1,
          "ReferenceNumber": "1111111111",
          "TypeNumber": 1,
          "Phone": 45120020,
          "Contact": "Aarhus Afdeling",
          "Email": "R3778@danskebank.dk",
          "Payment": 0,
          "PaymentDate": "2020-02-02T00:00:00",
          "SavedValue": 1278863,
          "SavedValueDate": "2020-02-02T00:00:00",
          "SavedValuePresentation": 1,
          "SystemInfoScheme": null,
          "Remarks": [
            {
              "TypeNumber": 3,
              "Number": 21,
              "Text": "Der indbetales ikke på aftalen."
            }
          ],
          "Benefits": [
            {
              "TransactionStatus": 1,
              "TypeNumber": 1,
              "TypeText": "Alderspension",
              "SubscriptionTypeNumber": 2,
              "SubscriptionTypeText": "Ikke led i et ansættelsesforhold",
              "CanBeShownInGraph": true,
              "MoreInfoUrl": null,
              "SystemInfo": null,
              "PremiumWaiverBenefit": null,
              "Payment": {
                "BenefitPayment": 0,
                "PaymentYearToDate": 0,
                "LatestPaymentDate": null
              },
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 2,
                "PaymentFormText": "Ophørende udbetaling",
                "PaymentTaxationNumber": 52,
                "PaymentTaxationText": "Skattepligtig",
                "ReceiverNumber": 1,
                "ReceiverText": "Kontohaver",
                "ConditionNumber": null,
                "ConditionText": null,
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": {
                  "Date": "2028-12-01T00:00:00",
                  "Age": 40
                },
                "PayoutEnd": {
                  "Date": "2037-12-01T00:00:00",
                  "Age": 49
                },
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": {
                  "Date": "2051-10-13T00:00:00",
                  "Age": 63
                },
                "LatestPayoutStart": null,
                "PaymentYears": 10
              },
              "Risk": null,
              "Pension": {
                "PensionTypeNumber": 2,
                "PensionType": "Ratepension",
                "IndexContractCount": null,
                "InvestmentDistributions": [
                  {
                    "InvestmentFormNumber": 7,
                    "InvestmentIdentification": "1111111111",
                    "InvestmentValue": 1278863,
                    "InvestmentValueDate": "2020-02-02T00:00:00",
                    "PendingYieldAmount": 9523
                  }
                ],
                "Forecasts": {
                  "PensionPayment": true,
                  "EarlyRetirementDeduction": "Y",
                  "CalculateForecasts": true,
                  "ForecastInterest": null,
                  "PriceIndexRegulated": false,
                  "RealIncomeRegulated": false,
                  "EnterPaymentEnabled": true,
                  "ForecastCalculationDate": "2021-10-04T14:07:30.8319035Z",
                  "Forecasts": [
                    {
                      "Age": 40,
                      "Amount": 139000,
                      "Remarks": []
                    },
                    {
                      "Age": 60,
                      "Amount": 181000,
                      "Remarks": []
                    },
                    {
                      "Age": 61,
                      "Amount": 184000,
                      "Remarks": []
                    },
                    {
                      "Age": 62,
                      "Amount": 186000,
                      "Remarks": []
                    },
                    {
                      "Age": 63,
                      "Amount": 189000,
                      "Remarks": []
                    },
                    {
                      "Age": 64,
                      "Amount": 192000,
                      "Remarks": []
                    },
                    {
                      "Age": 65,
                      "Amount": 194000,
                      "Remarks": []
                    },
                    {
                      "Age": 66,
                      "Amount": 197000,
                      "Remarks": []
                    },
                    {
                      "Age": 67,
                      "Amount": 200000,
                      "Remarks": []
                    },
                    {
                      "Age": 68,
                      "Amount": 202000,
                      "Remarks": []
                    },
                    {
                      "Age": 69,
                      "Amount": 205000,
                      "Remarks": []
                    },
                    {
                      "Age": 70,
                      "Amount": 208000,
                      "Remarks": []
                    },
                    {
                      "Age": 71,
                      "Amount": 211000,
                      "Remarks": []
                    },
                    {
                      "Age": 72,
                      "Amount": 214000,
                      "Remarks": []
                    },
                    {
                      "Age": 73,
                      "Amount": 216000,
                      "Remarks": []
                    },
                    {
                      "Age": 74,
                      "Amount": 219000,
                      "Remarks": []
                    },
                    {
                      "Age": 75,
                      "Amount": 222000,
                      "Remarks": []
                    }
                  ]
                }
              },
              "Remarks": []
            },
            {
              "TransactionStatus": 1,
              "TypeNumber": 2,
              "TypeText": "Død",
              "SubscriptionTypeNumber": 2,
              "SubscriptionTypeText": "Ikke led i et ansættelsesforhold",
              "CanBeShownInGraph": true,
              "MoreInfoUrl": null,
              "SystemInfo": null,
              "PremiumWaiverBenefit": null,
              "Payment": {
                "BenefitPayment": 0,
                "PaymentYearToDate": 0,
                "LatestPaymentDate": null
              },
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 1,
                "PaymentFormText": "Engangsudbetaling",
                "PaymentTaxationNumber": 53,
                "PaymentTaxationText": "Afgiftspligtig",
                "ReceiverNumber": 4,
                "ReceiverText": "Begunstiget",
                "ConditionNumber": null,
                "ConditionText": null,
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": null,
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": null,
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": {
                "ShadowBenefit": true,
                "Amount": 1278000,
                "AmountDate": "2020-02-02T00:00:00",
                "RiskTermination": {
                  "Date": "2028-12-01T00:00:00",
                  "Age": 40
                },
                "BenefitExtentNumber": null,
                "BenefitDetail": null
              },
              "Pension": null,
              "Remarks": []
            }
          ],
          "BusinessPartnerNumber": null,
          "BusinessPartner": null,
          "WordSplitCharacter": 20
        }
      ],
      "TransactionRemarks": []
    },
    {
      "PensionProviderId": 1,
      "PensionProviderName": "ATP",
      "WordSplitCharacter": 20,
      "WebSiteUrl": "www.borger.dk/Sider/ATP-kontakt.aspx",
      "CurrencyCode": "DKK",
      "AdvisorName": null,
      "ReceiveDataForAdvisory": false,
      "TransactionStatus": 1,
      "Schemes": [
        {
          "TransactionStatus": 1,
          "ReferenceNumber": "1111111111",
          "TypeNumber": 4,
          "Phone": 70128000,
          "Contact": null,
          "Email": null,
          "Payment": 2709,
          "PaymentDate": "2020-01-01T00:00:00",
          "SavedValue": null,
          "SavedValueDate": null,
          "SavedValuePresentation": null,
          "SystemInfoScheme": null,
          "Remarks": [],
          "Benefits": [
            {
              "TransactionStatus": 1,
              "TypeNumber": 1,
              "TypeText": "Alderspension",
              "SubscriptionTypeNumber": 3,
              "SubscriptionTypeText": "Lovbaseret pension",
              "CanBeShownInGraph": true,
              "MoreInfoUrl": "www.borger.dk/atp",
              "SystemInfo": null,
              "PremiumWaiverBenefit": null,
              "Payment": null,
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 3,
                "PaymentFormText": "Livsvarig udbetaling",
                "PaymentTaxationNumber": 52,
                "PaymentTaxationText": "Skattepligtig",
                "ReceiverNumber": 2,
                "ReceiverText": "Forsikringstager",
                "ConditionNumber": null,
                "ConditionText": null,
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": {
                  "Date": "2056-11-01T00:00:00",
                  "Age": 68
                },
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": {
                  "Date": "2056-11-01T00:00:00",
                  "Age": 68
                },
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": null,
              "Pension": {
                "PensionTypeNumber": 1,
                "PensionType": "Livrente",
                "IndexContractCount": null,
                "InvestmentDistributions": [],
                "Forecasts": {
                  "PensionPayment": null,
                  "EarlyRetirementDeduction": "N",
                  "CalculateForecasts": false,
                  "ForecastInterest": null,
                  "PriceIndexRegulated": null,
                  "RealIncomeRegulated": null,
                  "EnterPaymentEnabled": false,
                  "ForecastCalculationDate": "2020-01-01T00:00:00",
                  "Forecasts": [
                    {
                      "Age": 68,
                      "Amount": 12600,
                      "Remarks": []
                    },
                    {
                      "Age": 69,
                      "Amount": 13400,
                      "Remarks": []
                    },
                    {
                      "Age": 70,
                      "Amount": 14300,
                      "Remarks": []
                    },
                    {
                      "Age": 71,
                      "Amount": 15300,
                      "Remarks": []
                    },
                    {
                      "Age": 72,
                      "Amount": 16300,
                      "Remarks": []
                    },
                    {
                      "Age": 73,
                      "Amount": 17500,
                      "Remarks": []
                    },
                    {
                      "Age": 74,
                      "Amount": 18800,
                      "Remarks": []
                    },
                    {
                      "Age": 75,
                      "Amount": 20200,
                      "Remarks": []
                    },
                    {
                      "Age": 76,
                      "Amount": 21800,
                      "Remarks": []
                    },
                    {
                      "Age": 77,
                      "Amount": 23600,
                      "Remarks": []
                    },
                    {
                      "Age": 78,
                      "Amount": 25600,
                      "Remarks": []
                    }
                  ]
                }
              },
              "Remarks": []
            },
            {
              "TransactionStatus": 1,
              "TypeNumber": 2,
              "TypeText": "Død",
              "SubscriptionTypeNumber": 3,
              "SubscriptionTypeText": "Lovbaseret pension",
              "CanBeShownInGraph": false,
              "MoreInfoUrl": "www.atp.dk/engangsbeloeb",
              "SystemInfo": null,
              "PremiumWaiverBenefit": null,
              "Payment": null,
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 1,
                "PaymentFormText": "Engangsudbetaling",
                "PaymentTaxationNumber": 53,
                "PaymentTaxationText": "Afgiftspligtig",
                "ReceiverNumber": 18,
                "ReceiverText": "Ægtefælle",
                "ConditionNumber": null,
                "ConditionText": null,
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": null,
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": null,
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": {
                "ShadowBenefit": false,
                "Amount": 75000,
                "AmountDate": "2020-01-01T00:00:00",
                "RiskTermination": {
                  "Date": "2061-11-01T00:00:00",
                  "Age": 73
                },
                "BenefitExtentNumber": null,
                "BenefitDetail": null
              },
              "Pension": null,
              "Remarks": []
            },
            {
              "TransactionStatus": 1,
              "TypeNumber": 2,
              "TypeText": "Død",
              "SubscriptionTypeNumber": 3,
              "SubscriptionTypeText": "Lovbaseret pension",
              "CanBeShownInGraph": false,
              "MoreInfoUrl": "www.atp.dk/engangsbeloeb",
              "SystemInfo": null,
              "PremiumWaiverBenefit": null,
              "Payment": null,
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 1,
                "PaymentFormText": "Engangsudbetaling",
                "PaymentTaxationNumber": 53,
                "PaymentTaxationText": "Afgiftspligtig",
                "ReceiverNumber": 8,
                "ReceiverText": "Børn",
                "ConditionNumber": 5,
                "ConditionText": "Udbetales, hvis under 21 år",
                "ConditionParameter": 21,
                "Beneficiaries": [],
                "PayoutStart": null,
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": null,
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": {
                "ShadowBenefit": false,
                "Amount": 50000,
                "AmountDate": "2020-01-01T00:00:00",
                "RiskTermination": null,
                "BenefitExtentNumber": null,
                "BenefitDetail": null
              },
              "Pension": null,
              "Remarks": []
            }
          ],
          "BusinessPartnerNumber": null,
          "BusinessPartner": null,
          "WordSplitCharacter": 20
        }
      ],
      "TransactionRemarks": []
    },
    {
      "PensionProviderId": 63,
      "PensionProviderName": "Topdanmark Livsforsikring A/S",
      "WordSplitCharacter": 20,
      "WebSiteUrl": "www.topdanmark.dk",
      "CurrencyCode": "DKK",
      "AdvisorName": null,
      "ReceiveDataForAdvisory": true,
      "TransactionStatus": 1,
      "Schemes": [
        {
          "TransactionStatus": 1,
          "ReferenceNumber": "1111111111",
          "TypeNumber": 2,
          "Phone": 44744444,
          "Contact": "Privatkunde",
          "Email": "liv@topdanmark.dk",
          "Payment": 4006,
          "PaymentDate": "2020-02-01T00:00:00",
          "SavedValue": null,
          "SavedValueDate": null,
          "SavedValuePresentation": null,
          "SystemInfoScheme": null,
          "Remarks": [],
          "Benefits": [
            {
              "TransactionStatus": 1,
              "TypeNumber": 2,
              "TypeText": "Død",
              "SubscriptionTypeNumber": 2,
              "SubscriptionTypeText": "Ikke led i et ansættelsesforhold",
              "CanBeShownInGraph": true,
              "MoreInfoUrl": null,
              "SystemInfo": null,
              "PremiumWaiverBenefit": {
                "IsEligible": false,
                "IsActive": null,
                "Value": null
              },
              "Payment": {
                "BenefitPayment": 2654,
                "PaymentYearToDate": null,
                "LatestPaymentDate": "2048-11-01T00:00:00"
              },
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 1,
                "PaymentFormText": "Engangsudbetaling",
                "PaymentTaxationNumber": 51,
                "PaymentTaxationText": "Skatte- og afgiftsfri",
                "ReceiverNumber": 4,
                "ReceiverText": "Begunstiget",
                "ConditionNumber": null,
                "ConditionText": null,
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": null,
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": null,
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": {
                "ShadowBenefit": false,
                "Amount": 996000,
                "AmountDate": "2020-02-01T00:00:00",
                "RiskTermination": {
                  "Date": "2048-11-01T00:00:00",
                  "Age": 60
                },
                "BenefitExtentNumber": null,
                "BenefitDetail": null
              },
              "Pension": null,
              "Remarks": []
            },
            {
              "TransactionStatus": 1,
              "TypeNumber": 4,
              "TypeText": "Kritisk sygdom",
              "SubscriptionTypeNumber": 2,
              "SubscriptionTypeText": "Ikke led i et ansættelsesforhold",
              "CanBeShownInGraph": true,
              "MoreInfoUrl": null,
              "SystemInfo": null,
              "PremiumWaiverBenefit": {
                "IsEligible": null,
                "IsActive": null,
                "Value": null
              },
              "Payment": {
                "BenefitPayment": 1352,
                "PaymentYearToDate": null,
                "LatestPaymentDate": "2048-11-01T00:00:00"
              },
              "Payout": {
                "CurrentPayment": false,
                "CurrentYearlyPayout": null,
                "PaymentFormNumber": 1,
                "PaymentFormText": "Engangsudbetaling",
                "PaymentTaxationNumber": 51,
                "PaymentTaxationText": "Skatte- og afgiftsfri",
                "ReceiverNumber": 2,
                "ReceiverText": "Forsikringstager",
                "ConditionNumber": null,
                "ConditionText": null,
                "ConditionParameter": null,
                "Beneficiaries": [],
                "PayoutStart": null,
                "PayoutEnd": null,
                "LatestPossiblePayout": null,
                "EarliestPossiblePayout": null,
                "LatestPayoutStart": null,
                "PaymentYears": null
              },
              "Risk": {
                "ShadowBenefit": null,
                "Amount": 134000,
                "AmountDate": "2020-02-01T00:00:00",
                "RiskTermination": {
                  "Date": "2048-11-01T00:00:00",
                  "Age": 60
                },
                "BenefitExtentNumber": null,
                "BenefitDetail": null
              },
              "Pension": null,
              "Remarks": []
            }
          ],
          "BusinessPartnerNumber": null,
          "BusinessPartner": null,
          "WordSplitCharacter": 20
        }
      ],
      "TransactionRemarks": []
    }
  ],
  "CohabitantPensionProviders": null
}

flowQuestions

All flow question methods is within this path: /api/crm/v1/flow/questions/(name)

Method for flowQuestions Data (json)

Path: file/data Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/flow/questions/(name)/file/data

this is an example of a response. The actual response varies since it depends on the question package

Response:

{
  "id": "aboutyou",
  "questions": [
    {
      "id": "contactInfo",
      "answers": [
        {
          "id": "phone",
          "value": "12312312",
          "valueArray": null
        },
        {
          "id": "email",
          "value": "frank@pensure.dk",
          "valueArray": null
        }
      ]
    },
    {
      "id": "homeLife",
      "answers": [
        {
          "id": "homeLife",
          "value": null,
          "valueArray": [
            "married",
            "partner"
          ]
        }
      ]
    },
    {
      "id": "address",
      "answers": [
        {
          "id": "addressComponent",
          "value": "Rådhuspladsen 1, 8000 Aarhus C",
          "valueArray": null
        }
      ]
    },
    {
      "id": "homeValue",
      "answers": [
        {
          "id": "valueComponent",
          "value": "123123123",
          "valueArray": null
        }
      ]
    },
    {
      "id": "homeDebt",
      "answers": [
        {
          "id": "debtComponent",
          "value": "123123",
          "valueArray": null
        }
      ]
    },
    {
      "id": "lifeChanges",
      "answers": [
        {
          "id": "lifeChangesComponent",
          "value": null,
          "valueArray": [
            "married",
            "children",
            "inherited",
            "employmentChange",
            "other"
          ]
        }
      ]
    },
    {
      "id": "homeSituation",
      "answers": [
        {
          "id": "homeSituationComponent",
          "value": "homeOwner",
          "valueArray": null
        }
      ]
    },
    {
      "id": "extrasPage",
      "answers": [
        {
          "id": "extraComponent",
          "value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam eleifend, tellus ac ullamcorper cursus, nunc tortor facilisis erat, ut hendrerit ante metus in magna. Nulla facilisis accumsan magna, et egestas erat finibus a. Aliquam augue enim, semper ut nisi vitae, lobortis vestibulum nisi. Suspendisse varius tincidunt rutrum. Nunc placerat arcu sit amet urna molestie, vitae maximus diam tempor. Aenean feugiat felis vel nisi aliquam, in convallis nulla viverra. Sed et facilisis diam. Mauris vitae ipsum viverra, sodales orci at, sodales ipsum. Duis interdum mattis metus in placerat. Nam purus augue, congue eu sapien vel, rhoncus iaculis urna. Proin ultricies sit amet massa blandit pharetra. Integer ligula mauris, finibus sit amet finibus et, feugiat at tellus. Suspendisse id ultricies quam, vitae fringilla sem. Aliquam at malesuada nisi.",
          "valueArray": null
        }
      ]
    }
  ]
}
Method for flowQuestions PDF

Path: file/pdf Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/flow/questions/(name)/file/pdf

By default, the pdf is not created. So please inform us if it is needed.

Documents

If generated documents are part of the flow, they will have this path: documents/(name)/*.

The webhook will be called either when the document is generated, or signed if that is required.

Documents file (binary)

The binary document file.

Path: file/binary Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/documents/(id)/file/binary

Documents data (json)

Some metadata of the file.

Path: file/data Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/documents/(id)/file/info

Response:

{
  id: string,
  prettyPath: string,
  templateFilename: string,
  prettyFilename: string,
  contentType: string,
  isSigned: boolean,
  timestampUtc: number
}

Uploads

If user is uploading any files, they will have this path: uploads/(name)/*.

Uploads file (binary)

Path: file Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/uploads/(id)/file/binary

Uploads data (json)

Path: file Method: GET

Example: curl -v -H "Authorization: Bearer (ApiToken)" -H "X-Pensure-ApiKey: (ApiKey)" https://api.demo.pensure.dk/api/crm/v1/uploads/(id)/file/data

Testing

To access the flow, enter following in the browser:

https://(company name here).demo.pensure.dk/Zeus1

_remind: *.demo.pensure.dk is working behind firewall, so get your outbound/public ip whitelisted.

Test users

User Name CPR Alt. CPR Beskrivelse
Anna82664 Anna Jørgensen 2107620001 0107560000 4b7590f3-a4f5-49e4-922a-4a153e63ae69
Mette297 Mette Von Testesen 0111660001 0107640000 90295f5d-3cd2-4dc9-9279-5005ad833171
Buglem16488 Buglem Pedersen 0209730001 0107640000 22ac438c-dae2-40e4-a750-023e035ee7a4
Catarina23145 Catarina Pedersen 1512370001 1512360001
Villads4252 Villads Nielsen 1606590001 1606590001
Freja33443 Freja Von Testesen 1707650001 0107990000 7cc70e75-80fc-41e9-b7a8-c80f32e16826
Zenia945 Zenia Jensen 1310900001 0104770000 d516e99b-60d2-41a5-90d6-1e2392006887
Esther6745 Esther Poulsen 0308930001 0107720000 ee354b30-c905-4480-907f-e70b633fa39f
Iris6454 Abha Andersen 2901680001 2901650001 25c84897-4e9b-4e59-9987-3f1d3a073ffb
Hugo83506 Hugo Andersen 0504760001 0504760001
Ulrik1992 Ulrik Poulsen 0208600001 0208580001
Anonym007 Anonyme Arne 2210921445 0000000000 Anonym bruger (PI virker ikke!)