Subscriptions
The Trust product lets you retrieve subscriptions of end users. Subscriptions are associated with a connection, and a connector (a provider).
API endpoints
Authentication: endpoints listed in this page require header authentication with a user token.
List subscriptions
GET
https://{domain}.biapi.pro/2.0/users/{userId}/subscriptions
Path Parameters
userId*
Integer or "me"
ID of the related user.
Query Parameters
all
Value-less
Flag to access disabled subscriptions.
Response body: SubscriptionsList object
Get a subscription
GET
https://{domain}.biapi.pro/2.0/users/{userId}/subscriptions/{subscriptionId}
Get a single subscription by ID.
Path Parameters
subscriptionId*
Integer
ID of the subscription.
userId*
Integer or "me"
ID of the related user.
Response body: Subscription object
Subscription resources partially support an update operation to handle activation/deactivation:
Update a subscription
POST
https://{domain}.biapi.pro/2.0/users/{userId}/subscriptions/{subscriptionId}
Update a single subscription by ID.
Request body: SubscriptionUpdateRequest object
Path Parameters
subscriptionId*
Integer
ID of the subscription.
userId*
Integer
ID of the related user.
Query Parameters
all
Value-less
Add this flag to access a disabled subscription.
Response body: Subscription object
Life cycle
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).
Querying
Disabled subscriptions will only appear when passing the all
parameter:
Enabling
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.
Webhooks
Subscription synced
A SUBSCRIPTION_SYNCED
webhook is emitted during a sync after a subscription was processed, including new documents.
Webhook request: Subscription object with the following additional properties:
documents
Array of Document objects
The new documents that were found.
Subscription found
A SUBSCRIPTION_FOUND
webhook is emitted after a new subscription was discovered.
Webhook request:
id
Integer
ID of the bank account.
id_user
Integer
ID of the related user.
id_connection
Integer
ID of the related connection.
Data model
SubscriptionsList object
subscriptions
List of subscriptions.
Subscription object
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
The following parameters can be used for response properties expansion:
connection
The connection associated with this subscription.
SubscriptionUpdateRequest object
disabled
Boolean
No
Whether the subscription must be disabled or enabled.
Last updated