How to Update user data in a Connection
This guide explains how to refresh an existing connection so Albato re-reads user data (for example, newly created custom fields) after the connection was created via link.
When to use
The user added custom fields in their system, and you need them available in the integration.
Prerequisites
partnerId: ID of the integration (partner)credentialId: ID of the connection to updateAuthorization: valid Bearer token (master account)
Endpoint
Method: POST
Path: /credentials/{partnerId}/{credentialId}/update-user-data
Authorization: Bearer <master account token> (required)
Path parameters:
partnerId(integer): Partner (integration) identifiercredentialId(integer): Connection identifier to update
No request body is required.
Endpoint for updating user dataExample request
curl --location --request POST 'https://api.albato.com/credentials/{partnerId}/{credentialId}/update-user-data' \
--header 'Authorization: Bearer <MASTER_ACCOUNT_TOKEN>'Replace {partnerId}, {credentialId} and <MASTER_ACCOUNT_TOKEN> with your values.
Example response
{
"success": true,
"data": {
"updateStatus": 3
}
}updateStatus meanings
- 0: New connection, not updated yet
- 1: Queued for update
- 2: Updating in progress
- 3: Updated successfully
- 4: Re-queued for update (for example, after a transient error during update)
Tips
- If
updateStatusis 1 or 2, wait and retry until it becomes 3 - If
updateStatusbecomes 4, retry later - Ensure you use a valid master token and correct
{partnerId}and{credentialId}
Updated 4 months ago
