From c9f3e32b31abdeffcf510a1bce5e16f6292170d9 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Mon, 20 Apr 2026 17:23:33 -0700 Subject: [PATCH] feat(openapi): add GET/PATCH/DELETE for external accounts by ID --- mintlify/openapi.yaml | 332 ++++++++++++++++++ openapi.yaml | 332 ++++++++++++++++++ .../ExternalAccountUpdateRequest.yaml | 10 + openapi/openapi.yaml | 4 + ...external_accounts_{externalAccountId}.yaml | 135 +++++++ ...external_accounts_{externalAccountId}.yaml | 135 +++++++ 6 files changed, 948 insertions(+) create mode 100644 openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml create mode 100644 openapi/paths/customers/customers_external_accounts_{externalAccountId}.yaml create mode 100644 openapi/paths/platform/platform_external_accounts_{externalAccountId}.yaml diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 05338991..b06eaeb6 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -997,6 +997,140 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /customers/external-accounts/{externalAccountId}: + parameters: + - name: externalAccountId + in: path + description: System-generated unique external account identifier + required: true + schema: + type: string + get: + summary: Get customer external account by ID + description: Retrieve a customer external account by its system-generated ID + operationId: getCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + patch: + summary: Update customer external account by ID + description: Update mutable fields on a customer external account. Only `platformAccountId` and `beneficiary` can be updated via this endpoint. + operationId: updateCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccountUpdateRequest' + examples: + updatePlatformAccountId: + summary: Update platform account identifier + value: + platformAccountId: ext_acc_654321 + updateBeneficiary: + summary: Update beneficiary information + value: + 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 + responses: + '200': + description: External account updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + delete: + summary: Delete customer external account by ID + description: Delete a customer external account by its system-generated ID + operationId: deleteCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '204': + description: External account deleted successfully + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' /platform/external-accounts: get: summary: List platform external accounts @@ -1116,6 +1250,140 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /platform/external-accounts/{externalAccountId}: + parameters: + - name: externalAccountId + in: path + description: System-generated unique external account identifier + required: true + schema: + type: string + get: + summary: Get platform external account by ID + description: Retrieve a platform external account by its system-generated ID + operationId: getPlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + patch: + summary: Update platform external account by ID + description: Update mutable fields on a platform external account. Only `platformAccountId` and `beneficiary` can be updated via this endpoint. + operationId: updatePlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccountUpdateRequest' + examples: + updatePlatformAccountId: + summary: Update platform account identifier + value: + platformAccountId: ext_acc_654321 + updateBeneficiary: + summary: Update beneficiary information + value: + 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 + responses: + '200': + description: External account updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + delete: + summary: Delete platform external account by ID + description: Delete a platform external account by its system-generated ID + operationId: deletePlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '204': + description: External account deleted successfully + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' /beneficial-owners: post: summary: Create a beneficial owner @@ -10702,6 +10970,70 @@ components: example: SOLANA_MAINNET accountInfo: $ref: '#/components/schemas/ExternalAccountCreateInfoOneOf' + BeneficiaryType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Whether the beneficiary is an individual or a business entity + example: INDIVIDUAL + BaseBeneficiary: + type: object + required: + - beneficiaryType + properties: + beneficiaryType: + $ref: '#/components/schemas/BeneficiaryType' + address: + $ref: '#/components/schemas/Address' + IndividualBeneficiary: + title: Individual Beneficiary + allOf: + - $ref: '#/components/schemas/BaseBeneficiary' + - type: object + required: + - fullName + - birthDate + - nationality + - beneficiaryType + properties: + beneficiaryType: + type: string + enum: + - INDIVIDUAL + fullName: + type: string + description: Individual's full name + example: John Michael Doe + birthDate: + type: string + format: date + description: Date of birth in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: Country code (ISO 3166-1 alpha-2) + example: US + BeneficiaryOneOf: + oneOf: + - $ref: '#/components/schemas/IndividualBeneficiary' + - $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + ExternalAccountUpdateRequest: + type: object + description: Request body for updating an external account. Only a limited set of fields are mutable. + properties: + platformAccountId: + type: string + description: Optional platform-specific identifier for this account + example: acc_123456789 + beneficiary: + $ref: '#/components/schemas/BeneficiaryOneOf' + description: Updated beneficiary information for the external account PlatformExternalAccountListResponse: type: object required: diff --git a/openapi.yaml b/openapi.yaml index 05338991..b06eaeb6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -997,6 +997,140 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /customers/external-accounts/{externalAccountId}: + parameters: + - name: externalAccountId + in: path + description: System-generated unique external account identifier + required: true + schema: + type: string + get: + summary: Get customer external account by ID + description: Retrieve a customer external account by its system-generated ID + operationId: getCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + patch: + summary: Update customer external account by ID + description: Update mutable fields on a customer external account. Only `platformAccountId` and `beneficiary` can be updated via this endpoint. + operationId: updateCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccountUpdateRequest' + examples: + updatePlatformAccountId: + summary: Update platform account identifier + value: + platformAccountId: ext_acc_654321 + updateBeneficiary: + summary: Update beneficiary information + value: + 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 + responses: + '200': + description: External account updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + delete: + summary: Delete customer external account by ID + description: Delete a customer external account by its system-generated ID + operationId: deleteCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '204': + description: External account deleted successfully + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' /platform/external-accounts: get: summary: List platform external accounts @@ -1116,6 +1250,140 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /platform/external-accounts/{externalAccountId}: + parameters: + - name: externalAccountId + in: path + description: System-generated unique external account identifier + required: true + schema: + type: string + get: + summary: Get platform external account by ID + description: Retrieve a platform external account by its system-generated ID + operationId: getPlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + patch: + summary: Update platform external account by ID + description: Update mutable fields on a platform external account. Only `platformAccountId` and `beneficiary` can be updated via this endpoint. + operationId: updatePlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccountUpdateRequest' + examples: + updatePlatformAccountId: + summary: Update platform account identifier + value: + platformAccountId: ext_acc_654321 + updateBeneficiary: + summary: Update beneficiary information + value: + 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 + responses: + '200': + description: External account updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalAccount' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' + delete: + summary: Delete platform external account by ID + description: Delete a platform external account by its system-generated ID + operationId: deletePlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '204': + description: External account deleted successfully + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: External account not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + '500': + description: Internal service error + content: + application/json: + schema: + $ref: '#/components/schemas/Error500' /beneficial-owners: post: summary: Create a beneficial owner @@ -10702,6 +10970,70 @@ components: example: SOLANA_MAINNET accountInfo: $ref: '#/components/schemas/ExternalAccountCreateInfoOneOf' + BeneficiaryType: + type: string + enum: + - INDIVIDUAL + - BUSINESS + description: Whether the beneficiary is an individual or a business entity + example: INDIVIDUAL + BaseBeneficiary: + type: object + required: + - beneficiaryType + properties: + beneficiaryType: + $ref: '#/components/schemas/BeneficiaryType' + address: + $ref: '#/components/schemas/Address' + IndividualBeneficiary: + title: Individual Beneficiary + allOf: + - $ref: '#/components/schemas/BaseBeneficiary' + - type: object + required: + - fullName + - birthDate + - nationality + - beneficiaryType + properties: + beneficiaryType: + type: string + enum: + - INDIVIDUAL + fullName: + type: string + description: Individual's full name + example: John Michael Doe + birthDate: + type: string + format: date + description: Date of birth in ISO 8601 format (YYYY-MM-DD) + example: '1990-01-15' + nationality: + type: string + description: Country code (ISO 3166-1 alpha-2) + example: US + BeneficiaryOneOf: + oneOf: + - $ref: '#/components/schemas/IndividualBeneficiary' + - $ref: '#/components/schemas/BusinessBeneficiary' + discriminator: + propertyName: beneficiaryType + mapping: + INDIVIDUAL: '#/components/schemas/IndividualBeneficiary' + BUSINESS: '#/components/schemas/BusinessBeneficiary' + ExternalAccountUpdateRequest: + type: object + description: Request body for updating an external account. Only a limited set of fields are mutable. + properties: + platformAccountId: + type: string + description: Optional platform-specific identifier for this account + example: acc_123456789 + beneficiary: + $ref: '#/components/schemas/BeneficiaryOneOf' + description: Updated beneficiary information for the external account PlatformExternalAccountListResponse: type: object required: diff --git a/openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml b/openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml new file mode 100644 index 00000000..14573346 --- /dev/null +++ b/openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Request body for updating an external account. Only a limited set of fields are mutable. +properties: + platformAccountId: + type: string + description: Optional platform-specific identifier for this account + example: acc_123456789 + beneficiary: + $ref: ./BeneficiaryOneOf.yaml + description: Updated beneficiary information for the external account diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 113747c9..ccb3ef48 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -103,8 +103,12 @@ paths: $ref: paths/platform/platform_internal_accounts.yaml /customers/external-accounts: $ref: paths/customers/customers_external_accounts.yaml + /customers/external-accounts/{externalAccountId}: + $ref: paths/customers/customers_external_accounts_{externalAccountId}.yaml /platform/external-accounts: $ref: paths/platform/platform_external_accounts.yaml + /platform/external-accounts/{externalAccountId}: + $ref: paths/platform/platform_external_accounts_{externalAccountId}.yaml /beneficial-owners: $ref: paths/beneficial-owners/beneficial_owners.yaml /beneficial-owners/{beneficialOwnerId}: diff --git a/openapi/paths/customers/customers_external_accounts_{externalAccountId}.yaml b/openapi/paths/customers/customers_external_accounts_{externalAccountId}.yaml new file mode 100644 index 00000000..23a266dd --- /dev/null +++ b/openapi/paths/customers/customers_external_accounts_{externalAccountId}.yaml @@ -0,0 +1,135 @@ +parameters: + - name: externalAccountId + in: path + description: System-generated unique external account identifier + required: true + schema: + type: string +get: + summary: Get customer external account by ID + description: Retrieve a customer external account by its system-generated ID + operationId: getCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: ../../components/schemas/external_accounts/ExternalAccount.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: External account not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml + '500': + description: Internal service error + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error500.yaml +patch: + summary: Update customer external account by ID + description: >- + Update mutable fields on a customer external account. Only `platformAccountId` and + `beneficiary` can be updated via this endpoint. + operationId: updateCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: ../../components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml + examples: + updatePlatformAccountId: + summary: Update platform account identifier + value: + platformAccountId: ext_acc_654321 + updateBeneficiary: + summary: Update beneficiary information + value: + 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 + responses: + '200': + description: External account updated successfully + content: + application/json: + schema: + $ref: ../../components/schemas/external_accounts/ExternalAccount.yaml + '400': + description: Bad request + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error400.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: External account not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml + '500': + description: Internal service error + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error500.yaml +delete: + summary: Delete customer external account by ID + description: Delete a customer external account by its system-generated ID + operationId: deleteCustomerExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '204': + description: External account deleted successfully + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: External account not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml + '500': + description: Internal service error + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error500.yaml diff --git a/openapi/paths/platform/platform_external_accounts_{externalAccountId}.yaml b/openapi/paths/platform/platform_external_accounts_{externalAccountId}.yaml new file mode 100644 index 00000000..8b15901d --- /dev/null +++ b/openapi/paths/platform/platform_external_accounts_{externalAccountId}.yaml @@ -0,0 +1,135 @@ +parameters: + - name: externalAccountId + in: path + description: System-generated unique external account identifier + required: true + schema: + type: string +get: + summary: Get platform external account by ID + description: Retrieve a platform external account by its system-generated ID + operationId: getPlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: ../../components/schemas/external_accounts/ExternalAccount.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: External account not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml + '500': + description: Internal service error + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error500.yaml +patch: + summary: Update platform external account by ID + description: >- + Update mutable fields on a platform external account. Only `platformAccountId` and + `beneficiary` can be updated via this endpoint. + operationId: updatePlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: ../../components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml + examples: + updatePlatformAccountId: + summary: Update platform account identifier + value: + platformAccountId: ext_acc_654321 + updateBeneficiary: + summary: Update beneficiary information + value: + 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 + responses: + '200': + description: External account updated successfully + content: + application/json: + schema: + $ref: ../../components/schemas/external_accounts/ExternalAccount.yaml + '400': + description: Bad request + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error400.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: External account not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml + '500': + description: Internal service error + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error500.yaml +delete: + summary: Delete platform external account by ID + description: Delete a platform external account by its system-generated ID + operationId: deletePlatformExternalAccountById + tags: + - External Accounts + security: + - BasicAuth: [] + responses: + '204': + description: External account deleted successfully + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: External account not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml + '500': + description: Internal service error + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error500.yaml