Skip to content

Add end-user terms consent customer APIs - #788

Closed
ls-bolt[bot] wants to merge 2 commits into
mainfrom
07-31-AT-5718-end-user-terms-api
Closed

Add end-user terms consent customer APIs#788
ls-bolt[bot] wants to merge 2 commits into
mainfrom
07-31-AT-5718-end-user-terms-api

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #798.

Summary

  • add customer endpoints to fetch and update end-user terms consent
  • expose the current Grid-hosted terms URL and version
  • accept consent during customer creation and document the unregulated-platform requirement
  • expose hasAcceptedEndUserTerms on customer responses so account-opening prerequisites are visible
  • version identifiers are sequential (V1, then V2, V3, …) rather than release dates

Validation

  • make lint

Requested by @bsiaotickchong

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Aug 4, 2026 8:40pm
grid-wallet-demo Ignored Ignored Preview Aug 4, 2026 8:40pm

Request Review

@ls-bolt ls-bolt Bot added the bolt label Jul 31, 2026

Copy link
Copy Markdown

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

feat(api): add endUserTermsConsent parameter to customers create method

go

feat(api): add endUserTermsConsent parameter to business and individual customer create

kotlin

feat(api): add endUserTermsConsent field to customer create requests

openapi

feat(api): add end-user-terms consent endpoints and field to customers

php

feat(api): add endUserTermsConsent parameter to customer creation

python

feat(api): add end_user_terms_consent to customer create requests

ruby

feat(api): add end_user_terms_consent parameter to business/individual customer create

typescript

feat(api): add endUserTermsConsent parameter to customers create

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio · code · diff

generate ✅build ✅lint ⏳test ✅

npm install https://pkg.stainless.com/s/grid-typescript/2e44f91ea953085ad17d988328c612ecd2a05daa/dist.tar.gz
grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-ruby studio · code · diff

generate ✅build ✅lint ⏳test ✅

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@b230d164c7edf226918ea9292d99ba4eade71ef0
grid-kotlin studio · code · diff

generate ⚠️build ⏳lint ⏳test ⏳

grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/f84e88ed8ff9ea21169609a1c085900264f79512/grid-0.0.1-py3-none-any.whl
grid-php studio · code · diff

generate ✅lint ⏳test ✅

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗

⏳ 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.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-08-04 20:51:05 UTC

@ls-bolt

ls-bolt Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

⚡ On it - adding the three new customer endpoints to the Stainless SDK configuration and validating the preview config. I’ll update here when it’s pushed.


🤖 fission-sentinel(#1) | Feedback

@ls-bolt
ls-bolt Bot force-pushed the 07-31-AT-5718-end-user-terms-api branch from 5ac5ae1 to df1a8bc Compare August 1, 2026 00:08
@ls-bolt

ls-bolt Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Revision 2

  • Added the three new consent/terms endpoints to the Stainless customers resource
  • Registered the new request and response models so generated SDKs expose the methods
  • Re-ran the repository lint successfully

🤖 fission-sentinel(#1) | Feedback

@mintlify

mintlify Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Aug 1, 2026, 1:48 AM

Comment thread openapi.yaml
@ls-bolt

ls-bolt Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

📌 Bolt Status

2026-08-03 17:26:40 UTC — ⚡ Agent fission-sentinel-4(#4) started
2026-08-04 04:46:15 UTC — ⚡ Agent fission-sentinel-7(#7) started


Feedback

@ls-bolt

ls-bolt Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

⚡ On it - evaluating whether consent status should be exposed on customer responses and checking the existing customer status model. I’ll update here with the resulting API change or rationale.

@ls-bolt
ls-bolt Bot force-pushed the 07-31-AT-5718-end-user-terms-api branch from df1a8bc to e6b3505 Compare August 3, 2026 17:32
@ls-bolt

ls-bolt Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Revision 3

  • Added required hasAcceptedEndUserTerms to individual and business customer responses
  • Marked the field read-only and documented how it relates to account opening
  • Updated customer webhook examples for the expanded response schema
  • Rebuilt the bundled specifications; make lint passes

Co-Authored-By: github-actions <github-actions@users.noreply.github.com>

Co-Authored-By: jklein24 <jklein24@users.noreply.github.com>
@ls-bolt

ls-bolt Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Revision update:

  • added hasAcceptedEndUserTerms to customer responses
  • documented END_USER_TERMS_VERSION_NOT_FOUND in Error400
  • constrained consent ipAddress to 45 characters

@faraday please re-review the latest revision.

@@ -0,0 +1,80 @@
get:

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.

do we need a whole new endpoint and resource for this, wondering if we can just put it on the customer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I kept this customer-scoped resource intentionally. The common customer-read use case is covered by hasAcceptedEndUserTerms, so clients can see the account-opening prerequisite alongside the existing customer status without another request. The dedicated GET/PATCH is for the full acceptance evidence and its independent lifecycle: timestamp, terms version, method, and IP address. Embedding that object on every individual/business customer response and customer webhook would duplicate the schema and broaden exposure of audit/PII data, while we would still need a mutation surface to record re-acceptance. The original API requirement also explicitly calls for customer-ID-scoped get and update operations. My recommendation is therefore to keep the lightweight boolean on Customer and the full evidence behind /customers/{customerId}/end-user-terms-consent.

@ls-bolt

ls-bolt Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

⚡ On it — reconciling the dedicated consent endpoint with the customer-object alternative and the existing API requirements. I’ll follow up in the review thread.

@ls-bolt

ls-bolt Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Review follow-up complete: I kept the customer-scoped consent GET/PATCH and explained the tradeoff in the inline thread. hasAcceptedEndUserTerms remains the lightweight status on customer responses; full acceptance evidence stays on the dedicated resource to avoid duplicating and broadly exposing audit data. No code change was needed, and CI is green.

Start the version identifier at V1 so future revisions increment to V2, V3,
and so on, rather than encoding a release date.

Co-Authored-By: bsiaotickchong <bsiaotickchong@users.noreply.github.com>
@bsiaotickchong bsiaotickchong reopened this Aug 4, 2026
bsiaotickchong added a commit that referenced this pull request Aug 5, 2026
## Summary
- add the full optional `endUserTermsConsent` object to customer create,
update, and response schemas
- expose the current Grid-hosted terms URL and version through `GET
/customers/end-user-terms`
- remove the redundant dedicated customer-consent GET/PATCH operations
and the `hasAcceptedEndUserTerms` boolean
- document consent requirements for unregulated platforms and the
`END_USER_TERMS_NOT_ACCEPTED` quote error
- identify terms versions sequentially (`V1`, then `V2`, `V3`, …)

## Validation
- `make lint`

Requested by @bsiaotickchong

Original PR: #788

---------

Co-authored-by: jklein24 <jklein24@users.noreply.github.com>
Co-authored-by: bsiaotickchong <bsiaotickchong@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants