-
Notifications
You must be signed in to change notification settings - Fork 5
docs: sync external account docs with new GET/PATCH/DELETE endpoints #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -784,6 +784,97 @@ curl -X GET 'https://api.lightspark.com/grid/2025-10-13/platform/external-accoun | |
| depositing funds from external sources. | ||
| </Info> | ||
|
|
||
| ## Get external account by ID | ||
|
|
||
| Retrieve a specific external account by its system-generated ID: | ||
|
|
||
| ```bash cURL | ||
| curl -X GET 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts/{externalAccountId}' \ | ||
| -H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' | ||
| ``` | ||
|
|
||
| **Response:** | ||
|
|
||
| ```json | ||
| { | ||
| "id": "ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965", | ||
| "customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001", | ||
| "status": "ACTIVE", | ||
| "currency": "USD", | ||
| "platformAccountId": "user_123_primary_bank", | ||
| "accountInfo": { | ||
| "accountType": "US_ACCOUNT", | ||
| "accountNumber": "123456789", | ||
| "routingNumber": "021000021", | ||
| "accountCategory": "CHECKING", | ||
| "bankName": "Chase Bank", | ||
| "beneficiary": { | ||
| "beneficiaryType": "INDIVIDUAL", | ||
| "fullName": "John Doe" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Update external account | ||
|
|
||
| Update mutable fields on an external account. Only `platformAccountId` and `beneficiary` can be updated: | ||
|
|
||
| <Tabs> | ||
| <Tab title="Update platformAccountId"> | ||
| ```bash cURL | ||
| curl -X PATCH 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts/{externalAccountId}' \ | ||
| -H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \ | ||
| -H 'Content-Type: application/json' \ | ||
| -d '{ | ||
| "platformAccountId": "new_account_id_456" | ||
| }' | ||
| ``` | ||
| </Tab> | ||
|
|
||
| <Tab title="Update beneficiary"> | ||
| ```bash cURL | ||
| curl -X PATCH 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts/{externalAccountId}' \ | ||
| -H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \ | ||
| -H 'Content-Type: application/json' \ | ||
| -d '{ | ||
| "beneficiary": { | ||
| "beneficiaryType": "INDIVIDUAL", | ||
| "fullName": "Jane Doe", | ||
| "birthDate": "1990-01-15", | ||
| "nationality": "US", | ||
| "address": { | ||
| "line1": "456 Market Street", | ||
| "city": "San Francisco", | ||
| "state": "CA", | ||
| "postalCode": "94105", | ||
| "country": "US" | ||
| } | ||
| } | ||
| }' | ||
| ``` | ||
| </Tab> | ||
| </Tabs> | ||
|
|
||
| <Warning> | ||
| Updates to beneficiary data may trigger account re-review, temporarily changing the status to `UNDER_REVIEW`. | ||
| </Warning> | ||
|
|
||
| ## Delete external account | ||
|
|
||
| Delete an external account by its ID: | ||
|
|
||
| ```bash cURL | ||
| curl -X DELETE 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts/{externalAccountId}' \ | ||
| -H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' | ||
| ``` | ||
|
|
||
| Returns `204 No Content` on success. | ||
|
|
||
| <Warning> | ||
| Deleting an external account is permanent. Ensure no pending transactions reference this account before deletion. | ||
| </Warning> | ||
|
Comment on lines
+787
to
+876
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The OpenAPI spec ( Prompt To Fix With AIThis is a comment left during a code review.
Path: mintlify/snippets/external-accounts.mdx
Line: 787-876
Comment:
**Platform external account endpoints not documented**
The OpenAPI spec (`openapi/openapi.yaml` line 110-111) defines equivalent `GET`, `PATCH`, and `DELETE` endpoints for `/platform/external-accounts/{externalAccountId}` — identical in capability to the customer variants just added. The existing "Listing external accounts" section already covers both customer and platform list operations side-by-side (lines 764-785), so users will expect parity here too. Without platform-scoped GET/PATCH/DELETE examples, platform-level integrations are left without guidance after the listing section ends.
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
| ## Best practices | ||
|
|
||
| <AccordionGroup> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PATCH endpoint returns
200with the full updatedExternalAccountobject (percustomers_external_accounts_{externalAccountId}.yamllines 76-82). The style guide requires showing complete request/response cycles ("Cover complete request/response cycles", "Show both success and error response examples"), but both PATCH tabs only show the request. Consider adding a response block after</Tabs>similar to the GET section's**Response:**block.Context Used: mintlify/CLAUDE.md (source)
Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!