---
title: "Pull the movements a connection can reach"
method: POST
path: "/api/v1/banking/ponto/sync"
tags: ["Money"]
---

# Pull the movements a connection can reach

`POST /api/v1/banking/ponto/sync`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/banking/ponto/sync`
- Auth: API key in cookie `better-auth.session_token`

From a signed-in screen, asks the bank for anything new first, with the caller’s own address as Ponto requires, then reads. From anywhere else, or for support reading a customer’s team, it only reads what Ponto already holds. A movement already on the account is left alone, so running this twice imports nothing the second time. An expired access token is refreshed here rather than reported. With `bankAccountId`, the account is read through whichever connection feeds it now. An account that turns out not to be readable any more is named in `stopped` rather than failing the others, and one the bank could not be asked about is named in `unasked`, showing what the bank had already reported; `unaskable` says the caller’s own address is one Ponto cannot be given, so nothing was asked for and checking again from there answers the same. New movements are then placed against what they pay where the owner has placement on; `placed` and `waiting` say how that went, and a placing that fails still answers with what was read, `waiting` null, for the hourly pass to finish.

## Request body

- object
  - `connectionId` string, required: Stable record id, e.g. `lse_012`.
  - `bankAccountId` string: Only this account. Every account the connection feeds when absent.

## Response `200`

What came in.

- object
  - `ok` unknown, required
  - `data` object, required
    - `imported` number, required: Movements written. Duplicates are not among them.
    - `duplicates` number, required: Movements the account already held, left alone.
    - `statementImportId` string, nullable, required: Stable record id, e.g. `lse_012`.
    - `stopped` object[], required: Accounts this read found it can no longer read. Their feeds now wait on the owner.
      - `bankAccountId` string, required: Stable record id, e.g. `lse_012`.
      - `note` string, required: Why, in words the owner reads.
    - `placed` number, required: Movements placed against what they pay in the same call, where placement is switched on and sure enough.
    - `waiting` number, nullable, required: Incoming movements still waiting on the owner after placing. Null when placing did not run, so the hourly pass looks at what they pay.
    - `synchronizing` boolean, required: A bank was still synchronizing when this read listed. While true, a read in a few seconds may bring more without asking the bank again.
    - `unasked` string[], required: Accounts this check could not ask the bank about, so what they show is what the bank had already reported.
    - `unconfirmed` string[]: Accounts the bank was asked about but had not confirmed when this check stopped waiting, so what they show is what it had already reported.
    - `unaskable` boolean, required: True where the caller was on screen and their own address is one Ponto cannot be given, so no account was asked about at all and checking again from the same connection answers the same. Everything read is what the bank had already reported.
    - `syncedAt` string, required: ISO 8601 timestamp.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The connection is not pointed at an account, or the bank refused.
- `404`: No such connection on this team.
- `409`: Another check was reading the same accounts, so this one read nothing. What that one finds lands in a minute.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
