Skip to content

Contract status

GET /webhook/contract-status?ext-contract-id=<externalContractId> HTTP/1.1
Host: be-api.admin.evorest.ch
x-api-key: <your-api-key>
x-org-id: <evorest-org-id>

The query name is ext-contract-id. It is the same value as externalContractId on the open-deposit call. If the same id was used for several deposits, for example after a withdrawal and a new opening, the status is that of the most recently created one.

The key and the x-org-id are the ones Evorest issued for contract status. See Authentication. To learn about payments, the document callback is quicker than polling.

Terminal window
curl 'https://be-api.test.admin.evorest.ch/webhook/contract-status?ext-contract-id=514.320.02.03' \
-H 'x-api-key: <your-api-key>' \
-H 'x-org-id: <evorest-org-id>'

HTTP 200:

{
"externalContractId": "514.320.02.03",
"state": "open",
"iban": "CH0000000000000000000",
"paidInAmount": 3000,
"paidOutTime": null,
"paidOutAmountTenant": null,
"product": "bank_deposit",
"provider": "hbl"
}
FieldTypeMeaning
externalContractIdstringThe id you sent.
statestringSee States.
ibanstring or nullIBAN of the deposit account of the main tenant. null until the bank has opened the account, and null for insurance.
paidInAmountnumber or nullThe deposit in CHF once the deposit is open. null in every other state, because Evorest does not show partial payments, and null for insurance.
paidOutTimeISO 8601 string or nullFor a bank deposit, when it was paid out. For insurance, the end of the cover. null until then.
paidOutAmountTenantnumber or nullThe total paid out to the tenant. Set when state is closed, otherwise null.
productstring or nullbank_deposit or insurance. null while the tenant has not chosen yet.
providerstring or nullhbl for bank_deposit, swisscaution for insurance, null while product is null.

state is always one of these six values.

stateMeaning
draft_editingA property manager is editing a deposit that was already sent. This is temporary and the other fields can be empty while it lasts. Ask again a little later.
openingThe deposit exists and is on its way: waiting for a signature, the bank account, or the payment.
openThe deposit is paid in and in force.
closingThe deposit is being settled. The tenant or the property manager has started the closing, but the money has not been paid out yet.
closedThe deposit was paid out and the account is closed.
withdrawnThe deposit was cancelled before the money arrived. A deposit with the same externalContractId can be opened again.

What the fields hold in each state:

stateibanpaidInAmountpaidOutAmountTenant
draft_editingnullnullnull
openingnull, then the IBAN once the account existsnullnull
openthe IBANthe depositnull
closingthe IBANnullnull
closedthe IBANnullthe amount paid out
withdrawnnull or the IBAN, if the account had already been openednullnull

The iban of an insurance deposit is null in every state.

The body of every error is { "error": "<message>" }.

HTTPWhen
400x-api-key or x-org-id is missing, or ext-contract-id is missing (checked after the key).
401The API key does not match the organization.
404No deposit with that external id exists for the organization.
500The organization is unknown or does not have contract status turned on, or the status could not be read. Contact Evorest if it persists.