Skip to content

feat: add public v1 verify API and OpenAPI spec (#352)#437

Open
Sammy-Samy wants to merge 1 commit into
AnnabelJoe:mainfrom
Sammy-Samy:feat/issue-352-public-verify-api
Open

feat: add public v1 verify API and OpenAPI spec (#352)#437
Sammy-Samy wants to merge 1 commit into
AnnabelJoe:mainfrom
Sammy-Samy:feat/issue-352-public-verify-api

Conversation

@Sammy-Samy
Copy link
Copy Markdown

Summary

Adds GET /api/v1/verify/:certificateId as a public, unauthenticated endpoint for third-party certificate verification, and documents it in the OpenAPI spec.

Changes

  • apps/web/src/app/api/v1/verify/[id]/route.ts — re-exports from the existing /api/verify/[id] handler (no auth required)
  • openapi.yaml — adds /api/v1/verify/{certificateId} path with full schema, example response, and 429 rate-limit response

Acceptance Criteria

  • GET /api/v1/verify/:certificateId returns full chain of custody
  • No authentication required
  • Response includes: meter ID, reading, signature, anchor tx, certificate, retirement status
  • Rate limited to prevent abuse (60 req/min via middleware)
  • Documented in OpenAPI spec

Type of change

  • New feature

Related issue

Closes #352

Checklist

  • Tests pass
  • No new lint warnings
  • Docs updated if needed
  • PR targets develop

- GET /api/v1/verify/:certificateId returns full chain of custody
- No authentication required (security: [])
- Response includes meter ID, reading, signature, anchor tx, certificate, retirement status
- Rate limited (60 req/min per IP via middleware)
- Documented in OpenAPI spec with 200/400/404/429 responses
- v1 route re-exports from existing /api/verify/[id] handler

Closes AnnabelJoe#352
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Sammy-Samy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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 public API for third-party certificate verification

1 participant