Skip to content

feat(item): add Open Finance resources endpoint and Item fields - #111

Merged
cernadasjuan merged 3 commits into
masterfrom
feat/item-resources
Sep 29, 2026
Merged

cernadasjuan merged 3 commits into
masterfrom
feat/item-resources

Conversation

@cernadasjuan

@cernadasjuan cernadasjuan commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Draft until the corresponding Pluggy API release is live — see API availability below.

Summary

Adds SDK support for the resources a financial institution declares for an item's Open Finance consent.

  • New endpoint — GET /items/{id}/resources:
    • service().getItemResources(itemId)
    • service().getItemResources(itemId, new ItemResourcesSearchRequest().page(1).pageSize(100).status(ItemResourceStatus.PENDING_AUTHORISATION))
    • Returns ItemResourcesResponse (page, total, totalPages, results), each result an ItemResource with resourceId, type and status.
    • Items on connectors other than Open Finance return an empty page, not an error.
  • New ItemResponse fields:
    • resourcesCollectedAt (Date, nullable) — when the institution's resource list was last read; null if it never was. An empty resources page means the institution shared nothing only when this is set.
    • hasResourcesPendingAuthorization (Boolean, nullable) — Open Finance only. true when the institution declares at least one resource PENDING_AUTHORISATION (the user still has to approve it at their bank), false when the resource list was read and none is. null for connectors other than Open Finance, and while the resource list has not been read yet (resourcesCollectedAt is null), e.g. before the item's first execution finishes.

Modeling notes

  • status is an enum, ItemResourceStatus (AVAILABLE, UNAVAILABLE, TEMPORARILY_UNAVAILABLE, PENDING_AUTHORISATION), following the existing @SerializedName enum pattern. PENDING_AUTHORISATION keeps Open Finance's British spelling. As with every enum in this SDK, a value added server-side later deserializes as null rather than failing.
  • type is a String. The documented values are listed in the Javadoc, but other values can appear, and an enum would silently turn them into null.

API availability

GET /items/{id}/resources and Item.resourcesCollectedAt are already in the public spec (https://api.pluggy.ai/oas3.json). The status filter and Item.hasResourcesPendingAuthorization require the corresponding API release: before it, the API does not apply status (it returns every resource) and hasResourcesPendingAuthorization deserializes as null. Merge after that release.

Tests

  • Unit (ItemResourcesTest, no network): request path and query params, page parsing, empty page, an undocumented type passed through, an unknown status parsed as null without throwing, and both new ItemResponse fields.
  • Integration (GetItemResourcesTest): a non-Open-Finance sandbox item returns an empty page; a non-existing item returns 404.
  • mvn -B package and mvn -B test (12 tests) pass locally.

Release

Bumps pom.xml to 1.14.0 (minor: feat commits since v1.13.0, this one and the unreleased health.incidents from #110), so merging cuts the v1.14.0 tag and GitHub Release. Publishing to GitHub Packages still has to be dispatched by hand after the merge:

gh workflow run maven-publish.yml -f tag_version=v1.14.0

🤖 Generated with Claude Code

cernadasjuan and others added 2 commits September 28, 2026 17:22
Mirrors what the API exposes about the resources a financial
institution declares for an item's Open Finance consent.

- GET /items/{id}/resources as getItemResources(itemId) and
  getItemResources(itemId, ItemResourcesSearchRequest), paginated like the
  other list endpoints (page, pageSize) plus an optional status filter.
  Items on connectors other than Open Finance return an empty page, not an
  error.
- ItemResponse.resourcesCollectedAt: when the institution's resource list
  was last read, null if it never was. An empty resources page means the
  institution shared nothing only when this is set.
- ItemResponse.hasResourcesPendingAuthorization: true when the institution
  declares at least one resource PENDING_AUTHORISATION, i.e. the user still
  has to approve it at their bank. Always false for other connectors.

`status` is an enum (ItemResourceStatus) following the existing
@SerializedName pattern, keeping Open Finance's British spelling of
PENDING_AUTHORISATION verbatim; a status added after this release
deserializes as null. `type` stays a String: values outside the documented
list can appear, and an enum would turn them into null instead of passing
them through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API reports null while the institution's resource list has not been read yet, and for
connectors other than Open Finance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cernadasjuan
cernadasjuan marked this pull request as ready for review September 29, 2026 17:35

@jhonatan-pluggy jhonatan-pluggy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Minor: feat commits since v1.13.0 (health.incidents and the item resources
endpoint and fields).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jhonatan-pluggy jhonatan-pluggy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cernadasjuan
cernadasjuan merged commit 7c433bd into master Sep 29, 2026
4 of 5 checks passed
@cernadasjuan
cernadasjuan deleted the feat/item-resources branch September 29, 2026 18:47
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.

2 participants