Subscriptions
The Trust product lets you retrieve subscriptions of end users. Subscriptions are associated with a connection, and a connector (a provider).
get
https://{domain}.biapi.pro/2.0
/users/{userId}/subscriptions
List subscriptions
Filtering route alias:
/users/{userId}/connections/{connectionId}/subscriptions
get
https://{domain}.biapi.pro/2.0
/users/{userId}/subscriptions/{subscriptionId}
Get a subscription
Subscription resources partially support an update operation to handle activation/deactivation:
post
https://{domain}.biapi.pro/2.0
/users/{userId}/subscriptions/{subscriptionId}
Update a subscription
Subscriptions can be in a disabled or enabled state.
For legal compliance, subscriptions are disabled by default. Also, disabling subscription will result in the deletion of subscription child resources (documents).
Disabled subscriptions will only appear when passing the
all
parameter:GET /users/{userId}/subscriptions/{id}?all
GET /users/{userId}/connections/{connectionId}/subscriptions/{id}?all
To enable one such subscription, it is necessary to perform a
POST
request on that subscription, with the all
parameter and { "disabled": false }
.Please note that this action represents the PSU's consent.
A
SUBSCRIPTION_SYNCED
webhook is emitted during a sync after a subscription was processed, including new documents.Property | Type | Description |
---|---|---|
documents | Array of Document objects | The new documents that were found. |
A
SUBSCRIPTION_FOUND
webhook is emitted after a new subscription was discovered.Webhook request:
Property | Type | Description |
---|---|---|
id | Integer | ID of the bank account. |
id_user | Integer | ID of the related user. |
id_connection | Integer | ID of the related connection. |
Property | Type | Description |
---|---|---|
subscriptions | List of subscriptions. |
Property | Type | Description |
---|---|---|
id | Integer | ID of the subscription. |
id_connection | Integer or null | ID of the related connection. |
id_user | Integer or null | ID of the related user. |
id_source | Integer or null | ID of the related connection source. |
number | String or null | Subscription number. |
label | String | Label of the subscription. |
subscriber | String or null | Name of the subscriber. |
validity | Date or null | The subscription is valid until this date, if any. |
renewdate | Date or null | Next renew date, is any. |
last_update | DateTime or null | Last successful update of the subscription. |
deleted | DateTime or null | If set, this subscription is not found on the website anymore. |
disabled | DateTime or null | If set, this subscription has been disabled by user and will not be synchronized anymore. |
error | String or null | If the last update has failed, the error code. |
Available expands
Property | Type | Description |
---|---|---|
connection | The connection associated with this subscription. |
Property | Type | Required | Description |
---|---|---|---|
disabled | Boolean | No | Whether the subscription must be disabled or enabled. |
Last modified 1mo ago