Agency Account Synchronization
Service description
Service is used for synchronizing third party service provider's existing account numbers with LHV.
Request
POST
https://connect.lhv.com/agent/account/synchronize
Request supports multiple accounts in bulk.
Request may contain up to 1000 accounts (Accounts.Account blocks).
Request adds new account or updates existing account status. Duplicity is not checked, existing accounts data is overwritten.
For valid requests, accounts are activated immediately by LHV.
For any invalid entry in request, entire bulk is rejected and relevant error code is returned.
Service provider must have a valid agency agreement.
Usage of Bank Codes
Bank Codes is optional list of one or two Codes that indicate if any account number should by synced with LHV EE, LHV UK or both! This depends on the customer setup and business case. This can be used only when connected to LHV UK Connect API host.
when Bank Codes list is not added, it is processed in LHV EE
when Bank Code contains LHVBEE22 or LHVBEE22XXX, it is processed in LHV EE
when Bank Code contains LHVBGB2L or LHVBGB2LXXX, it is processed in LHV UK
when Bank Code contains bot LHVBGB2L or LHVBGB2LXXX and LHVBGB2L or LHVBGB2LXXX, it is processed both in LHV UK and LHV EE
when Bank Code contains is added, but not in the mentioned list, it is processed in LHV UK by default, but account sync is rejected
Headers
Name | Value |
---|---|
Content-Type |
|
Client-Code |
|
Client-Country |
|
Body
XML structure description:
MULT. | MESSAGE ELEMENT | XML TAG | Description |
---|---|---|---|
[1..1] | +MessageRoot | <AgentAccountSyncRequest> | |
[0..1] | ++BankCodes | <BankCodes> | List of LHV bank codes where to sync the account. To be used only for LHV UK Connect API host |
[1..2] | +++BankCode | <BankCode> | * LHVBEE22 or LHVBEE22XXX - use for LHVEE * LHVBGB2L or LHVBGB2LXXX - use for LHVUK |
[1..1] | ++Accounts | <Accounts> | List of accounts |
[1..1] | +++Region | <Region> | 'GB' or ISO country code (SEPA Scheme Country) used in IBAN. |
[0..1] | +++AccountNo | <AccountNo> | For 'GB' region UK sort code + account no (14 characters). AccountNo or IBAN or both can exist. AccountNo's for other regions than 'GB' are ignored. |
[0..1] | +++Iban | <Iban> | IBAN country code must match the value of Region. The BIC code to which the IBAN refers must have a valid Agency agreement. |
[0..1] | +++Status | <Status> | Values 'ACTIVE' or 'CLOSED'. If new account is synced and field is empty, default value 'ACTIVE' is applied. If existing account update and field is empty, existing status is not changed. Status can be changed from ACTIVE to CLOSED and vice versa. |
Samples
Without Bank Code tag <BankCodes> routed to EE
Response
Headers
Name | Value |
---|---|
Content-Type |
|
X-Bank-Code |
|
Body
Request accepted - no content
Response message
Response message is created and can be requests by the Messages services - Messages Services
HTTP Header Message-Response-Type: AGENT_ACCOUNT_SYNC
Body
Message structure
MESSAGE ELEMENT | XML TAG | Description |
---|---|---|
+MessageRoot | <AgentAccountSyncResponse> | |
++Accounts | <Accounts> | |
+++Account | <Account> | |
+++Region | <Region> | |
+++AccountNo | <AccountNo> | Filled if existed in request. |
+++Iban | <Iban> | Filled if existed in request. |
+++Status | <Status> | <ACTIVE> |
Samples
Error codes
Error codes are subject to change.
ERROR CODE | DESCRIPTION |
---|---|
βINVALID_REGION | Invalid Region. |
INVALID_ACCOUNT_NO_OR_IBAN | Account number invalid. |
ACCOUNT_NO_AND_IBAN_MISMATCH | AccountNo and AccountNoIban mismatch. |
INVALID_IBAN | Invalid IBAN. |
MASTER_ACCOUNT_NOT_FOUND | Master account not found. |
TECHNICAL_ERROR | Technical error. |
INVALID_REQUEST | Invalid request. |
Last updated