Closing Requests
Documentation for Providers
This diagram illustrates the process of receiving a product closing request from Zinsli. It shows the interactions between Zinsli and the Product Provider during the product closing process.
Implementation
Follow this step-by-step guide to implement the product closing process.
-
OAuth authorization
Obtain authorization using the Client Credentials Grant flow of OAuth 2.0.
Follow the instructions under Setup OAuth App to create an OAuth App and getclient_id
andclient_secret
.warningThe following scopes must be set for the OAuth App.
rental_collateral:read
,rental_collateral:update
- post:
/v1/user/auth/token
infoFor all subsequent API calls, include the following header:
Authorization: Bearer \<access_token\>
. - post:
-
Retrieve Product Closing Information
Obtain details about rentals collaterals which have completed the Zinsli closing process and wish to close a product. There are two methods to retrieve this information: Webhook and Polling.
-
Webhook:
Follow the instructions under Setup Webhooks to activate them. After that you can receive events which have the following schema:
{
collateralId: string
state: 'closing-settle-claim-by-invoice'
} -
Polling:
Another variant is to poll the following api:
- get:
/v1/{organization}/product-provider/rental-collateral
infostate must have the value
closing-settle-claim-by-invoice
collateralId contains the id needed to get collateral data - get:
-
-
Get infos about the rental deposit product to close
Find all information about the rental deposit to be closed, including to which IBAN's (Property Manager, Tenant) you need to make payouts if any.
dangerOnly objects with the state
closing-settle-claim-by-invoice
should be closed by the product provider. Closing a product in any other state may result in unintended consequences, as it indicates that the necessary agreements for closure have not been finalized.- get:
/v1/product-provider/rental-collateral/{id}
In the result you can find the IBAN's under
property.owner.iban
- get:
-
Inform Zinsli if closing is complete
After you have gone trough the whole closing precess on your side (including payout of collaterals) you must inform Zinsli asap with the following POST
dangerComing soon
After this POST, the state of a collateral changes to
closed