NAV
http php

Paymentshield REST API Reference

These are the docs for the Paymentshield REST API, which allows integrators to quote, sell, and deliver Paymentshield insurance policies in a secure and accessible way.

Our API is composed of a number of services separated by function but accessed through one easy URL scheme.

All API endpoints:

Service Method URL Description
Security POST /Security/Login Login via email/password or userid/passkey and get a token
Security POST /Security/Refresh Keeps your session token alive without doing an operation
Quotes POST /Quote Create a quote
Quotes POST /QuickQuote Create a quick quote
Quotes GET /Quote/654321 Retrieve quote by quote request ID
Quotes POST /Quote/654321 Edit quote if un-priced, Clone quote if priced already
Quotes POST /Quote/{guid}/Apply Apply for a quote, by quote reference (GUID)
Quotes GET /Quotes/?params Search for quotes. Supported params: UserReference
Documents GET /Documents/654321 Get list of document links for the quote request
Documents GET /Documents/?quoteId={guid} Get list of document links for the quote reference (GUID)
Documents GET /Document/{type}/{freq}/{id}.pdf Get a document. Add {freq} for multi quote summary only. {id} is QRID for IPID and Terms, Quote GUID for all others.
Documents POST /SDN/654321 Create an SDN for a submitted Advised quote
Catalogue GET /Industries Get list of ABI industries
Catalogue GET /Occupations Get list of ABI occupations
Catalogue GET /Products Get products you can sell as the authenticated user, by branch
Catalogue GET /SdnTemplate/654321 Get the SDN template sections and statements recommended for the quote request

Environments

The code samples on this page use the UAT environment, which you should use to develop your integration. When you go to production, use the Live environment, which will create real quotes and policies in our live system.

Environment Base URL
UAT https://apiuat.paymentshield.co.uk
Live https://api.paymentshield.co.uk

General API Principles

Error Handling

{
    "StatusCode": "ClientError",
    "Messages":
    [
        {
            "MessageType": "Authentication",
            "Summary": "Sorry, we couldn’t log you in with those details. Please check and try again"
        }
    ]
}

This is how we use HTTP status codes:

HTTP Meaning
400 Something was incorrect or missing in your request object. More information will be given in the StatusCode and Messages elements of the response.
401 Unauthenticated - Your request didn't appear to be from a valid user. Maybe the credentials were missing or wrong, or don't work with the SystemId provided, or perhaps your Session has expired.
403 Unauthorized - Your credentials are valid but the specified user isn't allowed to do the task you tried to do. This might be because of a product restriction or because you are trying to look at another users' data.
500 Server Error - Generally a failure on our part or an impossible-to-fulfill request.

In many cases, we return additional information in the JSON response body in the StatusCode and Messages parameters.

StatusCode

StatusCode Meaning
EmptyRequest We couldn't see or understand your JSON Body data
ServerError A problem with our service
ClientError A problem with your request
AuthenticationRefused UserId and Token (or SystemId) are wrong, or the session expired
UserLockedOut The supplied UserId has been locked out by an administrator
AuthorisationRefused The supplied user isn't allowed to complete the specified action
NotAllowed The supplied user isn't allowed to complete the specified action
UpstreamError A third-party server or data vendor did not respond to us properly
NoDataWarning (UseThirdPartyData) Our data enrichment partner had no data for the property
PartialDataWarning (UseThirdPartyData) Our data enrichment partner had incomplete data for the property

MessageType

MessageType Meaning
Authentication Problem with the authentication details (headers) provided
Mandatory Problem with an Answer which is mandatory and for which you didn't provide a value
Invalid Problem with an Answer with validation criteria which weren't met
Quote Problem with quote retrieval or insurability of the submitted data
Error Problem with our service or a third party service dependency
ResultsLimited Warning that there were too many results to show (for Search Quotes)
Generic Fallback error designation

Version History

Version 2024-01-28

We refreshed our Home product, improving cover levels and amending some questions.

Please check the updated Reduced Question Set Defaults.

🌠 We are now providing a Postman collection with examples of how to authenticate, quote, apply, and get docs and catalogue data for the home product.

Version 2023-12-17

Tenants Contents Monthly

We moved our Tenants Contents product to a monthly subscription model.

QuickQuote v2

The QuickQuote docs have been revised and updated.

Version 2023-02-05

API v2 Routes were added for integration with new "reduced question sets". See Reduced Question Set Defaults.

New question set version 157 for Home, which replaces 147.

For the new /v2 routes, the following changes apply:

Additionally, the following global changes apply:

Version 2021-12-12

Version 2021-03-08

Version 2020-09-16

Version 2020-08-02

Version 2020-07-27

Version 2020-05-31

Authentication

<?php

$data = [
    'Email' => '[email protected]',
    'Password' => 'BrokerPassword'
];

$url  = 'https://apiuat.paymentshield.co.uk/Security/Login';
$json = json_encode($data);
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $json,
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ]
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

$response = $err
    ? "cURL Error $err"
    : $response;
POST https://apiuat.paymentshield.co.uk/security/login HTTP/1.1
Content-Type: application/json
{
    "Email": "[email protected]", 
    "Password": "BrokerPassword"
}

Replace the Email and Password fields with your credentials.

POST https://apiuat.paymentshield.co.uk/security/login HTTP/1.1
Content-Type: application/json
{
    "UserId": "123456", 
    "Passkey": "aaaaaaaa"
}

You can use UserId and Passkey authentication instead of email and password. The UserId is also known as Seller Number.

We have a custom authentication scheme due to our internal system; we don't use OAuth or similar.

The general flow of authentication is like this:

  1. Authenticate by POSTing either email+password or userid+passkey in a JSON body to the Login endpoint
  2. We'll send back a response containing your UserId (a constant, unique integer ID) and a session Token (GUID) which is valid for 40 minutes. The Token's validity is reset to the full time whenever it is used for an authenticated API call. You can store the Token in local storage within your app.
  3. You should know your SystemId, a GUID identifying the piece of software calling the API. This is somewhat like an API key (with the UserId and Token together forming a kind of API secret).
  4. In all subsequent requests to any of our API services, send the UserId, Token, and SystemId in HTTP headers.

Login

To login, POST to the /Security/Login endpoint as shown in the code samples on the right.

Token Refresh

We provide a Token Refresh endpoint to function as a "keep alive", which will renew your session active time, extending the session. It is essentially a no-op, and your session token will stay the same.

We recommend you build this into your integration, for example on button presses, to avoid having to log users back in regularly.

POST to the /Security/Refresh endpoint with the usual security headers and no body. The response will be a simple JSON body with a StatusCode of OK. If the session has already expired, you will receive the usual 401 error with status AuthenticationRefused.

Quote Service

You can use the Quote Service to get Quotes and QuickQuotes and retrieve those you created earlier. The Quote service relies upon some external services to PSL to get prices, which can mean it takes a while to get prices, particularly for complex quotes featuring multiple tiers of cover.

Integration Types

Full vs Partial integration

We use the term 'full integration' to mean integrations which complete a Quote & Buy journey using only API endpoints. In contrast, a 'partial integration' gets a quote or quick quote from the API and then uses a ContinuationUri that we provide to transfer the user for them to complete the journey in our Adviser Hub web frontend.

v1 and v2

The Quote API v2 is used for our "reduced question set" journey. Currently this applies only to Home, but will be extended in future.

Reduced question sets allow you to send fewer Answer values than are usually required by:

There are v2 routes for the following endpoints:

For an overview of differences in v2 payloads, see the Version History section

QuoteRequests and Quotes

A QuoteRequest is a well-defined request for cover which we submit to one or more insurers. QuoteRequests have integer IDs (QuoteRequestId). If insurers can provide prices for the specified cover, we return these in the response and refer to each insurer offer as a Quote, which has a QuoteId - a GUID. A customer can apply for a Quote.

Create Quote

POST to the /Quote endpoint to create a quote.

<?php

// Use the token from your login response
$userId = 123456;
$token = '9c92d88f-d28f-4eb6-8e69-f96707113544';
$systemId = '56cba828-1376-4ced-96d4-11a950e4afe8';

$data = [
  'ProductId' => 1010,
  'BranchNumber' => 'PS180092',
  'UseDefaults': true,
  'IsIndicativeQuote': false,
  'CommissionSacrifice': 0,
  'UserReference' => 'MyRef_123',
  'Answers': [
    ['InterfaceKey' => 'Applicant1Title', 'Value' => 'Miss'],
    ['InterfaceKey' => 'Applicant1Forename', 'Value' => 'Jessica'],
    ...
  ]
];

$url  = 'https://apiuat.paymentshield.co.uk/Quote';
$json = json_encode($data);
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $json,
  CURLOPT_HTTPHEADER => [
  "Content-Type: application/json",
  "UserId: $userId",
  "Token: $token",
  "SystemId: $systemId",
  ]
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

$response = $err
  ? "cURL Error $err"
  : $response;
POST https://apiuat.paymentshield.co.uk/Quote/ HTTP/1.1
Content-Type: application/json
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

{
  "ProductId": 1015,
  "BranchNumber": "AB000000",
  "UseDefaults": true,
  'IsIndicativeQuote': false,
  "CommissionSacrifice": 0,
  "UserReference": "MyRef_123",
  "Answers": [
    {
      "Value": "Mrs",
      "InterfaceKey": "Applicant1Title"
    },
    {
      "Value": "Kayleigh",
      "InterfaceKey": "Applicant1Forename"
    },
    {
      "Value": "Porter",
      "InterfaceKey": "Applicant1Surname"
    },
    ...
    {
      "Value": "One",
      "InterfaceKey": "NumberOfBedrooms"
    },
    {
      "Value": "Flat",
      "InterfaceKey": "PropertyType"
    },
    ...
  ]
}

Create a new full Quote Request. A Quote Request is our term for a well-specified request for insurance quotes, for a given customer, based on the customer information you provide. As long as your request provides valid answers to all mandatory questions, a Quote Request will be created in our database and we will pass back a QuotesResponse with a QuoteRequestId. From here, you can continue the user journey in our web frontend using the ContinuationUri in the response.

You can find the types and examples of each request field in the Swagger definition of the API.

Please see the code pane for an example of the HTTP headers and JSON request you should send. The fields we require in the request are explained in more detail below:

ProductId

The four-digit ID of a Paymentshield product offering. Not all integrators can sell the full range of products. If you want to be authorised to sell a different range of products, please get in touch. To browse products and their related question sets, please see the Question Sets section at the bottom of the page.

BranchNumber

The BranchNumber is provided as part of a user's configuration in our back end system. To create a Quote Request a user must be authorised to sell the product under the branch number you send in the request.

UseDefaults

v1: Please set UseDefaults to true. It sets some Answers to their sensible default or calculated value if you don't specify one.

v2: Not required - do not include this field in payload.

CallChannelType

Optional - your integration may require you to set this to get custom behaviour for your network. Speak to your PSL contact.

If omitted, defaults to "External".

IsIndicativeQuote

If set to true, the quotes are "indicative" prices only, and cannot be applied for.

If omitted, defaults to false. We recommend that you do not include this field.

CommissionSacrifice

The maximum amount of commission that can be sacrificed by a user is provided as part of a user's configuration in our back end system. The value sent in the CommissionSacrifice field must not exceed the maximum for the user/branch number combination.

If omitted, defaults to 0.

UserReference

You can pass an optional UserReference field in a quote request to allow you to identify the quote as per your own requirements. For example, a customer or fact find reference from your system.

The UserReference will be returned in the Quote Response and can be used to search for quotes using a GET Quotes request.

IsPartialQuote

Setting IsPartialQuote to true allows you to save quote progress:

If omitted, defaults to false.

See also Create Partial Quote.

v2: If IsPartialQuote is true, we do not fill in the Default answers.

Answers

This is the main substance of your request. Each Answer is a struct of InterfaceKey, Value, and perhaps RepeatingQuestionSetIndex (if the answer is part of a list). Each product has a certain number of mandatory answers that must be provided to get a quote. You can submit an incomplete quote if you set the IsPartialQuote flag to false. See Create Partial Quote.

Repeating/multi-part Answers

Example request with multi-part answers

{
  "ProductId": 1015,
  "BranchNumber": "AB000000",
  "UseDefaults": true,
  "IsIndicativeQuote": false,
  "CommissionSacrifice": 0,
  "Answers": [
    ...
    {
      "Value": "true",
      "InterfaceKey": "ContentsItemsToSpecify"
    },
    {
      "Value": "ComputerEquipment",
      "InterfaceKey": "SpecifiedItemType",
      "RepeatingQuestionSetIndex": 0
    },
    {
      "Value": "High Performance PC",
      "InterfaceKey": "SpecifiedItemDescription",
      "RepeatingQuestionSetIndex": 0
    },
    {
      "Value": "3000",
      "InterfaceKey": "SpecifiedItemValue",
      "RepeatingQuestionSetIndex": 0
    },
    {
      "Value": "JewelleryOrWatches",
      "InterfaceKey": "SpecifiedItemType",
      "RepeatingQuestionSetIndex": 1
    },
    {
      "Value": "Watch",
      "InterfaceKey": "SpecifiedItemDescription",
      "RepeatingQuestionSetIndex": 1
    },
    {
      "Value": "3000",
      "InterfaceKey": "SpecifiedItemValue",
      "RepeatingQuestionSetIndex": 1
    },
    ...
  ]
}

Some of our products have questions that allow repeating answers and have multiple parts to the answer. An example of this is ContentsItemsToSpecify, which, when set to true, requires at least one group of the following answers:

RepeatingQuestionSetIndex InterfaceKey
0 SpecifiedItemType
0 SpecifiedItemDescription
0 SpecifiedItemValue

You must send all three answers for the specified item to be added to the quote.

To add a second specified item, you would include another group of answers to these three questions, marked with an incremented RepeatingQuestionSetIndex of 1.

Each set of multi-part answers, whether for specified items, personal possessions, or previous claims, must have a globally unique integer value for RepeatingQuestionSetIndex. For example, you should not use 0 to mark both a Personal Possession and a Previous Claim; they should have different indices:

RepeatingQuestionSetIndex InterfaceKey Value
0 PPItemType JewelleryOrWatches
0 PPItemDescription Swiss watch
0 PPItemValue 3500
1 PreviousClaimClaimedUnder BuildingsOnly
1 PreviousClaimTypeOfLoss AccidentalDamage
1 PreviousClaimDateOfLoss 20/08/2015

Strategies for unique RepeatingQuestionSetIndex

Here are two strategies for setting correct values for RepeatingQuestionSetIndex in your integration:

  1. You could keep a global count of repeating sections in your state store and apply it to the corresponding Answer nodes in your request
  2. You could assume a maximum for each repeating group and treat it as an offset, so that all SpecifiedItems begin at 0, PersonalPossessions begin at 10, and PreviousClaims begin at 20, for example.

The numbering of RepeatingQuestionSetIndex in our response will always start at 0, even if your request started at 1 (or higher). Our numbering in the response will be contiguous (i.e. no gaps in numbering starting from 0) even if your request had gaps.

The example in the code pane shows how to add two specified items to a quote - in this case a PC and a Watch.

Quote Response

Example Quote Response

{
    "StatusCode": "OK",
    "Messages": [],
    "CallChannelType": "External",
    "BranchNumber": "AB102030",
    "CoverSelections": {
        "BuildingsAD": "Excluded",
        "ContentsAD": "Excluded"
    },
    "QuestionSetId": 167,
    "MaxCommissionSacrifice": 25.00,
    "QuoteRequestId": 5228480,
    "QuoteReference": "PSL-BCHI-5228480",
    "QuoteStatus": "QUOTESRETRIEVED",
    "ProductId": "1015",
    "QuoteSessionId": "3ac30f5e-096c-445e-8890-edda3eab76a6",
    "QuoteRequestContinuationUri": "https://uat-quote.paymentshieldadviserhub.co.uk/?userId=123456&token=5a862c13-a2b7-473e-8687-1f9a71bcf703&quoteRequestId=5228480",
    "QuoteDate": "2024-01-19T10:08:51+00:00",
    "QuoteExpiryDate": "2024-07-17T00:00:00+01:00",
    "IsMultiTier": true,
    "IsIndicativeQuote": false,
    "CommissionSacrifice": 0.0,
    "IptRate": 0.120,
    "LinkedQuotes": [],
    "Quotes": [
        {
            "QuoteId": "01f860b2-18e8-42dd-935b-ba7a76d3f7d1",
            "InsurerName": "ABC",
            "ProductName": "Home Insurance",
            "QuoteExpiryDate": "2024-07-17T00:00:00+01:00",
            "Cover": {
                "IsRequested": true,
                "BuildingsAD": "Excluded",
                "ContentsAD": "Excluded",
                "BuildingsCoverLevel": 1000000.0,
                "ContentsCoverLevel": 75000.0
            },
            "Premiums": [
                {
                    "PaymentMethod": "DirectDebit",
                    "PaymentFrequency": "Annual",
                    "PaymentFrequencyDescription": "Annually",
                    "PriceID": "8ec4f88a"
                },
                {
                    "PaymentMethod": "CreditCard",
                    "PaymentFrequency": "Annual",
                    "PaymentFrequencyDescription": "Annually",
                    "PriceID": "8ec4f88a"
                },
                {
                    "PaymentMethod": "DebitCard",
                    "PaymentFrequency": "Annual",
                    "PaymentFrequencyDescription": "Annually",
                    "PriceID": "8ec4f88a"
                },
                {
                    "PaymentMethod": "DirectDebit",
                    "PaymentFrequency": "Monthly3MonthsDeferred",
                    "PaymentFrequencyDescription": "Monthly",
                    "CreditDetails": {
                        "Apr": 23.70,
                        "CreditCharge": 69.16,
                        "FixedInterestRate": 15.11,
                        "InitialPayment": 58.52,
                        "NumberOfSubsequentPayments": 8,
                        "SubsequentPayments": 58.54
                    },
                    "PriceID": "e6846f35"
                },
                {
                    "PaymentMethod": "DirectDebit",
                    "PaymentFrequency": "Monthly",
                    "PaymentFrequencyDescription": "Monthly",
                    "CreditDetails": {
                        "Apr": 23.70,
                        "CreditCharge": 54.92,
                        "FixedInterestRate": 12.00,
                        "InitialPayment": 42.68,
                        "NumberOfSubsequentPayments": 11,
                        "SubsequentPayments": 42.72
                    },
                    "PriceID": "b0380cf2"
                }
            ],
            "Endorsements": []
        },
        {
            "QuoteId": "3a8ee81e-a588-4be2-afd7-80bb716fb918",
            "InsurerName": "ABC",
            "ProductName": "Home Insurance",
            "QuoteExpiryDate": "2024-07-17T00:00:00+01:00",
            "Cover": {
                "IsRequested": false,
                "BuildingsAD": "Excluded",
                "ContentsAD": "Included",
                "BuildingsCoverLevel": 1000000.0,
                "ContentsCoverLevel": 75000.0
            },
            "Premiums": [
                ...
            ],
            "Endorsements": []
        },
        ...
    ],
    "Prices": [
        {
            "ID": "8ec4f88a",
            "Values": {
                "TotalCostPerPaymentPeriod": 457.68,
                "TotalPremiumIncludingIPT": 457.68,
                "TotalPremiumExcludingIPT": 412.50,
                "AdministrationCharge": 36.00,
                "InsurancePremiumTax": 45.18,
                "HouseholdInsurancePremiumExcludingIPT": 376.50,
                "HomeEmergencyPremiumExcludingIPT": 0.0,
                "LegalExpensesPremiumExcludingIPT": 0.0,
                "BuildingsCoverGrossExcludingIPT": 255.79,
                "ContentsCoverGrossExcludingIPT": 120.71,
                "PersonalCoverGrossExcludingIPT": 0.0,
                "TotalAmountPayable": 457.68
            }
        },
        {
            "ID": "e6846f35",
            "Values": {
                "TotalCostPerPaymentPeriod": 58.54,
                "TotalPremiumIncludingIPT": 457.68,
                "TotalPremiumExcludingIPT": 412.50,
                "AdministrationCharge": 36.00,
                "InsurancePremiumTax": 45.18,
                "HouseholdInsurancePremiumExcludingIPT": 376.50,
                "HomeEmergencyPremiumExcludingIPT": 0.0,
                "LegalExpensesPremiumExcludingIPT": 0.0,
                "BuildingsCoverGrossExcludingIPT": 255.79,
                "ContentsCoverGrossExcludingIPT": 120.71,
                "PersonalCoverGrossExcludingIPT": 0.0,
                "TotalAmountPayable": 526.84
            }
        },
        {
            "ID": "b0380cf2",
            "Values": {
                "TotalCostPerPaymentPeriod": 42.72,
                "TotalPremiumIncludingIPT": 457.68,
                "TotalPremiumExcludingIPT": 412.50,
                "AdministrationCharge": 36.00,
                "InsurancePremiumTax": 45.18,
                "HouseholdInsurancePremiumExcludingIPT": 376.50,
                "HomeEmergencyPremiumExcludingIPT": 0.0,
                "LegalExpensesPremiumExcludingIPT": 0.0,
                "BuildingsCoverGrossExcludingIPT": 255.79,
                "ContentsCoverGrossExcludingIPT": 120.71,
                "PersonalCoverGrossExcludingIPT": 0.0,
                "TotalAmountPayable": 512.60
            }
        },
        ...
    ],
    "Answers": [
        {
            "InterfaceKey": "SecondApplicantIncluded",
            "Value": "False",
            "Source": "User"
        },
        ...
        {
            "InterfaceKey": "PropertyType",
            "Value": "Terraced",
            "Source": "ThirdParty"
        },
        {
            "InterfaceKey": "NumberOfBedrooms",
            "Value": "Three",
            "Source": "ThirdParty"
        },
        {
            "InterfaceKey": "NumberOfBathrooms",
            "Value": "One",
            "Source": "ThirdParty"
        },
        {
            "InterfaceKey": "BuildYear",
            "Value": "1944",
            "Source": "ThirdParty"
        },
        ...
        {
            "InterfaceKey": "BuildingsCoverLevel",
            "Value": "OneMillion",
            "Source": "Default"
        },
        {
            "InterfaceKey": "AccidentalDamageBuildings",
            "Value": "False",
            "Source": "Default"
        },
        {
            "InterfaceKey": "ExcessBuildings",
            "Value": "TwoHundredAndFifty",
            "Source": "Default"
        },
        {
            "InterfaceKey": "AccidentalDamageContents",
            "Value": "False",
            "Source": "Default"
        },
        {
            "InterfaceKey": "ExcessContents",
            "Value": "TwoHundredAndFifty",
            "Source": "Default"
        },
        {
            "InterfaceKey": "PersonalPossessionsToSpecify",
            "Value": "False",
            "Source": "Default"
        },
        ...
    ]
}

A successful Quote response includes the following information:

Field Details
StatusCode A successful response will have a status code of OK. See StatusCode.
Messages For a successful response, this will be an empty array.
BranchNumber v2 only - Confirmation of your BranchNumber from the request.
CallChannelType v2 only - Confirmation of your CallChannelType from the request.
QuoteRequestId The unique integer ID of the Quote Request. Use this in other API calls to retrieve Quotes and Documents.
QuoteReference The full Paymentshield Quote Reference that should be relayed to a customer and will display on documents.
QuoteStatus The lifecycle state of the Quote Request. See QuoteStatus Codes.
ProductId Confirmation of the ProductId sent on the quote request.
QuestionSetId The Question Set ID which your journey has been attached to; more specific than ProductId.
QuoteSessionId A unique reference for a group of linked quotes.
QuoteSessionContinuationUri v1 only - A URI to continue the session in our Quote & Buy journey.
QuoteRequestContinuationUri A URI to continue the QuoteRequest in our Quote & Buy journey.
QuoteDate The date and time the quote was created in our system.
QuoteExpiryDate The received quote can be applied for up to the Quote Expiry Date.
IsMultiTier If true, indicates that we have returned a broader range of Risk results than was requested. This is a feature of some products.
IsIndicativeQuote Confirmation of the value passed in the Quotes request message; if true, the quotes are "indicative" only and cannot be applied for.
CommissionSacrifice Confirmation of the value passed in the Quotes request message.
UserReference Confirmation of the value passed in the Quotes request message.
IptRate The rate of Insurance Premium Tax, as a decimal (e.g. 0.120 for 12%).
Quotes array See below.
Prices array See below.
Answers array See below.

Quotes array

For each insurer quote we receive, we return the following data:

Field Details
QuoteId A unique quote GUID. Use this in other API calls to retrieve documents and to apply for a quote.
InsurerName The customer-facing insurer name as will appear on customer documents.
ProductName The customer-facing product name as will appear on customer documents.
Cover For products that support multi-tier, this is a summary of the risk basis of each quote. The IsRequested flag will be true for the cover that exactly matches the quote request.
Premiums An array of Premiums, each one containing the payment type/frequency and a link to the relevant PriceId in the prices collection.
OriginalPremiums v2 only - If CommissionSacrifice is not zero, then the OriginalPremiums will be included, and contains references to the relevant PriceId which are untouched by the effect of CommissionSacrifice. See Version Notes.
Endorsements If one of our insurers returns an endorsement the text will be provided in the endorsements field for you display to your customer.

Prices array

For each unique PriceId returned in Quotes, we provide a breakdown of values relevant to the product:

Field Details
ID Each ID in the Prices array is referenced by a PriceId in the Premiums or OriginalPremiums array of the Quote object. These IDs are ephemeral and will not be the same between two responses, even if the Price data is the same.
Values The breakdown of values returned will be specific to the kind of product requested.

Answers array

We replay back to you the Answers which you submitted, and may include assumed (default) answers which we have filled in.

Field Details
InterfaceKey The key of the question.
Value The current answer value for the question.
Source One of "User", "Assumed" (v1), "Default" (v2), or "ThirdParty".
RepeatingQuestionSetIndex (When applicable) the ordered index to group together table data for Specified Items and Personal Possessions.

Continuation URI

For 'Partial Integrators', who wish to create a quote but transfer the user to our web journey to complete the Quote & Buy journey, we provide ContinuationUris in the Quotes response. As long as the User has activated their Adviser Hub account the URI provides a silent logon to our Quote & Buy application. You may encounter three types of ContinuationUris:

URI type Details
QuoteSessionContinuationUri v1 only - Returned in a successful Post and Get Quote response. The URI can be used to transfer the user to latest stage they were at in the quote journey. If multiple linked quotes exist the QuoteSessionContinuationUri will transfer the user to the latest quote created.
QuoteRequestContinuationUri Returned in a successful Post Quote response and in a Get Quote response providing neither the quote request nor any of its linked quotes have been applied for. The QuoteRequestContinuationUri will transfer the user to the latest point in the quote sent in the request.
QuickQuoteContinuationUri Returned in a successful Post QuickQuote response. The URI can be used to transfer the user to our web based Quote & Buy journey to confirm assumptions and continue to generate a full quote.

↓ Jump to next section

Create Partial Quote

JSON showing the IsPartialQuote parameter used to create a Partial Quote

{
  "ProductId": 1015,
  "BranchNumber": "AB102030",
  "IsPartialQuote": true,
  "CommissionSacrifice": 0,
  "Answers": [
    {
      "InterfaceKey": "CoverType",
      "Value": "BuildingsAndContents"
    }
  ]
}

There are two main reasons that you might build your integration to submit 'partial' quote requests:

  1. If you want to start a quote with a small amount of information, save it, and update it with more information when available.
  2. If you want to capture some information in your application, and transfer to our web frontend to complete the Quote & Buy journey.

If you set IsPartialQuote to true in a POST Quote request, then we skip part of the validation logic, so that the request is not refused, but instead returns a response where the QuoteStatus is INPROGRESS.

In the response, you will receive a QuoteRequestId and a QuoteSessionContinuationUri that you can use to transfer to our Quote & Buy journey to complete the remaining questions and obtain a full quote. When you transfer to our journey the answers you provided will be pre-populated.

See also IsPartialQuote parameter.

Update a Partial Quote

You can send updates to a Partial Quote by POSTing to the /Quote endpoint specifying the QuoteRequestId to be updated.

For example, to update the QuoteRequestId 641234, the endpoint is /Quote/641234.

You can use the update function to add more information to a QuoteRequest, or change answers previously sent. The update is not a differential; it will completely replace the existing answers for the QuoteRequest. If you exclude Answers from your update which were previously set, this will effectively remove them.

Create QuickQuote

Create a QuickQuote

POST https://apiuat.paymentshield.co.uk/QuickQuote/ HTTP/1.1
Content-Type: application/json
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

{
  "ProductId": 1015,
  "BranchNumber": "AB000000",
  "UseDefaults": true,
  "UseThirdPartyData": true,
  "CommissionSacrifice": 0,
  "Answers": [
    {
      "Value": "Carrie",
      "InterfaceKey": "Applicant1Forename"
    },
    {
      "Value": "Palmer",
      "InterfaceKey": "Applicant1Surname"
    },
    {
      "Value": "29/01/1993",
      "InterfaceKey": "Applicant1DoB"
    },
    {
      "Value": "93 Normal Street",
      "InterfaceKey": "InsuredAddressStreet"
    },
    {
      "Value": "PR8 1AA",
      "InterfaceKey": "InsuredAddressPostcode"
    },
    {
      "Value": "Southport",
      "InterfaceKey": "InsuredAddressTown"
    }
  ]
}

A QuickQuote is an indicative price which you can get by submitting less information about the customer. You can allow your customer to pick up their QuickQuote journey in our frontend using the QuickQuoteContinuationUri.

Today, QuickQuote is only implemented for Home Insurance.

You must supply the following answers as a minimum:

*See 'Third Party Property Data' below.

We add assumptions for all other mandatory questions in order to return a price. The assumptions we use are replayed back to you in the Quick Quote Response.

Please see the code pane for an example of QuickQuote request message.

Flexible Quick Quote

If you have more information available than the above list of minimum data requirements you can send additional answers. The more information you are able to provide in the quick quote request the more accurate the quote response will be.

Third Party Property Data

If you send the UseThirdPartyData parameter with a value of true in a POST QuickQuote request, you can omit the following three fields from the QuickQuote request:

We will use the address details sent in the request to call a third party data provider to source the property details which will then be added to the request.

If omitted, UseThirdPartyData defaults to false.

QuickQuotesResponse

We deliver a QuickQuotesResponse in response to both the 'Create' and 'Get' QuickQuote operations. This object has some differences from a normal QuotesResponse:

Error returned when unable to source ThirdPartyData

{
    "StatusCode": "NoDataWarning",
    "Messages": [
        {
            "MessageType": "Error",
            "Summary": "Sorry, we couldn't find any information for that property"
        }
    ]
}

If you send the UseThirdPartyData parameter with a value of true and we are unable to source the property data we will return an error response as per the example provided.

Edit Quote

You can create a new version of a quote linked to an existing QuoteRequestId by POSTing to the /Quote endpoint specifying the QuoteRequestId to link the new quote to.

For example, to create a new QuoteRequestId that is linked to the existing QuoteRequestId 645678, the endpoint is /Quote/645678.

Use the edit function to create variants of a quote for a single customer. As the quotes are Linked it is only possible to apply for one of them. This removes the chance of inadvertently creating multiple policies for a single customer.

The edit function creates a totally new QuoteRequestId so the request should include all required information and not just the answers that have been changed from the original.

Retrieve Quote

Retrieve a set of Quotes by QuoteRequestId

GET https://apiuat.paymentshield.co.uk/Quote/{QuoteRequestId} HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Retrieve a fully-hydrated Quote Response from a previously created quote. This allows you to show your user up-to-date quote state and whatever values they filled in originally. You can use this feature to resume a journey. Because we store the full quote information associated with a QuoteRequestId, you don't have to store full quote information in your database; you can look it up with this operation.

Pass the integer QuoteRequestId from the original Quote Response.

Linked Quotes

Example of LinkedQuotes in a GET Quote Response

{
    "StatusCode": "OK",
    "Messages": [],
    "CallChannelType": "External",
    "BranchNumber": "PS180092",
    "CoverSelections": {
        "BuildingsAD": "Excluded",
        "ContentsAD": "Excluded"
    },
    ...
    "LinkedQuotes": [
        {
            "QuoteRequestId": 5228538,
            "Link": "https://apiuat.paymentshield.co.uk/v2/Quote/5228538",
            "QuoteStatus": "QUOTESRETRIEVED",
            "QuoteDate": "2024-01-19T11:50:32.52",
            "QuoteRequestContinuationUri": "https://uat-quote.paymentshieldadviserhub.co.uk/?userId=123456&token=4b862c13-a2b7-473e-8687-1f9a71aaf702&quoteRequestId=5228538",
            "IsApplied": false
        },
        {
            "QuoteRequestId": 5228539,
            "Link": "https://apiuat.paymentshield.co.uk/v2/Quote/5228539",
            "QuoteStatus": "QUOTESRETRIEVED",
            "QuoteDate": "2024-01-19T11:52:37.617",
            "QuoteRequestContinuationUri": "https://uat-quote.paymentshieldadviserhub.co.uk/?userId=123456&token=4b862c13-a2b7-473e-8687-1f9a71aaf702&quoteRequestId=5228539",
            "IsApplied": false
        }
    ],
    ...
}

There are two ways to create linked quotes:

  1. When your user transfers to our Quote & Buy journey (using one of the above continuation URIs), it is possible for them to use features on our website to create variations of the quote.
  2. Using the Edit Quote function to create a new variant of a quote linked to another QuoteRequestId.

In both cases, each quote variant is given its own unique QuoteRequestId. We will return details of all linked quotes when you next perform a Get Quote request. Please see the code pane for an example where the user has created three linked quotes and has applied for a quote within 640113. Note that each QuoteRequestId has its own QuoteStatus. Only one of the linked quotes can have a status of SUBMITTED.

QuoteStatus Codes

You may encounter the following QuoteStatus codes in a Get Quote response:

QuoteStatus Meaning
INPROGRESS A quote has been started in our system but not yet been submitted for pricing.
QUOTESRETRIEVED The Quote Request has been submitted for pricing and prices have been returned.
SUBMITTED One of the quotes returned under the Quote Request ID has been applied for.
UNABLETOQUOTE The Quote Request has been submitted for pricing but we have been unable to return a quote.

Retrieve QuickQuote

Retrieve a QuickQuote the same way you retrieve a Quote

GET https://apiuat.paymentshield.co.uk/Quote/{QuoteRequestId} HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

You can retrieve a QuickQuote the same way you would Retrieve a quote, passing the integer QuoteRequestId from the original QuickQuote Response.

If the user has progressed a QuickQuote by adding information, so that it now has many prices, then we return a full QuotesResponse.

Search Quotes

Search for Quotes by UserReference

GET https://apiuat.paymentshield.co.uk/Quotes/?UserReference=YourRef_123 HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Example of GET Quotes response

{
    "StatusCode": "OK",
    "Messages": [
        {
            "MessageType": "ResultsLimited",
            "Summary": "We've limited the number of results to 100"
        }
    ],
    "Results": [
        {
            "QuoteRequestId": 634560,
            "Link": "https://apiuat.paymentshield.co.uk/Quote/634560",
            "QuoteStatus": "SUBMITTED",
            "QuoteDate": "2020-01-30T11:20:31.343",
            "Applicant1Surname": "Matip",
            "Applicant1DoB": "1970-05-01T00:00:00+01:00",
            "Postcode": "PR9 0SL",
            "ProductId": "1008",
            "ApplicationRef": "PSL-INT-9005780"
        },
        {
            "QuoteRequestId": 634562,
            "Link": "https://apiuat.paymentshield.co.uk/Quote/634562",
            "QuoteStatus": "SUBMITTED",
            "QuoteDate": "2020-01-30T11:20:59.373",
            "Applicant1Surname": "Robertson",
            "Applicant1DoB": "1989-05-01T00:00:00+01:00",
            "Postcode": "PR8 3AE",
            "ProductId": "1008",
            "ApplicationRef": "PSL-INT-9005782"
        },
        {
            "QuoteRequestId": 640753,
            "Link": "https://apiuat.paymentshield.co.uk/Quote/640753",
            "QuoteStatus": "QUOTESRETRIEVED",
            "QuoteDate": "2020-02-11T13:23:58.13",
            "Applicant1Surname": "Becker",
            "Applicant1DoB": "1986-05-01T00:00:00+01:00",
            "Postcode": "PR9 0SL",
            "ProductId": "1008",
            "QuoteRequestContinuationUri": "https://uat-quote.paymentshieldadviserhub.co.uk/?userId=123456&token=4b862c13-a2b7-473e-8687-1f9a71aaf702&quoteRequestId=640753"
        },
        ...
}

Use the GET Quotes (plural) endpoint to search for quotes based on different criteria. Pass the criteria in the querystring of the GET request (see example)

Supported Fields

Currently we support the following fields as search criteria:

Field Definition
UserReference Your reference attached to the quote using the UserReference field

Use the GET Quotes endpoint specifying a UserReference to get a list of quotes with a matching UserReference value. You must provide the full reference, not a fragment or wildcard.

We will return details of all quotes that have a UserReference matching the request. In the example provided, all quotes with a UserReference of 'YourRef_123' will be returned in the response.

Please see the code pane for an example of the JSON response. In the example used, the search has returned more than 100 results. We will only return the first 100 results in the response.

We return some key information about each QuoteRequest to help you to identify the quote required. You can use the Link returned in the response to make a GET Quote request to retrieve the fully-hydrated quote response.

Apply

POST https://apiuat.paymentshield.co.uk/Quote/{QuoteId}/Apply HTTP/1.1
Content-Type: application/json
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

{
  "UseDefaults": true,
  "CommissionSacrifice": 0.0,
  "Answers": [
    {
      "Value": "01/10/2019",
      "InterfaceKey": "PolicyStartDate"
    },
    {
      "Value": "01704555444",
      "InterfaceKey": "Applicant1TelNo"
    },
    {
      "Value": "Online",
      "InterfaceKey": "DocumentDeliveryPreference"
    },
    {
      "Value": "[email protected]",
      "InterfaceKey": "Applicant1EmailAddress"
    },
    {
      "Value": "Advised",
      "InterfaceKey": "BasisOfAdvice"
    },
    {
      "Value": "TCTest01",
      "InterfaceKey": "YourRef"
    },
    {
      "Value": "DirectDebit",
      "InterfaceKey": "PaymentMethod"
    },
    {
      "Value": "Annual",
      "InterfaceKey": "PaymentFrequency"
    },
    {
      "Value": "Mr T Tester",
      "InterfaceKey": "BankAccountName"
    },
    {
      "Value": "101010",
      "InterfaceKey": "BankSortCode"
    },
    {
      "Value": "12345678",
      "InterfaceKey": "BankAccountNo"
    },
    {
      "Value": "First",
      "InterfaceKey": "DirectDebitDate"
    }
  ]
}

You can apply for an existing Quote by POSTing to the Apply action on the quote resource, passing answers for the 'Application Stage' questions.

v1

To apply for the quote with QuoteId cbf8196c-7757-49a9-8511-c5abf6b4b1c6, the endpoint would be /Quote/cbf8196c-7757-49a9-8511-c5abf6b4b1c6/Apply

There are fewer fields on the Apply Request than the Quote Request because you are already in the scope of a single quote. The fields are:

v2

To apply for the quote with QuoteId cbf8196c-7757-49a9-8511-c5abf6b4b1c6, the endpoint would be /v2/Quote/cbf8196c-7757-49a9-8511-c5abf6b4b1c6/Apply

Fields:

The UseDefaults field was removed for v2. It is always active.

Apply Response

The Apply Response resembles the Quote Response, with many of the same fields.

On successful application, the QuoteStatus will be SUBMITTED. If the request fails, the status will stay at QUOTESRETRIEVED.

An example is given in the Apply Webhook section.

Document Service

You can use the Document Service to get a list of the Documents available for a customer's Quote (or QuoteRequest), and to retrieve the individual documents themselves. Documents are always PDFs but you can choose to receive them as either a Base64 stream or raw PDF bytes (with an application/pdf content-type).

Use GET when requesting lists and documents from the Document Service.

Get Documents List

Get a list of Documents by QuoteRequestId

GET https://apiuat.paymentshield.co.uk/Documents/{QuoteRequestId} HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Get a list of Documents by QuoteId

GET https://apiuat.paymentshield.co.uk/Documents/?quoteId={QuoteId:GUID} HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Returns a list of documents for the given QuoteRequestId or QuoteId

Example response

{
  "StatusCode": "OK",
  "Messages": [],
  "Documents": [
    {
      "QuoteRequestId": 633360,
      "Name": "Policy Booklet",
      "Code": "terms",
      "Type": "static",
      "Link": "https://apiuat.paymentshield.co.uk/Document/terms/633360.pdf"
    },
    {
      "QuoteRequestId": 633360,
      "Name": "Insurance Product Information Document",
      "Code": "ipid",
      "Type": "static",
      "Link": "https://apiuat.paymentshield.co.uk/Document/ipid/633360.pdf"
    },
    {
      "QuoteRequestId": 633360,
      "Name": "All Quotes Summary",
      "Code": "multiquote",
      "Type": "dynamic",
      "Criteria": {
        "BuildingsCoverLevel": 500000,
        "ContentsCoverLevel": 50000,
        "BuildingsAD": "Excluded",
        "ContentsAD": "Excluded"
      },
      "Link": "https://apiuat.paymentshield.co.uk/Document/multiquote/633360.pdf?adb=excluded&adc=excluded&bcl=500000&ccl=50000"
    },
    ...
    {
      "QuoteRequestId": 633360,
      "Name": "All Quotes Summary",
      "Code": "multiquote",
      "Type": "dynamic",
      "Criteria": {
        "BuildingsCoverLevel": 1000000,
        "ContentsCoverLevel": 75000,
        "BuildingsAD": "Included",
        "ContentsAD": "Included"
      },
      "Link": "https://apiuat.paymentshield.co.uk/Document/multiquote/633360.pdf?adb=included&adc=included&bcl=1000000&ccl=75000"
    },
    {
      "QuoteId": "37b322f5-8240-48a5-b362-000bddb544b3",
      "QuoteRequestId": 633360,
      "Name": "Quote and Application Summary",
      "Code": "qas",
      "Type": "dynamic",
      "Link": "https://apiuat.paymentshield.co.uk/Document/qas/37b322f5-8240-48a5-b362-000bddb544b3.pdf"
    },
    {
      "QuoteId": "37b322f5-8240-48a5-b362-000bddb544b3",
      "QuoteRequestId": 633360,
      "Name": "Statement of Demands and Needs",
      "Code": "sdn",
      "Type": "dynamic",
      "Link": "https://apiuat.paymentshield.co.uk/Document/sdn/37b322f5-8240-48a5-b362-000bddb544b3.pdf"
    },
    {
      "QuoteId": "37b322f5-8240-48a5-b362-000bddb544b3",
      "QuoteRequestId": 633360,
      "Name": "Quote Summary",
      "Code": "quote",
      "Type": "dynamic",
      "Criteria": {
        "PaymentFrequency": "monthly"
      },
      "Link": "https://apiuat.paymentshield.co.uk/Document/quote/monthly/37b322f5-8240-48a5-b362-000bddb544b3.pdf"
    },
    {
      "QuoteId": "37b322f5-8240-48a5-b362-000bddb544b3",
      "QuoteRequestId": 633360,
      "Name": "Quote Summary",
      "Code": "quote",
      "Type": "dynamic",
      "Criteria": {
        "PaymentFrequency": "annual"
      },
      "Link": "https://apiuat.paymentshield.co.uk/Document/quote/annual/37b322f5-8240-48a5-b362-000bddb544b3.pdf"
    },
    ...
    {
      "QuoteId": "b6cfed8a-b9ce-4035-98a8-f5d0da449c3e",
      "QuoteRequestId": 633360,
      "Name": "Quote Summary",
      "Code": "quote",
      "Type": "dynamic",
      "Criteria": {
        "PaymentFrequency": "annual"
      },
      "Link": "https://apiuat.paymentshield.co.uk/Document/quote/annual/b6cfed8a-b9ce-4035-98a8-f5d0da449c3e.pdf"
    }
  ]
}

To get the documents list by QuoteRequestId, make a GET request to /Documents/{QuoteRequestId}, like /Documents/4812345.

A quote request has many quotes. To get the documents for an individual quote, make a GET request to /Documents/?quoteId={QuoteId} where the QuoteId is the long GUID of a quote, like /Documents/?quoteId=ebff7102-0fb7-4856-b8ae-caf208834bdf

Response fields

Like all other response types from our API, there will be StatusCode and Messages array at the top of the response.

Within each entry in the documents list:

Document Codes

The valid options for document Code are listed below:

Code Significance and other names
quote Quote Summary (Price Summary)
ipid Insurance Product Information Document, or IPID (Policy Summary)
terms Policy Booklet (Terms and Conditions)
sdn Statement of Demands and Needs. Only available when the QuoteStatus is SUBMITTED
qas Quote and Application Summary. Only available when the QuoteStatus is SUBMITTED
cofc Confirmation of Cover. Tenants Contents only, available when the QuoteStatus is SUBMITTED
multiquote All Quotes Summary (Multiple Price Summary)

Differences in retrieving docs by QuoteRequest or Quote

A QuoteRequest may have many quotes. This means there could be more entries of certain document types when you get the list for an entire QuoteRequest compared to that for an individual QuoteId. This is summarised in the table below:

Document For QuoteRequest For Quote
IPID Always one entry Always one entry
Terms Always one entry Always one entry
Quote One entry for each QuoteId in the QuotesResponse One entry for the specified quote
Multiquote One entry, aggregating all the qualifying quotes None
QAS One, for the applied-for quote One, for the applied-for quote
SDN One, after applying for a quote One, after applying for a quote
COfC One, after applying for a quote One, after applying for a quote

Get Document

Your primary way to discover Get Document links is to follow those returned in a Documents list response.

GET https://apiuat.paymentshield.co.uk/Document/quote/monthly/37b322f5-8240-48a5-b362-000bddb544b3.pdf HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

You can use the Link returned for each document to retrieve the document as a PDF, which will load with content-disposition:attachment. You can request the document as a base64 string by removing .pdf from the Link.

You can also construct a Get Document request string if you know the QuoteRequestId or QuoteId and you know which document you want to retrieve:

Document Request string
IPID https://apiuat.paymentshield.co.uk/Document/ipid/{QuoteRequestId}
Terms https://apiuat.paymentshield.co.uk/Document/terms/{QuoteRequestId}
Quote https://apiuat.paymentshield.co.uk/Document/quote/{PaymentFrequency}/{QuoteId}
QAS https://apiuat.paymentshield.co.uk/Document/qas/{QuoteId}
SDN https://apiuat.paymentshield.co.uk/Document/sdn/{QuoteId}
COfC https://apiuat.paymentshield.co.uk/Document/cofc/{QuoteId}

PaymentFrequency

Please note that there are payment frequencies named Monthly2MonthsFree and Monthly3MonthsDeferred. One is a 10-month payment plan, and the other is a 9-month payment plan. "Deferred" is the correct language as the total amount paid is still the same as if it were paid in 12 months. The word 'Free' is retained due to internal implementation, but both should be considered as "deferred" payment plans.

Build SDN

Build an SDN

POST https://apiuat.paymentshield.co.uk/SDN/4786184 HTTP/1.1
Content-Type: application/json
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

{
  "Sections" : [
    {
      "InterfaceKey" : "YourDemandsAndNeeds",
      "Statements" : [
        "Allows you to utilise your no claims discount",
        "Covers your home from loss or damage"
        ]
    },
    {
      "InterfaceKey" : "SuitabilityReasons",
      "Statements" : [
        "Is competitively priced",
        "Includes Personal Possessions cover"
        ]
    }
  ]
}

A Statement of Demands and Needs (SDN) document contains a number of statements about the suitability of the product to the customer.

If your API login is an Advised user, you must build SDN documents by selecting statements appropriate for the customer before you can download the document.

When creating an SDN using our API, it's your choice as to what free text goes into these demands and needs, but for reference and feature parity with Adviser Hub, you can use the /Catalogue/SdnTemplate endpoint to get the default list of statements used by Paymentshield.

POST to /SDN/{QuoteRequestId} with a list of Sections as shown in the code pane example. The InterfaceKey elements must match with those from the SdnTemplate request for the product. Looking at the SdnTemplate response will also help you as the developer to understand what sentences are being finished by the bullets you submit. I.E. "YourDemandsAndNeeds" statements complete the sentence beginning "Find insurance that:..."

The Statements element is a simple array of strings, and you can submit any strings here that accurately describe your customers needs.

If you POST more than once to the SDN for a QuoteRequestId, it will have act as a complete overwrite of all statements in all sections, as though the most recent POST were the only one you submitted.

After you have built the SDN with this function, you will be able to see it in the GET /Documents/ list and will be able to download it from GET /Document/SDN/{QuoteRequestId}.

Catalogue Service

You can use the Catalogue Service to retrieve industry and occupation lists. You can also retrieve lists of valid Branch Number and associated maximum commission sacrifice levels for a user.

Industries

Example industry request without filter

GET https://apiuat.paymentshield.co.uk/industries HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Example industry request with filter

GET https://apiuat.paymentshield.co.uk/industries/get?filter=fish HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

When a question set includes a question for industry you must send the correct ABI code.

You can use the Get Industries endpoint to return a list of valid industry codes and associated descriptions.

You can add a filter to the request.

Please see the code pane for example requests. Note that in the second request we will return all industries that include the word 'Fish' in the description.

Occupations

Example occupations request without filter

GET https://apiuat.paymentshield.co.uk/occupations HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Example Occupations request with filter

GET https://apiuat.paymentshield.co.uk/occupations/get?filter=carpet HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

When a question set includes a question for occupation you must send the correct ABI code.

You can use the Get Occupations endpoint to return a list of valid occupation codes.

You can add a filter to the request.

Please see the code pane for example requests. Note that in the second request we will return all occupations that include the word 'Carpet' in the description.

Products

You can use the Get Products request to return a list of valid Branch Numbers and associated maximum commission sacrifice values for a specified userId.

Example Products request

GET https://apiuat.paymentshield.co.uk/products HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

Products Response

Example Products Response

[
    {
        "WebProductGroupId": 1015,
        "Branches": [
            {
                "BranchNo": "PS123456",
                "MaxSacrificeLevel": 0
            },
            {
                "BranchNo": "PS123457",
                "MaxSacrificeLevel": 25
            }
        ]
    },
    {
        "WebProductGroupId": 1014,
        "Branches": [
            {
                "BranchNo": "PS123456",
                "MaxSacrificeLevel": 0
            },
            {
                "BranchNo": "PS123457",
                "MaxSacrificeLevel": 25
            }
        ]
    }
]

You should use the GET Products request to return a list of products the UserId is authorised to sell and the Branch Numbers they can sell them under. We will also return the MaxSacrificeLevel for the UserId/Branch Number combination.

Please see the Code Pane for an example of a Products Response.

Note that the example response shows that UserId 123456 is authorised to sell ProductIds 1015 (Home Insurance) and 1014 (Tenants Contents) under two Branch Numbers. Under Branch Number PS123457 the user has a maximum commission sacrifice level of 25%

SDN Templates

Get SDN Templates for a submitted QuoteRequest

GET https://apiuat.paymentshield.co.uk/sdntemplate/6543211 HTTP/1.1
UserId: 123456
Token: 9c92d88f-d28f-4eb6-8e69-f96707113544
SystemId: 56cba828-1376-4ced-96d4-11a950e4afe8

A Statement of Demands and Needs (SDN) document contains a number of statements which users can choose to agree are important to them. When creating an SDN using our API, it's your choice as to what free text goes into these demands and needs, but for reference and feature parity with Adviser Hub, you can use the SdnTemplate endpoint to get the default list of statements used by Paymentshield.

Make a GET request to /SdnTemplate/{QuoteRequestId}

We require QuoteRequestId to fetch the appropriate SDN statements for that product, and to make sure that the quote you are talking about has really been submitted, as this is the only state where SDN generation is valid.

SdnTemplate Response

Example SdnTemplate response

{
    "StatusCode": "OK",
    "Messages": [],
    "WebProductGroupId": 1015,
    "Sections": [
        {
            "InterfaceKey": "YourDemandsAndNeeds",
            "Title": "YOUR DEMANDS AND NEEDS",
            "SubText": "Find insurance that:",
            "SortOrder": 1,
            "TemplateStatements": [
                {
                    "Text": "Allows you to utilise your no claims discount",
                    "SortOrder": 1
                },
                {
                    "Text": "Covers your home from loss or damage",
                    "SortOrder": 2
                },
                ...
            ]
        },
        ...
    ]
}

An example response is listed in the code pane.

The response consists mainly of a list of Sections. The InterfaceKey corresponds to what you will send to the POST /SDN/ endpoint, and the list of TemplateStatements are the texts used by Paymentshield. The SortOrder properties for this response are informational only and you can choose whether or not to use them. The SortOrder of the Sections is used on the final PDF document so it can be helpful to show users this order during document construction.

Referrals API

You can use the Referrals API to submit contact and property data for your customer as a 'Lead'. This means that we can send them an indicative price, and follow up by phone or email to complete a Quote & Buy journey.

The Referrals API follows our General API Principles and has the same responses for Error Handling.

Referrals Environments and URLs

The code samples on this page use the UAT environment, which you should use to develop your integration. When you go to production, use the Live environment, which will create real Leads and indicative quotes in our live system.

Environment Base URL
UAT https://uat-referralsapi.paymentshield.co.uk
Live https://referralsapi.paymentshield.co.uk

Referral Types

You can create a Referral with one of our two channels:

This string is submitted in the ReferralType field of the Create Lead request.

Overview

You will need:

Process

Reference Data

Preferred Contact Times Response

{
    "value": [
        {
            "id": 1,
            "from": "09:00:00",
            "to": "11:00:00",
            "maxCapacity": 32
        },
        // ...
        {
            "id": 4,
            "from": "15:00:00",
            "to": "17:00:00",
            "maxCapacity": 24
        }
    ],
    "statusCode": 200,
    "success": true,
    "message": null,
    "showMessageOnUI": false
}

You can fetch and cache this reference data. We recommend a cache duration of 24 hours.

GET PreferredContactTime

Your Create Lead request must contain one or more preferredContactTimes. This public API provides the valid options.

Make a GET request to /PreferredContactTime

When you submit a preferredContactTime on a Lead, you can use one of the objects from this array verbatim, although only the from and to properties are required.

GET CoverType

Cover Type Response

{
    "value": [
        {
            "id": 1,
            "name": "Home Insurance",
            "description": null,
            "productId": 1015
        },
        {
            "id": 2,
            "name": "Landlord's Insurance",
            "description": null,
            "productId": 1009
        }
    ],
    "statusCode": 200,
    "success": true,
    "message": null,
    "showMessageOnUI": false
}

Your Create Lead request must contain one or more coverTypeIds. This public API provides the valid options.

Make a GET request to /CoverType

When submitting a Lead, the coverTypeIds is an array of one or more integers from the id fields of CoverType entities. On our user interface, the name is used as checkbox text, and the id is used as the submitted value when selecting one or more products.

GET MortgageCategory

Mortgage Category Response

{
    "total": 5,
    "value": [
        {
            "id": 1,
            "name": "Remortgage"
        },
        {
            "id": 2,
            "name": "Home Mover"
        },
        {
            "id": 3,
            "name": "First-Time Buyer"
        },
        // ...
    ],
    "statusCode": 200,
    "success": true,
    "message": null,
    "showMessageOnUI": false
}

Your Create Lead request must contain a mortgageCategoryId. This public API provides the valid options.

Make a GET request to /MortgageCategory.

When submitting a Lead, the mortgageCategoryId must be set to one of the numeric IDs from this response.

↓ Jump to next section

Answer Data

When you create an Online lead, you can submit additional "answers" using the quickQuoteAnswers object.

All answers are optional and serve two purposes:

Create Lead Request (online, with QuickQuoteAnswers)

{
    "agreement": true,
    "introducerCode": "ABC123",
    "firstName": "Jack",
    "lastName": "Nguyen",
    "phoneNumber": "07712345678",
    "email": "[email protected]",
    "preferredContactMethodCode": "Email",
    "referralType": "Online",
    "quickQuoteAnswers": {
        "Applicant1DoB": "20/01/1990",
        "InsuredAddressPostCode": "PR81AA",
        "InsuredAddressStreet": "128 Lord Street",
        "InsuredAddressTown": "Southport"
    }
}

Answer fields - Home product

You can use our Question Set explorer tool to view validations and valid options:

Question Set 167

All answer values are submitted as JSON strings and converted to their data types by our platform.

Field Example Notes
CoverType "BuildingsAndContents" Valid option string from Question Set
Applicant1Title "Mr" Valid option string from Question Set
Applicant1DoB "20/01/1990" UK format date
Applicant1Occupation "A01" ABI code
Applicant1Industry "001" ABI code
SecondApplicantIncluded "false" Boolean as string
Applicant2Title Like Applicant1, above
Applicant2Forename "
Applicant2Surname "
Applicant2DoB "
Applicant2Occupation "
Applicant2Industry "
InsuredAddressPostCode "PR8 4AR"
InsuredAddressStreet "13 Liverpool Road"
InsuredAddressDistrict "Birkdale" Sub-division of town, if applicable
InsuredAddressTown "Southport"
InsuredAddressCounty "Merseyside"
PropertyType "Terraced"
BuildYear "1940" Valid year integer as string
NumberOfBedrooms "Two" Valid option string from Question Set
NumberOfBathrooms "One" "
WallConstruction "Brick" "
RoofConstruction "Tile" "
NumberOfAdults "Two" "
NumberOfChildren "One" "
NoClaimsBuildings "One" "
NoClaimsContents "Six" "
BuildingsCoverLevel "OneMillion" If submitted, "OneMillion" is the only valid option
AccidentalDamageBuildings "true" Boolean as string
AccidentalDamageContents "true" "
HomeEmergency "true" "
LegalExpenses "true" "
ExcessBuildings "OneHundred" Valid option string
ExcessContents "TwoHundred" "
ContentsCoverLevel "SeventyFiveThousand" "
UseCorrespondenceAddress Reserved for Future Use (RFU)*
CorrespondencePostCode RFU
CorrespondenceStreet RFU
CorrespondenceDistrict RFU
CorrespondenceTown RFU
CorrespondenceCounty RFU
MortgageLender RFU
MortgageStartDate RFU
SolicitorName RFU
SolicitorAddressPostCode RFU
SolicitorAddressStreet RFU
SolicitorAddressDistrict RFU
SolicitorAddressTown RFU
SolicitorAddressCounty RFU
EmailAcceptToSolicitor RFU
EmailNotificationToSolicitor RFU
SolicitorEmailAddress RFU

Notes

*The answers marked "RFU" are accepted, but we are currently not able to pre-fill these answers onto the quote. They may be read by future developments.

Applicant1FirstName and Applicant1LastName are automatically filled with the FirstName and LastName values from the Lead, so you should not send answers to these questions.

OwnershipProperty is automatically set to 'OwnedMortgaged'.

ResidentialStatus is automatically set to the value indicated by the MortgageCategoryId on the Lead, so you should not send an answer to this question.

Create Lead

Create Lead request (telephony)

POST https://uat-referralsapi.paymentshield.co.uk/Lead/Crm/CreateLead HTTP/1.1
Content-Type: application/json
CrmKey: 90D4DB2C-4195-4E9B-A97E-CC4BCED58B70

{
    "agreement": true,
    "introducerCode": "ABC123",
    "firstName": "Ada",
    "lastName": "DeLancie",
    "phoneNumber": "07712345678",
    "email": "[email protected]",
    "coverTypeIds": [1],
    "referralType": "Telephony",
    "preferredContactDate": "2024-04-26",
    "preferredContactTimes": [
        {
            "from": "09:00:00",
            "to": "11:00:00"
        }
    ]
}

Make a POST request to /Lead/Crm/CreateLead

Headers

We require the CrmKey HTTP header to authenticate your request, and associate it with your integrating system. This is the secret GUID provided by your account manager. Treat it like a password. The header value is not case-sensitive.

Body

The body of your request should be a JSON object with the following fields:

Field Channel Validation
IntroducerCode Telephony, Online Required, 6 characters, [A-Za-z0-9], exists in PSL system.
ReferralType Telephony, Online Required, string value of "telephony" or "online" (case insensitive).
FirstName Telephony, Online Required, 2-50 characters, [a-zA-Z\s-'].
LastName Telephony, Online Required, 2-50 characters, [a-zA-Z\s-'].
Email Telephony, Online Required, Up to 255 characters, standard email regex.
PhoneNumber Telephony, Online Required, 9-15 characters, beginning 01, 02, 03, or 07. Numeric and space only.
AdditionalDetails Telephony, Online Optional, up to 255 chars. Rejects potentially harmful characters.
Agreement Telephony, Online Required, boolean field indicating consent.
MortgageCategoryId Telephony, Online Optional, a valid ID from MortgageCategory reference data.
CoverTypeIds Telephony* Required, at least one valid option from CoverType reference data.
PreferredContactDate Telephony Required, format yyyy-MM-dd, today or future date up to one year away.
PreferredContactTimes Telephony Required, at least one valid option from PreferredContactTime reference data.
ExchangeDate Online Optional, format yyyy-MM-dd, today or future date up to one year away.
PreferredContactMethodCode Online Required, string value of "sms" or "email" (case insensitive).
QuickQuoteAnswers Online Optional, see Answer Data section above.

*Currently required only on Telephony journey because Online journey is single product.

Create Lead Response

Telephony success response

{
    "contactTimes": [
        {
            "from": "09:00:00",
            "to": "11:00:00"
        }
    ],
    "leadId": 6088,
    "quoteReference": null,
    "statusCode": "OK",
    "messages": []
}

The response will always be a JSON object with a StatusCode and a Messages property. These conform to our general Error Handling across all APIs.

Field Notes
StatusCode String indicating success or failure of the operation. Broadly categorises failure reason to the same granularity as the HTTP response code.
Messages An array of objects containing failure detail (see Referrals Client Errors below)
LeadId When we successfully create a lead, this will be its integer ID. You may choose to save this to DB for your records and future correlation.
QuoteReference When we successfully create an indicative quote, this will be its Quote Reference string. You may choose to save this.
ContactTimes When we successfully create a telephony lead, the actually allocated contact time will be returned in this field in the same format it was submitted.

Success Response

The StatusCode will be "OK" and the response will contain a LeadId and QuoteReference.

The response does not contain the indicative quote price. This is sent privately by Email or SMS (whichever was selected as preferredContactMethod) to the customer.

Referrals Client Errors

Create Lead - Client error response

{
    "leadId": null,
    "quoteReference": null,
    "statusCode": "ClientError",
    "messages": [
        {
            "propertyName": "IntroducerCode",
            "errorMessage": "Introducer code must not be blank. Please contact your distributor to get this code."
        },
        {
            "propertyName": "PhoneNumber",
            "errorMessage": "Sorry, we can't store a phone number with less than 9 number characters."
        }
    ]
}

The message objects have propertyName and errorMessage fields. You will receive one of these objects for each error in your submitted request. See code pane for example.

PreferredContactTimes unavailable

Create Lead - error response with timeslot suggestions

{
    "leadId": null,
    "quoteReference": null,
    "statusCode": "ClientError",
    "messages": [
        {
            "propertyName": "PreferredContactTimes",
            "errorMessage": "Sorry, there are no appointments available at the times you selected. Please see the list of suggestions.",
            "sameDayAvailableTimes": [
                {
                    "from": "09:00:00",
                    "to": "11:00:00"
                },
                {
                    "from": "11:00:00",
                    "to": "13:00:00"
                },
                {
                    "from": "13:00:00",
                    "to": "15:00:00"
                },
                {
                    "from": "15:00:00",
                    "to": "17:00:00"
                }
            ],
            "otherDayAvailableTimes": [
                {
                    "date": "2024-03-06T00:00:00",
                    "times": [
                        {
                            "from": "17:00:00",
                            "to": "18:00:00"
                        }
                    ]
                },
                {
                    "date": "2024-03-07T00:00:00",
                    "times": [
                        {
                            "from": "17:00:00",
                            "to": "18:00:00"
                        }
                    ]
                },
                {
                    "date": "2024-03-08T00:00:00",
                    "times": [
                        {
                            "from": "17:00:00",
                            "to": "18:00:00"
                        }
                    ]
                }
            ]
        }
    ]
}

On a telephony lead, it's possible that your selected contact date and time is unavailable. In this case, we will return a special client error with two lists of suggested times. See code pane.

The format of the error is:

To correct the error, choose one of the sameDayAvailableTimes or otherDayAvailableTimes and re-submit your Create Lead request.

Webhooks

About our Webhooks

If you need to know when a quote has been submitted through Adviser Hub, you can ask to be included in our webhooks system.

Once you subscribe, we can notify your chosen server URL when certain events happen in our system. Currently the only notifiable event is when a policy is applied for (submitted).

Please get in touch with your technical contact to arrange this, and they will ask for your webhook URL, and a notification email address for when something goes wrong. These settings are scoped to your SystemId. We will send you a secret, which is a GUID specific to your integration.

Trust

Our webhook payloads include an additional header, X-Paymentshield-Secret which will contain the GUID secret shared with you earlier. You can use this as a security measure to make sure that the webhook payload is coming from us.

Apply Webhook

An example of an Apply Response that would be sent to your webhooks endpoint

{
    "StatusCode": "OK",
    "Messages": [],
    "QuoteRequestId": 5228576,
    "QuoteReference": "PSL-BCHI-5228576",
    "ApplicationReference": "PSL-INT-6021848",
    "QuoteStatus": "SUBMITTED",
    "ProductId": "1015",
    "QuoteSessionId": "a8cafcc8-8c35-44ab-b84d-21ce6b2401ca",
    "QuoteRequestContinuationUri": "https://uat-quote.paymentshieldadviserhub.co.uk/?userId=123456&token=12399b8f-db95-4091-b37f-d82e80a0290d&quoteRequestId=5228576",
    "QuoteDate": "2024-01-19T14:03:02+00:00",
    "QuoteExpiryDate": "2024-07-17T00:00:00+01:00",
    "CommissionSacrifice": 0.0,
    "LinkedQuotes": [
        {
            "QuoteRequestId": 5228575,
            "Link": "https://apiuat.paymentshield.co.uk/v2/Quote/5228575",
            "QuoteStatus": "QUOTESRETRIEVED",
            "QuoteDate": "2024-01-19T14:00:47.707",
            "IsApplied": false
        }
    ],
    "Quote": {
        "QuoteId": "9f1a6042-f2da-470c-bf08-2e8fe1737fcf",
        "InsurerName": "ABC",
        "ProductName": "Home Insurance",
        "QuoteExpiryDate": "2024-07-17T00:00:00",
        "Cover": {
            "IsRequested": true,
            "BuildingsAD": "Excluded",
            "ContentsAD": "Excluded",
            "BuildingsCoverLevel": 1000000.0,
            "ContentsCoverLevel": 75000.0
        },
        "Premiums": [
            {
                "PaymentMethod": "DirectDebit",
                "PaymentFrequency": "Annual",
                "PaymentFrequencyDescription": "Annually",
                "PriceID": "08074ef6"
            }
        ],
        "Endorsements": []
    },
    "Price": {
        "ID": "08074ef6",
        "Values": {
            "TotalCostPerPaymentPeriod": 416.37,
            "TotalPremiumIncludingIPT": 416.37,
            "TotalPremiumExcludingIPT": 375.62,
            "AdministrationCharge": 36.00,
            "InsurancePremiumTax": 40.75,
            "HouseholdInsurancePremiumExcludingIPT": 339.62,
            "HomeEmergencyPremiumExcludingIPT": 0.0,
            "LegalExpensesPremiumExcludingIPT": 0.0,
            "BuildingsCoverGrossExcludingIPT": 216.75,
            "ContentsCoverGrossExcludingIPT": 122.87,
            "PersonalCoverGrossExcludingIPT": 0.00,
            "TotalAmountPayable": 416.37
        }
    },
    "Answers": [
        ...
    ]
}

When you are subscribed to the Apply action and a policy for your SystemId is submitted, we will:

If we don't receive the expected response, you should receive an error notification email, and the system will retry on a backing-off basis. The latter is a work in progress.

You can use the Apply Response to update the status of the quote in your system. You can also take it as notification that the final documents, such as QAS and SDN, are available to download.

Question Sets

Browse products and Question Sets with the following table and filters. Click on a QSID to go to our Question Set Explorer tool, which has information about the required Answers and their criteria.

Filters

Products:

Terms:

API Versions:

Results

QSID Product Journey Payment Terms
{{ qs.id }} {{ labelFor(qs.pId) }} {{ qs.journey }} {{ termsFor(qs.isVc) }}

*Additional payment plans: Inclusion of a 9 or 10 month PaymentFrequency suitable for vulnerable customers (VC).

Reduced Question Set Defaults

If you are using the Refreshed Home Product (1015) Question Set with the v2 API, and you get quotes without setting the following answers, they will use the following Default values:

Defaults and Rules for 166/167

Question Condition Defaulted Value
BuildingsCoverLevel OneMillion
ContentsCoverLevel NumberOfBedrooms > 6 OneHundredThousand
ContentsCoverLevel NumberOfBedrooms <= 6 SeventyFiveThousand
ContentsCoverLevel OwnershipProperty == Rented TwentyThousand
AccidentalDamageBuildings false
AccidentalDamageContents false
ExcessBuildings TwoHundredAndFifty
ExcessContents TwoHundredAndFifty
ContentsItemsToSpecify false
PersonalPossessionsToSpecify false
PersonalPossessionsTotalAmount Zero
LegalExpenses false
HomeEmergency false
PreviousClaim false

Postman and Swagger/OpenAPI

Postman Collections

These collections are specific to a product but will have some value if you are implementing another product.

Product API Version File
Home (Refresh) 1015 v2 Paymentshield REST API - Home

Usage

Swagger/OpenAPI Definition

Last updated: 2024-01-22

API version: 2024-01-28

PSL-REST-API-2024-01-28.openapi.json