feat(cards): rename cardholderId to customerId on the cards API - #933
feat(cards): rename cardholderId to customerId on the cards API#933whoisglover wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
@greptile review |
✱ Stainless preview builds for gridThis PR will update the cli kotlin php ruby Edit this comment to update them. They will appear in their respective SDK's changelogs. ⏳ grid-typescript studio⏳ grid-openapi studio⏳ grid-ruby studio⏳ grid-kotlin studio⏳ grid-go studio⏳ grid-python studio⏳ grid-php studio⏳ grid-cli studio⏳ These are partial results; builds are still running. This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
|
| type: object | ||
| required: | ||
| - cardholderId | ||
| - customerId |
There was a problem hiding this comment.
Breaking rename lacks versioning
This hard rename removes the required cardholderId request and response fields and the existing list filter while keeping the API on the same 2025-10-13 server path. Existing clients targeting that version can send invalid create requests, fail to deserialize cards, or silently receive unfiltered lists. This violates the repository directive that breaking changes must bump info.version and use a matching new servers.url; introduce the rename under a new API version.
Context Used: CLAUDE.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/cards/CardCreateRequest.yaml
Line: 3
Comment:
**Breaking rename lacks versioning**
This hard rename removes the required `cardholderId` request and response fields and the existing list filter while keeping the API on the same `2025-10-13` server path. Existing clients targeting that version can send invalid create requests, fail to deserialize cards, or silently receive unfiltered lists. This violates the repository directive that breaking changes must bump `info.version` and use a matching new `servers.url`; introduce the rename under a new API version.
**Context Used:** CLAUDE.md ([source](https://github.com/lightsparkdev/grid-api/blob/main/CLAUDE.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.4fa2fe8 to
e4c24ee
Compare
8010cda to
7b347ec
Compare
|
@greptile review |
|
Superseded by #937, which landed the same rename on main this morning. |
Jira: ENG-11645
What this does
Every other Grid resource names the owning customer
customerId, includingCardTransaction. The card resource, the issue-a-card request, and theGET /cardsfilter called the same thingcardholderId. This PR renames that field tocustomerIdso the cards API uses one name.This is a hard rename with no alias. No external platform has called
POST /cardsyet, so the change ships without a new API version.Changes
CardandCardCreateRequest:cardholderIdbecomescustomerId, required as before.GET /cards: thecardholderIdquery parameter becomescustomerId.card.state_changewebhook examples, the cards quickstart, issuing, funding-sources, webhooks, and sandbox pages use the new name.--cardholder-idbecomes--customer-idoncards listandcards create.The word "cardholder" stays in prose where it means the person. The
CARDHOLDER_KYC_NOT_APPROVEDerror code is unchanged.What has to land with this
The server, the dashboard, the observatory card canaries, and the generated Python client read the old name today. Those changes go in webdev and observatory PRs that merge in the same window as this one.
Verification
make buildandmake lintpass.cd cli && npm ci && npm testpasses, 80 tests. A repo-wide grep forcardholderId,cardholder-id, andcardholder_idreturns nothing.