Contract status
GET /webhook/contract-status?ext-contract-id=<externalContractId> HTTP/1.1Host: be-api.admin.evorest.chx-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.
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>'Response
Section titled “Response”HTTP 200:
{ "externalContractId": "514.320.02.03", "state": "open", "iban": "CH0000000000000000000", "paidInAmount": 3000, "paidOutTime": null, "paidOutAmountTenant": null, "product": "bank_deposit", "provider": "hbl"}| Field | Type | Meaning |
|---|---|---|
externalContractId | string | The id you sent. |
state | string | See States. |
iban | string or null | IBAN of the deposit account of the main tenant. null until the bank has opened the account, and null for insurance. |
paidInAmount | number or null | The deposit in CHF once the deposit is open. null in every other state, because Evorest does not show partial payments, and null for insurance. |
paidOutTime | ISO 8601 string or null | For a bank deposit, when it was paid out. For insurance, the end of the cover. null until then. |
paidOutAmountTenant | number or null | The total paid out to the tenant. Set when state is closed, otherwise null. |
product | string or null | bank_deposit or insurance. null while the tenant has not chosen yet. |
provider | string or null | hbl for bank_deposit, swisscaution for insurance, null while product is null. |
States
Section titled “States”state is always one of these six values.
state | Meaning |
|---|---|
draft_editing | A 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. |
opening | The deposit exists and is on its way: waiting for a signature, the bank account, or the payment. |
open | The deposit is paid in and in force. |
closing | The deposit is being settled. The tenant or the property manager has started the closing, but the money has not been paid out yet. |
closed | The deposit was paid out and the account is closed. |
withdrawn | The deposit was cancelled before the money arrived. A deposit with the same externalContractId can be opened again. |
What the fields hold in each state:
state | iban | paidInAmount | paidOutAmountTenant |
|---|---|---|---|
draft_editing | null | null | null |
opening | null, then the IBAN once the account exists | null | null |
open | the IBAN | the deposit | null |
closing | the IBAN | null | null |
closed | the IBAN | null | the amount paid out |
withdrawn | null or the IBAN, if the account had already been opened | null | null |
The iban of an insurance deposit is null in every state.
Errors
Section titled “Errors”The body of every error is { "error": "<message>" }.
| HTTP | When |
|---|---|
| 400 | x-api-key or x-org-id is missing, or ext-contract-id is missing (checked after the key). |
| 401 | The API key does not match the organization. |
| 404 | No deposit with that external id exists for the organization. |
| 500 | The organization is unknown or does not have contract status turned on, or the status could not be read. Contact Evorest if it persists. |