Connector API — manual account and transaction ingestion.
Use this when you already hold bank data and want to push it into Tink's enrichment pipeline without using Tink Link aggregation.
Requires accounts:write and transactions:write scopes on an
application-level (client credentials) client.
Example
{:ok, client} = Tink.Auth.client_credentials(scope: "accounts:write transactions:write")
Tink.Connector.upsert_accounts(client, "ext-user-123", [
%{
"externalId" => "acc-001",
"name" => "Current Account",
"type" => "CHECKING",
"balance" => %{"amount" => %{"currencyCode" => "GBP", "value" => 1500.0}}
}
])
{:ok, op} = Tink.Connector.upsert_transactions(client, "ext-user-123", [
%{
"externalId" => "tx-001",
"accountExternalId" => "acc-001",
"description" => "Spotify",
"amount" => %{"currencyCode" => "GBP", "value" => -9.99},
"dates" => %{"booked" => "2024-01-15"}
}
])
# Poll the async ingestion operation
{:ok, _} = Tink.Connector.poll_operation(client, op["operationId"])
Summary
Functions
Batch delete transactions via v2 connector API. Requires transactions:write.
Batch update transactions via v2 connector API. Requires transactions:write.
Delete accounts by external ID via v2 connector API. Requires accounts:write.
Delete transactions for a user by external ID list (v1). Requires transactions:write.
Delete all data for a connector user. Requires accounts:write.
Get the status of an async connector operation. Requires transactions:write.
Poll a connector operation until it completes or times out.
Upsert a single account by external ID (v1). Requires accounts:write.
Upsert a batch of accounts for a user (v1). Requires accounts:write.
Upsert accounts via v2 connector API. Requires accounts:write.
Upsert a single transaction by external ID (v1). Requires transactions:write.
Upsert a batch of transactions for a user (v1). Requires transactions:write.
Upsert transactions via v2 connector API. Requires transactions:write.
Functions
@spec batch_delete_transactions(Tink.Client.t(), [String.t()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Batch delete transactions via v2 connector API. Requires transactions:write.
@spec batch_update_transactions(Tink.Client.t(), [map()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Batch update transactions via v2 connector API. Requires transactions:write.
@spec delete_accounts(Tink.Client.t(), [String.t()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Delete accounts by external ID via v2 connector API. Requires accounts:write.
@spec delete_transactions(Tink.Client.t(), String.t(), [String.t()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Delete transactions for a user by external ID list (v1). Requires transactions:write.
@spec delete_user(Tink.Client.t(), String.t()) :: :ok | {:error, Tink.Error.t()}
Delete all data for a connector user. Requires accounts:write.
@spec get_operation(Tink.Client.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}
Get the status of an async connector operation. Requires transactions:write.
@spec poll_operation(Tink.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tink.Error.t() | :timeout}
Poll a connector operation until it completes or times out.
Options
:timeout_ms— default 30_000:interval_ms— default 1_000
@spec upsert_account(Tink.Client.t(), String.t(), String.t(), map()) :: {:ok, map()} | {:error, Tink.Error.t()}
Upsert a single account by external ID (v1). Requires accounts:write.
@spec upsert_accounts(Tink.Client.t(), String.t(), [map()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Upsert a batch of accounts for a user (v1). Requires accounts:write.
@spec upsert_accounts_v2(Tink.Client.t(), [map()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Upsert accounts via v2 connector API. Requires accounts:write.
@spec upsert_transaction(Tink.Client.t(), String.t(), String.t(), map()) :: {:ok, map()} | {:error, Tink.Error.t()}
Upsert a single transaction by external ID (v1). Requires transactions:write.
@spec upsert_transactions(Tink.Client.t(), String.t(), [map()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Upsert a batch of transactions for a user (v1). Requires transactions:write.
@spec upsert_transactions_v2(Tink.Client.t(), [map()]) :: {:ok, map()} | {:error, Tink.Error.t()}
Upsert transactions via v2 connector API. Requires transactions:write.