Skip to content

feat(api): add GET /batches/{batch_id} endpoint#5462

Open
martinconic wants to merge 1 commit into
masterfrom
feat/batches-by-id
Open

feat(api): add GET /batches/{batch_id} endpoint#5462
martinconic wants to merge 1 commit into
masterfrom
feat/batches-by-id

Conversation

@martinconic
Copy link
Copy Markdown
Contributor

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Closes #5458.

Adds the singular companion to GET /batches so callers can fetch a
single globally-visible postage batch by ID in O(1) instead of pulling
the entire batch set client-side. Mirrors the existing
/stamps/{batch_id} pattern: 32-byte ID path param, batchStore.Get
lookup, 404 on ErrNotFound, 200 with PostageBatchShort otherwise.

OpenAPI spec bumped 8.0.0 -> 8.1.0 (backwards-compatible new endpoint).

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@martinconic martinconic self-assigned this May 13, 2026
@martinconic martinconic added this to the 2026 milestone May 13, 2026
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.

Add new /batches/:batchId endpoint

1 participant