Skip to main content

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.

  1. 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 get client_id and client_secret.

    warning

    The following scopes must be set for the OAuth App. rental_collateral:read, rental_collateral:update

    • post: /v1/user/auth/token
    info

    For all subsequent API calls, include the following header: Authorization: Bearer \<access_token\>.


  1. 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.

    1. 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'
      }
    2. Polling:

      Another variant is to poll the following api:

      • get: /v1/{organization}/product-provider/rental-collateral
      info

      state must have the value closing-settle-claim-by-invoice
      collateralId contains the id needed to get collateral data


  1. 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.

    danger

    Only 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


  1. 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

    danger

    Coming soon

    After this POST, the state of a collateral changes to closed


API Specification

Swagger spec "ZINSLI_V1_0" not found. Set the parameter "swaggerSpecName" to one of the following values: ZINSLI_V1_0