Skip to content

Comments

feat: removing customerId from platformExternalAccount request#218

Open
pengying wants to merge 1 commit intomainfrom
02-20-feat_removing_customerid_from_platformexternalaccount_request
Open

feat: removing customerId from platformExternalAccount request#218
pengying wants to merge 1 commit intomainfrom
02-20-feat_removing_customerid_from_platformexternalaccount_request

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Feb 20, 2026

TL;DR

Added a new PlatformExternalAccountCreateRequest schema with a platformAccountId field and updated the platform external accounts endpoint to use this new schema instead of the generic ExternalAccountCreateRequest.

What changed?

  • Created a new PlatformExternalAccountCreateRequest schema that includes a platformAccountId field for platform-specific account identification
  • Updated the platform external accounts POST endpoint to reference the new schema
  • The new schema maintains the same required fields (currency and accountInfo) as the original but adds the optional platformAccountId field

How to test?

  • Test the platform external accounts creation endpoint with the new platformAccountId field
  • Verify that existing requests without platformAccountId still work as expected
  • Confirm that requests with platformAccountId properly store and reference the platform's identifier

Why make this change?

This change allows platforms to associate their own internal account identifiers with external accounts, enabling easier account management and reference within their own systems while maintaining compatibility with the existing API structure.

Copy link
Contributor Author

pengying commented Feb 20, 2026

@pengying pengying marked this pull request as ready for review February 20, 2026 23:38
@github-actions
Copy link

github-actions bot commented Feb 20, 2026

✱ Stainless preview builds

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

kotlin

fix(api): flatten external account create parameters

openapi

feat(api): add platformAccountId parameter to external account creation

python

feat(api): remove customer_id, default_uma_deposit_account params from external_accounts create

typescript

fix(api): remove customerId, defaultUmaDepositAccount from external accounts create

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

grid-openapi studio · code · diff

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

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/c5b9eb532a1319b5af36257aeff5f9ee85f77e74/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code · diff

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

grid-typescript studio · code · diff

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

npm install https://pkg.stainless.com/s/grid-typescript/1d8491fb356660e24b6a399a1e63ca820a5e2f32/dist.tar.gz

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-02-20 23:44:49 UTC

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

Creates a dedicated PlatformExternalAccountCreateRequest schema that removes customer-specific fields (customerId and defaultUmaDepositAccount) from platform external account creation, making the API more semantically correct.

  • New schema properly restricts platform external accounts to platform-level fields
  • Maintains platformAccountId field for platform's internal account tracking
  • Generated bundle files (openapi.yaml, mintlify/openapi.yaml) updated correctly
  • One syntax issue found: example has platformAccountId incorrectly nested inside accountInfo (pre-existing in codebase)

Confidence Score: 4/5

  • This PR is safe to merge with one minor syntax fix needed in the example
  • The schema design is sound and properly separates platform vs customer concerns. Only issue is a pre-existing example syntax error where platformAccountId is incorrectly nested inside accountInfo instead of being a top-level field
  • Fix the example in openapi/paths/platform/platform_external_accounts.yaml to move platformAccountId to top-level

Important Files Changed

Filename Overview
openapi/components/schemas/external_accounts/PlatformExternalAccountCreateRequest.yaml New schema created for platform external account creation, properly excludes customer-specific fields
openapi/paths/platform/platform_external_accounts.yaml Updated to use new schema; example incorrectly nests platformAccountId inside accountInfo (pre-existing issue)

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Client Request] --> B{Endpoint Type?}
    B -->|Platform| C[POST /platform/external_accounts]
    B -->|Customer| D[POST /customers/external_accounts]
    
    C --> E[PlatformExternalAccountCreateRequest]
    D --> F[ExternalAccountCreateRequest]
    
    E --> G{Required Fields}
    F --> H{Required Fields}
    
    G --> I[currency]
    G --> J[accountInfo]
    G --> K[platformAccountId optional]
    
    H --> L[currency]
    H --> M[accountInfo]
    H --> N[customerId optional]
    H --> O[platformAccountId optional]
    H --> P[defaultUmaDepositAccount optional]
    
    E --> Q[Creates Platform Account]
    F --> R[Creates Customer Account]
Loading

Last reviewed commit: fabaec1

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Additional Comments (1)

openapi/paths/platform/platform_external_accounts.yaml
platformAccountId should be a top-level field, not nested inside accountInfo. Move it outside to align with the schema.

              platformAccountId: ext_acc_123456
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/paths/platform/platform_external_accounts.yaml
Line: 94

Comment:
`platformAccountId` should be a top-level field, not nested inside `accountInfo`. Move it outside to align with the schema.

```suggestion
              platformAccountId: ext_acc_123456
```

How can I resolve this? If you propose a fix, please make it concise.

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.

1 participant