Skip to content

feat(item): add fetchItemsCursor and fetchAllItems for GET /v2/items - #185

Merged
Gabrielpanga merged 1 commit into
masterfrom
feat/list-items-cursor
Oct 5, 2026
Merged

Gabrielpanga merged 1 commit into
masterfrom
feat/list-items-cursor

Conversation

@Gabrielpanga

@Gabrielpanga Gabrielpanga commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Important

Opt-in, paid plans only. Listing items is disabled by default and is only available to paid-plan teams that have explicitly requested it from Pluggy support. Teams without it enabled get 403 LIST_ITEMS_FEATURE_NOT_ENABLED. This is stated at the top of the JSDoc of every new method and type, and in the README.

Note

Stack: #183 → #184 → this PR. Merge in that order; GitHub retargets each one as the previous lands. Without #184 a cursor containing + would reach the API corrupted.

What

  • fetchItemsCursor(options?: ItemCursorFilters): one page of GET /v2/items, newest first.
  • fetchAllItems(options?): follows next across every page, same loop as fetchAllTransactions.
  • ItemCursorFilters: clientUserId, connectorId, after. Only those three are sent, even if a caller passes extra fields at runtime, because the API rejects unknown query params.

For most integrations the recommended path is still to store each itemId when it is created (Pluggy Connect onSuccess or the item/created webhook) and call fetchItem(id).

Tests

tests/itemsCursor.test.ts (9, nock): no params on the first page, filters as query params, a cursor with + / = sent intact, extra fields dropped, a 3-page sweep forwarding filters, stop when next has no after, and the 403 body reaching the caller from both methods. pnpm test: 71/71.

@Gabrielpanga
Gabrielpanga force-pushed the fix/encode-query-values branch from 8705d5f to 66f5a90 Compare October 5, 2026 13:11
@Gabrielpanga
Gabrielpanga force-pushed the feat/list-items-cursor branch from 89ab7b2 to beab0d5 Compare October 5, 2026 13:11
Base automatically changed from fix/encode-query-values to master October 5, 2026 13:19
Opt-in, paid plans only: teams without the feature enabled get
403 LIST_ITEMS_FEATURE_NOT_ENABLED.
@Gabrielpanga
Gabrielpanga force-pushed the feat/list-items-cursor branch from beab0d5 to 84be18a Compare October 5, 2026 13:20
@Gabrielpanga
Gabrielpanga merged commit 7a82811 into master Oct 5, 2026
1 of 2 checks passed
@Gabrielpanga
Gabrielpanga deleted the feat/list-items-cursor branch October 5, 2026 13:22
pluggy-github-app Bot pushed a commit that referenced this pull request Oct 8, 2026
# [0.92.0](v0.91.0...v0.92.0) (2026-10-08)

### Bug Fixes

* **api:** URL-encode query string values ([#184](#184)) ([16f0596](16f0596))
* **deps:** patch handlebars, http-cache-semantics and brace-expansion advisories ([#187](#187)) ([0ef8d00](0ef8d00))

### Features

* add Smart Transfer linkedJourney, data consent and source account balance ([#186](#186)) ([c77e1c3](c77e1c3))
* **item:** add fetchItemsCursor and fetchAllItems for GET /v2/items ([#185](#185)) ([7a82811](7a82811))
* sync with the API spec (card metadata, SCR, merchants, category rules, pix-qr, boletos) ([#183](#183)) ([d0f0c86](d0f0c86))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants