Then /eps/v1/bankintentions
endpoint is for communicating the bank’s intended registration method (paper or digital) to the broker and also get the same intent from the broker. In addition, this endpoint will also be used to to update the registration method if circumstances change on the bank’s side.
The broker can also change their intent, and any changes from the broker will be made available to the bank by the event INTENTION_CHANGED
.
Communicating with an Ambita broker
When posting a Bankintention (/v1/bankintentions/
) is sent to an Ambita broker,
the response status code will be 201 (created). The response data will contain
a property called settlementUniqueIdentifier
which can be used to fetch
the settlement data and check the broker's intention (flow).
If sending the bankintention to an Ambita broker and there is no match with a
settlement, the response code will be 400 (bad request). The response object has
a property named message
that is a user friendly explanation of what went wrong.
Example response:
{ "timestamp" : "2022-02-17T09:38:14.750715000", "status" : 400, "error" : "Bad Request", "exception" : "com.ambita.eps.integration.realty.exception.PropertyNotFound", "message" : "Eiendom/borettsandel 3411-815-1-0-746 registrert i oppgjøret finnes ikke i Grunnboken. Sjekk at riktige verdier er lagt inn.", "path" : "/eps/v1/bankintentions", "errorCode" : "5000" } { "timestamp" : "2022-02-17T11:28:59.438424000", "status" : 400, "error" : "Bad Request", "exception" : "com.ambita.eps.service.exception.NotFoundSettlementForRealestate", "message" : "Fant ikke noe oppgjør for eiendomsnøkkel", "path" : "/eps/v1/bankintentions" }
Communicating wit a Non-Ambita broker
If a Bankintention is sent to a non-Ambita broker the response status code will
always be 202 (accepted). The response data will contain a settlementUniqueIdentifier
that later can be used to fetch the settlement data and check the broker's intention.
When a response from the broker is received from Altinn (later), an event of typeINTENTION_RESPONSE_RECEIVED
is created. A human friendly description is found
in the events description
property.
"description: "Intensjon feilet. Melding fra megler: Registerenhet treff, men ikke treff på kjøper: fant ingen oppdrag i meglersystemet der minst 1 kjøper fra oversendt intensjonsforespørsel stemmer med kjøper(e) i megleroppdrag (fikk følgende registerenhet treff: 316/31-21-0350). Vennligst påse at riktig(e) kjøper(e) er registrert i intensjonsmeldingen.."
In the event data you can use the property eventCode.
An event code of EPS_EV0001 means the intention was successfully accepted
by the broker. The broker's intentions can now be found by fetching the
settlement data using the previous mentioned settlement uid
or using the link in the event data named "settlement".