API Features

Environments and API endpoints

UAT

The UAT environment is used for development and testing.

v1

https://avt-bnp-gateway.azure-api.net/bnpipf/api/uat-bnp/v1/

Production

For use in your production environments. Only use the production environment once UAT testing is completed and signed of.

v1

https://services.aventus.cloud/bnpipf/api/v1/

Example

The v1 UAT NewBusiness endpoint is available at this URL.

https://avt-bnp-gateway.azure-api.net/bnpipf/api/uat-bnp/v1/newbusiness

Security

The API is secured with a key, which can be requested from your Aventus Account Manager. This must be provided as a header with every request.

Aventus will provide you with different API key per environment.

Header NameHead value
avt-api-keyKey, as provided by Aventus

Response Envelope

{
    "data":{},
    "error":-1,
    "error_description":null,
    "successful":true,
    "validationErrors": []
}
{
    "data":{},
    "error":1006,
    "error_description":"Validation failed",
    "successful":false,
    "validationErrors": [{
            "message": "A previous address must be provided.",
            "propertyIdentifier": "NewBusinessRequestType.Applicant.Customer"
        }]
}

All API responses, including errors, shall be wrapped with the following response envelope unless otherwise stated.

KeyDataTypeDescription
dataobjectThe response data
errorintThe error code, if the request was unsuccessful.
For a successful response the error will always be -1
error_descriptionstringHuman-readable description of the error.
successfulbooleantrue if a successful request, otherwise false.
validationErrorsValidationError ArrayArray of validations (if any)

Errors

The API returns standard HTTP status codes.

Validation Errors

Where the error is a result of a validation exception, the response will provide additional breakdown information for each error, and a field reference where possible.

FieldDescription
messageHuman-readable description of the validation error.
propertyIdentifierWhere the input validation was the result of an error in a single field, this will be path to the input.

Additional Errors from BNP

Where BNP return additional errors in their envelope, these will be passed back to the caller, with the Aventus Error specifying that there has been an external system error.

{
    "data": {
        "newBusinessResponseType": {
            "brokerReference": null,
            "accountNumber": null,
            "decision": 5,
            "pdf": "",
            "responseStatus": 2
        },
        "errors": [
            {
                "code": 1079,
                "description": "duplicate combination of client code / shop code / broker reference. Provide different broker reference"
            }
        ]
    },
    "validationErrors": null,
    "error": 1033,
    "error_description": "External system error",
    "successful": false
}

Details on BNP error codes can be found here BNP Error Codes

ClientCode and ShopCode

All requests must contain the ClientCode and ShopCode in the root of the request JSON body.

{
    "clientCode": "CC",
    "shopCode": "44XX",
    "newBusinessRequestType": {
    
    }
}

Validation

This lists the application validation rules that applications are subject to.

  • The applicant must be between the ages of 18 and 120.
  • The applicant’s primary (phone number) cannot begin with 07 for commercial accounts.
  • Sort code, Bank Account Number, Bank Name, 3rd Party Flag are all required. If IBAN is not known then we can obtain the IBAN based on the Sort Code and Account Number.
  • The application must include one phone number with either a landline or a mobile number for personal lines.
  • Email is not mandatory but will support Esign for personal lines.
  • Payment Method can only be Direct Debit

Address Structure Requirements

This appendix lists the Address Structure requirements.

UK

This section lists the UK requirements

Rules

  • All address require a PostCode and StreetName and either a HouseName or a House Number
  • Flat number and Building number guidance:
CircumstancesAction
When Flat No, Building Name and Building No have been enteredFlat No and Building Name are concatenated in the House Name field, and Building No goes into the House Number field
When Flat No and Building Name (but no Building Number), have been enteredFlat No and Building Name are concatenated in the House Name field
When there is no Flat No, just Building Name and Building NumberBuilding Name goes into the House Name field, and Building Number goes into the House Number field

ROI

This section lists the ROI requirements.

Rules

  • All addresses require a County.
  • StreetName or Townland or PostTown is required.
  • If no HouseName or HouseNumber, then StreetName is mandatory and either Townland or PostTown is then required.