From 814f4b54c4272d1ff3e982eec70b076784bd33a5 Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 20 Feb 2026 15:47:50 -0800 Subject: [PATCH] feat: extracting inline schemas to their own schema objects for better code gen --- mintlify/openapi.yaml | 465 +++++++++--------- openapi.yaml | 465 +++++++++--------- .../config/PlatformConfigUpdateRequest.yaml | 12 + .../BulkCustomerImportJobAccepted.yaml | 14 + .../schemas/customers/KycLinkResponse.yaml | 14 + .../UmaInvitationClaimRequest.yaml | 8 + .../UmaInvitationCreateRequest.yaml | 36 ++ .../schemas/sandbox/SandboxFundRequest.yaml | 13 + .../schemas/sandbox/SandboxSendRequest.yaml | 21 + .../sandbox/SandboxUmaReceiveRequest.yaml | 32 ++ .../schemas/tokens/ApiTokenCreateRequest.yaml | 14 + .../transactions/ApprovePaymentRequest.yaml | 9 + .../transactions/RejectPaymentRequest.yaml | 8 + .../schemas/transfers/TransferInRequest.yaml | 32 ++ .../schemas/transfers/TransferOutRequest.yaml | 32 ++ .../paths/customers/customers_bulk_csv.yaml | 15 +- .../paths/customers/customers_kyc_link.yaml | 15 +- openapi/paths/invitations/invitations.yaml | 37 +- .../invitations_{invitationCode}_claim.yaml | 9 +- openapi/paths/platform/config.yaml | 13 +- ...ox_internal_accounts_{accountId}_fund.yaml | 14 +- openapi/paths/sandbox/sandbox_send.yaml | 22 +- .../paths/sandbox/sandbox_uma_receive.yaml | 33 +- openapi/paths/tokens/tokens.yaml | 16 +- .../transactions_{transactionId}_approve.yaml | 10 +- .../transactions_{transactionId}_reject.yaml | 9 +- openapi/paths/transfers/transfer_in.yaml | 33 +- openapi/paths/transfers/transfer_out.yaml | 33 +- 28 files changed, 748 insertions(+), 686 deletions(-) create mode 100644 openapi/components/schemas/config/PlatformConfigUpdateRequest.yaml create mode 100644 openapi/components/schemas/customers/BulkCustomerImportJobAccepted.yaml create mode 100644 openapi/components/schemas/customers/KycLinkResponse.yaml create mode 100644 openapi/components/schemas/invitations/UmaInvitationClaimRequest.yaml create mode 100644 openapi/components/schemas/invitations/UmaInvitationCreateRequest.yaml create mode 100644 openapi/components/schemas/sandbox/SandboxFundRequest.yaml create mode 100644 openapi/components/schemas/sandbox/SandboxSendRequest.yaml create mode 100644 openapi/components/schemas/sandbox/SandboxUmaReceiveRequest.yaml create mode 100644 openapi/components/schemas/tokens/ApiTokenCreateRequest.yaml create mode 100644 openapi/components/schemas/transactions/ApprovePaymentRequest.yaml create mode 100644 openapi/components/schemas/transactions/RejectPaymentRequest.yaml create mode 100644 openapi/components/schemas/transfers/TransferInRequest.yaml create mode 100644 openapi/components/schemas/transfers/TransferOutRequest.yaml diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index e0b39209..1e661be7 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -82,18 +82,7 @@ paths: content: application/json: schema: - type: object - properties: - umaDomain: - type: string - example: mycompany.com - webhookEndpoint: - type: string - example: https://api.mycompany.com/webhooks/uma - supportedCurrencies: - type: array - items: - $ref: '#/components/schemas/PlatformCurrencyConfig' + $ref: '#/components/schemas/PlatformConfigUpdateRequest' example: umaDomain: mycompany.com webhookEndpoint: https://api.mycompany.com/webhooks/uma @@ -644,20 +633,7 @@ paths: content: application/json: schema: - type: object - properties: - kycUrl: - type: string - description: A hosted KYC link for your customer to complete KYC - example: https://example.com/redirect - platformCustomerId: - type: string - description: The platform id of the customer to onboard - example: 019542f5-b3e7-1d02-0000-000000000001 - customerId: - type: string - description: The customer id of the newly created customer on the system - example: Customer:019542f5-b3e7-1d02-0000-000000000001 + $ref: '#/components/schemas/KycLinkResponse' '401': description: Unauthorized content: @@ -1259,36 +1235,7 @@ paths: content: application/json: schema: - type: object - required: - - source - - destination - properties: - source: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an external account ID - example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - description: Source external account details - destination: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an internal account ID - example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - description: Destination internal account details - amount: - type: integer - format: int64 - description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) - example: 12550 + $ref: '#/components/schemas/TransferInRequest' examples: transferIn: summary: Transfer from external to internal account @@ -1353,36 +1300,7 @@ paths: content: application/json: schema: - type: object - required: - - source - - destination - properties: - source: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an internal account ID - example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - description: Source internal account details - destination: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an external account ID - example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - description: Destination external account details - amount: - type: integer - format: int64 - description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) - example: 12550 + $ref: '#/components/schemas/TransferOutRequest' examples: transferOut: summary: Transfer from internal to external account @@ -2154,12 +2072,7 @@ paths: content: application/json: schema: - type: object - properties: - receiverCustomerInfo: - type: object - additionalProperties: true - description: Information about the recipient, provided by the platform if requested in the original webhook via `requestedReceiverCustomerInfoFields`. + $ref: '#/components/schemas/ApprovePaymentRequest' responses: '200': description: Payment approved successfully @@ -2220,12 +2133,7 @@ paths: content: application/json: schema: - type: object - properties: - reason: - type: string - description: Optional reason for rejecting the payment. This is just for debugging purposes or can be used for a platform's own purposes. - example: RESTRICTED_JURISDICTION + $ref: '#/components/schemas/RejectPaymentRequest' responses: '200': description: Payment rejected successfully @@ -2374,20 +2282,7 @@ paths: content: application/json: schema: - type: object - required: - - jobId - - status - properties: - jobId: - type: string - description: Unique identifier for the bulk import job - example: Job:019542f5-b3e7-1d02-0000-000000000006 - status: - type: string - enum: - - PENDING - - PROCESSING + $ref: '#/components/schemas/BulkCustomerImportJobAccepted' '401': description: Unauthorized content: @@ -2464,33 +2359,7 @@ paths: content: application/json: schema: - type: object - required: - - inviterUma - properties: - inviterUma: - type: string - description: The UMA address of the customer creating the invitation - example: $inviter@uma.domain - firstName: - type: string - description: First name of the invitee to show as part of the invite - example: Alice - amountToSend: - description: | - An amount to send (in the smallest unit of the customer's currency) to the invitee when the invitation is claimed. - This is optional and if not provided, the invitee will not receive any amount. Note that the actual sending of - the amount must be done by the inviter platform once the INVITATION_CLAIMED webhook is received. If the inviter - platform either does not send the payment or the payment fails, the invitee will not receive this amount. This - field is primarily used for display purposes on the claiming side of the invitation. - type: integer - format: int64 - example: 12550 - expiresAt: - type: string - format: date-time - description: When the invitation expires (if at all) - example: '2025-09-01T14:30:00Z' + $ref: '#/components/schemas/UmaInvitationCreateRequest' responses: '201': description: Invitation created successfully @@ -2587,14 +2456,7 @@ paths: content: application/json: schema: - type: object - required: - - inviteeUma - properties: - inviteeUma: - type: string - description: The UMA address of the customer claiming the invitation - example: $invitee@uma.domain + $ref: '#/components/schemas/UmaInvitationClaimRequest' responses: '200': description: Invitation claimed successfully @@ -2704,25 +2566,7 @@ paths: content: application/json: schema: - type: object - required: - - quoteId - - currencyCode - properties: - quoteId: - type: string - description: The unique identifier of the quote - example: Quote:019542f5-b3e7-1d02-0000-000000000006 - currencyCode: - type: string - description: Currency code for the funds to be sent - example: USD - currencyAmount: - type: integer - format: int64 - description: The amount to send in the smallest unit of the currency (eg. cents). If not provided, the amount will be derived from the quote. - exclusiveMinimum: 0 - example: 1000 + $ref: '#/components/schemas/SandboxSendRequest' responses: '200': description: Funds received successfully @@ -2776,34 +2620,7 @@ paths: content: application/json: schema: - type: object - required: - - senderUmaAddress - - receivingCurrencyCode - - receivingCurrencyAmount - properties: - senderUmaAddress: - type: string - description: UMA address of the sender from the sandbox - example: $success.usd@sandbox.grid.uma.money - receiverUmaAddress: - type: string - description: UMA address of the receiver (optional if customerId is provided) - example: $receiver@uma.domain - customerId: - type: string - description: System ID of the receiver (optional if receiverUmaAddress is provided) - example: Customer:019542f5-b3e7-1d02-0000-000000000001 - receivingCurrencyCode: - type: string - description: The currency code for the receiving amount - example: USD - receivingCurrencyAmount: - type: integer - format: int64 - description: The amount to be received in the smallest unit of the currency (eg. cents) - exclusiveMinimum: 0 - example: 1000 + $ref: '#/components/schemas/SandboxUmaReceiveRequest' responses: '200': description: Payment triggered successfully @@ -2865,17 +2682,7 @@ paths: content: application/json: schema: - type: object - required: - - amount - properties: - amount: - type: integer - format: int64 - description: Amount to add in the smallest unit of the account's currency (e.g., cents for USD/EUR, satoshis for BTC) - exclusiveMinimum: 0 - maximum: 100000000000 - example: 100000 + $ref: '#/components/schemas/SandboxFundRequest' examples: fundUSDAccount: summary: Fund USD internal account with $1,000 @@ -3025,21 +2832,7 @@ paths: content: application/json: schema: - type: object - title: tokenCreate - properties: - name: - type: string - description: Name of the token to help identify it - example: Sandbox read-only - permissions: - type: array - description: A list of permissions to grant to the token - items: - $ref: '#/components/schemas/Permission' - required: - - name - - permissions + $ref: '#/components/schemas/ApiTokenCreateRequest' responses: '201': description: API token created successfully @@ -4131,6 +3924,19 @@ components: type: object description: Additional error details additionalProperties: true + PlatformConfigUpdateRequest: + type: object + properties: + umaDomain: + type: string + example: mycompany.com + webhookEndpoint: + type: string + example: https://api.mycompany.com/webhooks/uma + supportedCurrencies: + type: array + items: + $ref: '#/components/schemas/PlatformCurrencyConfig' Error400: type: object required: @@ -4752,6 +4558,21 @@ components: mapping: INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdateRequest' BUSINESS: '#/components/schemas/BusinessCustomerUpdateRequest' + KycLinkResponse: + type: object + properties: + kycUrl: + type: string + description: A hosted KYC link for your customer to complete KYC + example: https://example.com/redirect + platformCustomerId: + type: string + description: The platform id of the customer to onboard + example: 019542f5-b3e7-1d02-0000-000000000001 + customerId: + type: string + description: The customer id of the newly created customer on the system + example: Customer:019542f5-b3e7-1d02-0000-000000000001 CurrencyAmount: type: object required: @@ -5854,6 +5675,37 @@ components: Optional Plaid account ID if the customer selected a specific account. If not provided, the default account will be used. example: plaid_account_id_123 + TransferInRequest: + type: object + required: + - source + - destination + properties: + source: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Source external account details + destination: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an internal account ID + example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination internal account details + amount: + type: integer + format: int64 + description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) + example: 12550 IncomingTransaction: allOf: - $ref: '#/components/schemas/Transaction' @@ -6351,6 +6203,37 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + TransferOutRequest: + type: object + required: + - source + - destination + properties: + source: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an internal account ID + example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Source internal account details + destination: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Destination external account details + amount: + type: integer + format: int64 + description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) + example: 12550 CurrencyPreference: type: object required: @@ -6792,6 +6675,20 @@ components: example: FULL_NAME: Jane Receiver NATIONALITY: FR + ApprovePaymentRequest: + type: object + properties: + receiverCustomerInfo: + type: object + additionalProperties: true + description: Information about the recipient, provided by the platform if requested in the original webhook via `requestedReceiverCustomerInfoFields`. + RejectPaymentRequest: + type: object + properties: + reason: + type: string + description: Optional reason for rejecting the payment. This is just for debugging purposes or can be used for a platform's own purposes. + example: RESTRICTED_JURISDICTION TestWebhookResponse: type: object required: @@ -6809,6 +6706,21 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + BulkCustomerImportJobAccepted: + type: object + required: + - jobId + - status + properties: + jobId: + type: string + description: Unique identifier for the bulk import job + example: Job:019542f5-b3e7-1d02-0000-000000000006 + status: + type: string + enum: + - PENDING + - PROCESSING GridError: type: object title: GridError @@ -6889,6 +6801,34 @@ components: format: date-time description: Timestamp when the job completed (only present for COMPLETED or FAILED status) example: '2025-08-15T14:32:00Z' + UmaInvitationCreateRequest: + type: object + required: + - inviterUma + properties: + inviterUma: + type: string + description: The UMA address of the customer creating the invitation + example: $inviter@uma.domain + firstName: + type: string + description: First name of the invitee to show as part of the invite + example: Alice + amountToSend: + description: | + An amount to send (in the smallest unit of the customer's currency) to the invitee when the invitation is claimed. + This is optional and if not provided, the invitee will not receive any amount. Note that the actual sending of + the amount must be done by the inviter platform once the INVITATION_CLAIMED webhook is received. If the inviter + platform either does not send the payment or the payment fails, the invitee will not receive this amount. This + field is primarily used for display purposes on the claiming side of the invitation. + type: integer + format: int64 + example: 12550 + expiresAt: + type: string + format: date-time + description: When the invitation expires (if at all) + example: '2025-09-01T14:30:00Z' UmaInvitation: type: object required: @@ -6947,6 +6887,15 @@ components: description: |- The amount to send to the invitee when the invitation is claimed. This is optional and if not provided, the invitee will not receive any amount. Note that the actual sending of the amount must be done by the inviter platform once the INVITATION_CLAIMED webhook is received. If the inviter platform either does not send the payment or the payment fails, the invitee will not receive this amount. This field is primarily used for display purposes on the claiming side of the invitation. This field is useful for "send-by-link" style customer flows where an inviter can send a payment simply by sharing a link without knowing the receiver's UMA address. Note that these sends can only be sender-locked, meaning that the sender will not know ahead of time how much the receiver will receive in the receiving currency. + UmaInvitationClaimRequest: + type: object + required: + - inviteeUma + properties: + inviteeUma: + type: string + description: The UMA address of the customer claiming the invitation + example: $invitee@uma.domain Error403: type: object required: @@ -6980,6 +6929,67 @@ components: type: object description: Additional error details additionalProperties: true + SandboxSendRequest: + type: object + required: + - quoteId + - currencyCode + properties: + quoteId: + type: string + description: The unique identifier of the quote + example: Quote:019542f5-b3e7-1d02-0000-000000000006 + currencyCode: + type: string + description: Currency code for the funds to be sent + example: USD + currencyAmount: + type: integer + format: int64 + description: The amount to send in the smallest unit of the currency (eg. cents). If not provided, the amount will be derived from the quote. + exclusiveMinimum: 0 + example: 1000 + SandboxUmaReceiveRequest: + type: object + required: + - senderUmaAddress + - receivingCurrencyCode + - receivingCurrencyAmount + properties: + senderUmaAddress: + type: string + description: UMA address of the sender from the sandbox + example: $success.usd@sandbox.grid.uma.money + receiverUmaAddress: + type: string + description: UMA address of the receiver (optional if customerId is provided) + example: $receiver@uma.domain + customerId: + type: string + description: System ID of the receiver (optional if receiverUmaAddress is provided) + example: Customer:019542f5-b3e7-1d02-0000-000000000001 + receivingCurrencyCode: + type: string + description: The currency code for the receiving amount + example: USD + receivingCurrencyAmount: + type: integer + format: int64 + description: The amount to be received in the smallest unit of the currency (eg. cents) + exclusiveMinimum: 0 + example: 1000 + SandboxFundRequest: + type: object + required: + - amount + properties: + amount: + type: integer + format: int64 + description: Amount to add in the smallest unit of the account's currency (e.g., cents for USD/EUR, satoshis for BTC) + exclusiveMinimum: 0 + maximum: 100000000000 + example: 100000 UmaProvider: type: object properties: @@ -7069,6 +7079,21 @@ components: format: date-time description: Last update timestamp example: '2025-07-21T17:32:28Z' + ApiTokenCreateRequest: + type: object + required: + - name + - permissions + properties: + name: + type: string + description: Name of the token to help identify it + example: Sandbox read-only + permissions: + type: array + description: A list of permissions to grant to the token + items: + $ref: '#/components/schemas/Permission' IncomingPaymentWebhook: allOf: - $ref: '#/components/schemas/BaseWebhook' diff --git a/openapi.yaml b/openapi.yaml index e0b39209..1e661be7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -82,18 +82,7 @@ paths: content: application/json: schema: - type: object - properties: - umaDomain: - type: string - example: mycompany.com - webhookEndpoint: - type: string - example: https://api.mycompany.com/webhooks/uma - supportedCurrencies: - type: array - items: - $ref: '#/components/schemas/PlatformCurrencyConfig' + $ref: '#/components/schemas/PlatformConfigUpdateRequest' example: umaDomain: mycompany.com webhookEndpoint: https://api.mycompany.com/webhooks/uma @@ -644,20 +633,7 @@ paths: content: application/json: schema: - type: object - properties: - kycUrl: - type: string - description: A hosted KYC link for your customer to complete KYC - example: https://example.com/redirect - platformCustomerId: - type: string - description: The platform id of the customer to onboard - example: 019542f5-b3e7-1d02-0000-000000000001 - customerId: - type: string - description: The customer id of the newly created customer on the system - example: Customer:019542f5-b3e7-1d02-0000-000000000001 + $ref: '#/components/schemas/KycLinkResponse' '401': description: Unauthorized content: @@ -1259,36 +1235,7 @@ paths: content: application/json: schema: - type: object - required: - - source - - destination - properties: - source: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an external account ID - example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - description: Source external account details - destination: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an internal account ID - example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - description: Destination internal account details - amount: - type: integer - format: int64 - description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) - example: 12550 + $ref: '#/components/schemas/TransferInRequest' examples: transferIn: summary: Transfer from external to internal account @@ -1353,36 +1300,7 @@ paths: content: application/json: schema: - type: object - required: - - source - - destination - properties: - source: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an internal account ID - example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - description: Source internal account details - destination: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an external account ID - example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - description: Destination external account details - amount: - type: integer - format: int64 - description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) - example: 12550 + $ref: '#/components/schemas/TransferOutRequest' examples: transferOut: summary: Transfer from internal to external account @@ -2154,12 +2072,7 @@ paths: content: application/json: schema: - type: object - properties: - receiverCustomerInfo: - type: object - additionalProperties: true - description: Information about the recipient, provided by the platform if requested in the original webhook via `requestedReceiverCustomerInfoFields`. + $ref: '#/components/schemas/ApprovePaymentRequest' responses: '200': description: Payment approved successfully @@ -2220,12 +2133,7 @@ paths: content: application/json: schema: - type: object - properties: - reason: - type: string - description: Optional reason for rejecting the payment. This is just for debugging purposes or can be used for a platform's own purposes. - example: RESTRICTED_JURISDICTION + $ref: '#/components/schemas/RejectPaymentRequest' responses: '200': description: Payment rejected successfully @@ -2374,20 +2282,7 @@ paths: content: application/json: schema: - type: object - required: - - jobId - - status - properties: - jobId: - type: string - description: Unique identifier for the bulk import job - example: Job:019542f5-b3e7-1d02-0000-000000000006 - status: - type: string - enum: - - PENDING - - PROCESSING + $ref: '#/components/schemas/BulkCustomerImportJobAccepted' '401': description: Unauthorized content: @@ -2464,33 +2359,7 @@ paths: content: application/json: schema: - type: object - required: - - inviterUma - properties: - inviterUma: - type: string - description: The UMA address of the customer creating the invitation - example: $inviter@uma.domain - firstName: - type: string - description: First name of the invitee to show as part of the invite - example: Alice - amountToSend: - description: | - An amount to send (in the smallest unit of the customer's currency) to the invitee when the invitation is claimed. - This is optional and if not provided, the invitee will not receive any amount. Note that the actual sending of - the amount must be done by the inviter platform once the INVITATION_CLAIMED webhook is received. If the inviter - platform either does not send the payment or the payment fails, the invitee will not receive this amount. This - field is primarily used for display purposes on the claiming side of the invitation. - type: integer - format: int64 - example: 12550 - expiresAt: - type: string - format: date-time - description: When the invitation expires (if at all) - example: '2025-09-01T14:30:00Z' + $ref: '#/components/schemas/UmaInvitationCreateRequest' responses: '201': description: Invitation created successfully @@ -2587,14 +2456,7 @@ paths: content: application/json: schema: - type: object - required: - - inviteeUma - properties: - inviteeUma: - type: string - description: The UMA address of the customer claiming the invitation - example: $invitee@uma.domain + $ref: '#/components/schemas/UmaInvitationClaimRequest' responses: '200': description: Invitation claimed successfully @@ -2704,25 +2566,7 @@ paths: content: application/json: schema: - type: object - required: - - quoteId - - currencyCode - properties: - quoteId: - type: string - description: The unique identifier of the quote - example: Quote:019542f5-b3e7-1d02-0000-000000000006 - currencyCode: - type: string - description: Currency code for the funds to be sent - example: USD - currencyAmount: - type: integer - format: int64 - description: The amount to send in the smallest unit of the currency (eg. cents). If not provided, the amount will be derived from the quote. - exclusiveMinimum: 0 - example: 1000 + $ref: '#/components/schemas/SandboxSendRequest' responses: '200': description: Funds received successfully @@ -2776,34 +2620,7 @@ paths: content: application/json: schema: - type: object - required: - - senderUmaAddress - - receivingCurrencyCode - - receivingCurrencyAmount - properties: - senderUmaAddress: - type: string - description: UMA address of the sender from the sandbox - example: $success.usd@sandbox.grid.uma.money - receiverUmaAddress: - type: string - description: UMA address of the receiver (optional if customerId is provided) - example: $receiver@uma.domain - customerId: - type: string - description: System ID of the receiver (optional if receiverUmaAddress is provided) - example: Customer:019542f5-b3e7-1d02-0000-000000000001 - receivingCurrencyCode: - type: string - description: The currency code for the receiving amount - example: USD - receivingCurrencyAmount: - type: integer - format: int64 - description: The amount to be received in the smallest unit of the currency (eg. cents) - exclusiveMinimum: 0 - example: 1000 + $ref: '#/components/schemas/SandboxUmaReceiveRequest' responses: '200': description: Payment triggered successfully @@ -2865,17 +2682,7 @@ paths: content: application/json: schema: - type: object - required: - - amount - properties: - amount: - type: integer - format: int64 - description: Amount to add in the smallest unit of the account's currency (e.g., cents for USD/EUR, satoshis for BTC) - exclusiveMinimum: 0 - maximum: 100000000000 - example: 100000 + $ref: '#/components/schemas/SandboxFundRequest' examples: fundUSDAccount: summary: Fund USD internal account with $1,000 @@ -3025,21 +2832,7 @@ paths: content: application/json: schema: - type: object - title: tokenCreate - properties: - name: - type: string - description: Name of the token to help identify it - example: Sandbox read-only - permissions: - type: array - description: A list of permissions to grant to the token - items: - $ref: '#/components/schemas/Permission' - required: - - name - - permissions + $ref: '#/components/schemas/ApiTokenCreateRequest' responses: '201': description: API token created successfully @@ -4131,6 +3924,19 @@ components: type: object description: Additional error details additionalProperties: true + PlatformConfigUpdateRequest: + type: object + properties: + umaDomain: + type: string + example: mycompany.com + webhookEndpoint: + type: string + example: https://api.mycompany.com/webhooks/uma + supportedCurrencies: + type: array + items: + $ref: '#/components/schemas/PlatformCurrencyConfig' Error400: type: object required: @@ -4752,6 +4558,21 @@ components: mapping: INDIVIDUAL: '#/components/schemas/IndividualCustomerUpdateRequest' BUSINESS: '#/components/schemas/BusinessCustomerUpdateRequest' + KycLinkResponse: + type: object + properties: + kycUrl: + type: string + description: A hosted KYC link for your customer to complete KYC + example: https://example.com/redirect + platformCustomerId: + type: string + description: The platform id of the customer to onboard + example: 019542f5-b3e7-1d02-0000-000000000001 + customerId: + type: string + description: The customer id of the newly created customer on the system + example: Customer:019542f5-b3e7-1d02-0000-000000000001 CurrencyAmount: type: object required: @@ -5854,6 +5675,37 @@ components: Optional Plaid account ID if the customer selected a specific account. If not provided, the default account will be used. example: plaid_account_id_123 + TransferInRequest: + type: object + required: + - source + - destination + properties: + source: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Source external account details + destination: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an internal account ID + example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination internal account details + amount: + type: integer + format: int64 + description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) + example: 12550 IncomingTransaction: allOf: - $ref: '#/components/schemas/Transaction' @@ -6351,6 +6203,37 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + TransferOutRequest: + type: object + required: + - source + - destination + properties: + source: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an internal account ID + example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Source internal account details + destination: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Destination external account details + amount: + type: integer + format: int64 + description: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC) + example: 12550 CurrencyPreference: type: object required: @@ -6792,6 +6675,20 @@ components: example: FULL_NAME: Jane Receiver NATIONALITY: FR + ApprovePaymentRequest: + type: object + properties: + receiverCustomerInfo: + type: object + additionalProperties: true + description: Information about the recipient, provided by the platform if requested in the original webhook via `requestedReceiverCustomerInfoFields`. + RejectPaymentRequest: + type: object + properties: + reason: + type: string + description: Optional reason for rejecting the payment. This is just for debugging purposes or can be used for a platform's own purposes. + example: RESTRICTED_JURISDICTION TestWebhookResponse: type: object required: @@ -6809,6 +6706,21 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + BulkCustomerImportJobAccepted: + type: object + required: + - jobId + - status + properties: + jobId: + type: string + description: Unique identifier for the bulk import job + example: Job:019542f5-b3e7-1d02-0000-000000000006 + status: + type: string + enum: + - PENDING + - PROCESSING GridError: type: object title: GridError @@ -6889,6 +6801,34 @@ components: format: date-time description: Timestamp when the job completed (only present for COMPLETED or FAILED status) example: '2025-08-15T14:32:00Z' + UmaInvitationCreateRequest: + type: object + required: + - inviterUma + properties: + inviterUma: + type: string + description: The UMA address of the customer creating the invitation + example: $inviter@uma.domain + firstName: + type: string + description: First name of the invitee to show as part of the invite + example: Alice + amountToSend: + description: | + An amount to send (in the smallest unit of the customer's currency) to the invitee when the invitation is claimed. + This is optional and if not provided, the invitee will not receive any amount. Note that the actual sending of + the amount must be done by the inviter platform once the INVITATION_CLAIMED webhook is received. If the inviter + platform either does not send the payment or the payment fails, the invitee will not receive this amount. This + field is primarily used for display purposes on the claiming side of the invitation. + type: integer + format: int64 + example: 12550 + expiresAt: + type: string + format: date-time + description: When the invitation expires (if at all) + example: '2025-09-01T14:30:00Z' UmaInvitation: type: object required: @@ -6947,6 +6887,15 @@ components: description: |- The amount to send to the invitee when the invitation is claimed. This is optional and if not provided, the invitee will not receive any amount. Note that the actual sending of the amount must be done by the inviter platform once the INVITATION_CLAIMED webhook is received. If the inviter platform either does not send the payment or the payment fails, the invitee will not receive this amount. This field is primarily used for display purposes on the claiming side of the invitation. This field is useful for "send-by-link" style customer flows where an inviter can send a payment simply by sharing a link without knowing the receiver's UMA address. Note that these sends can only be sender-locked, meaning that the sender will not know ahead of time how much the receiver will receive in the receiving currency. + UmaInvitationClaimRequest: + type: object + required: + - inviteeUma + properties: + inviteeUma: + type: string + description: The UMA address of the customer claiming the invitation + example: $invitee@uma.domain Error403: type: object required: @@ -6980,6 +6929,67 @@ components: type: object description: Additional error details additionalProperties: true + SandboxSendRequest: + type: object + required: + - quoteId + - currencyCode + properties: + quoteId: + type: string + description: The unique identifier of the quote + example: Quote:019542f5-b3e7-1d02-0000-000000000006 + currencyCode: + type: string + description: Currency code for the funds to be sent + example: USD + currencyAmount: + type: integer + format: int64 + description: The amount to send in the smallest unit of the currency (eg. cents). If not provided, the amount will be derived from the quote. + exclusiveMinimum: 0 + example: 1000 + SandboxUmaReceiveRequest: + type: object + required: + - senderUmaAddress + - receivingCurrencyCode + - receivingCurrencyAmount + properties: + senderUmaAddress: + type: string + description: UMA address of the sender from the sandbox + example: $success.usd@sandbox.grid.uma.money + receiverUmaAddress: + type: string + description: UMA address of the receiver (optional if customerId is provided) + example: $receiver@uma.domain + customerId: + type: string + description: System ID of the receiver (optional if receiverUmaAddress is provided) + example: Customer:019542f5-b3e7-1d02-0000-000000000001 + receivingCurrencyCode: + type: string + description: The currency code for the receiving amount + example: USD + receivingCurrencyAmount: + type: integer + format: int64 + description: The amount to be received in the smallest unit of the currency (eg. cents) + exclusiveMinimum: 0 + example: 1000 + SandboxFundRequest: + type: object + required: + - amount + properties: + amount: + type: integer + format: int64 + description: Amount to add in the smallest unit of the account's currency (e.g., cents for USD/EUR, satoshis for BTC) + exclusiveMinimum: 0 + maximum: 100000000000 + example: 100000 UmaProvider: type: object properties: @@ -7069,6 +7079,21 @@ components: format: date-time description: Last update timestamp example: '2025-07-21T17:32:28Z' + ApiTokenCreateRequest: + type: object + required: + - name + - permissions + properties: + name: + type: string + description: Name of the token to help identify it + example: Sandbox read-only + permissions: + type: array + description: A list of permissions to grant to the token + items: + $ref: '#/components/schemas/Permission' IncomingPaymentWebhook: allOf: - $ref: '#/components/schemas/BaseWebhook' diff --git a/openapi/components/schemas/config/PlatformConfigUpdateRequest.yaml b/openapi/components/schemas/config/PlatformConfigUpdateRequest.yaml new file mode 100644 index 00000000..89f97d9c --- /dev/null +++ b/openapi/components/schemas/config/PlatformConfigUpdateRequest.yaml @@ -0,0 +1,12 @@ +type: object +properties: + umaDomain: + type: string + example: mycompany.com + webhookEndpoint: + type: string + example: https://api.mycompany.com/webhooks/uma + supportedCurrencies: + type: array + items: + $ref: ./PlatformCurrencyConfig.yaml diff --git a/openapi/components/schemas/customers/BulkCustomerImportJobAccepted.yaml b/openapi/components/schemas/customers/BulkCustomerImportJobAccepted.yaml new file mode 100644 index 00000000..25a7665e --- /dev/null +++ b/openapi/components/schemas/customers/BulkCustomerImportJobAccepted.yaml @@ -0,0 +1,14 @@ +type: object +required: + - jobId + - status +properties: + jobId: + type: string + description: Unique identifier for the bulk import job + example: Job:019542f5-b3e7-1d02-0000-000000000006 + status: + type: string + enum: + - PENDING + - PROCESSING diff --git a/openapi/components/schemas/customers/KycLinkResponse.yaml b/openapi/components/schemas/customers/KycLinkResponse.yaml new file mode 100644 index 00000000..98690097 --- /dev/null +++ b/openapi/components/schemas/customers/KycLinkResponse.yaml @@ -0,0 +1,14 @@ +type: object +properties: + kycUrl: + type: string + description: A hosted KYC link for your customer to complete KYC + example: "https://example.com/redirect" + platformCustomerId: + type: string + description: The platform id of the customer to onboard + example: 019542f5-b3e7-1d02-0000-000000000001 + customerId: + type: string + description: The customer id of the newly created customer on the system + example: Customer:019542f5-b3e7-1d02-0000-000000000001 diff --git a/openapi/components/schemas/invitations/UmaInvitationClaimRequest.yaml b/openapi/components/schemas/invitations/UmaInvitationClaimRequest.yaml new file mode 100644 index 00000000..a1f32496 --- /dev/null +++ b/openapi/components/schemas/invitations/UmaInvitationClaimRequest.yaml @@ -0,0 +1,8 @@ +type: object +required: + - inviteeUma +properties: + inviteeUma: + type: string + description: The UMA address of the customer claiming the invitation + example: $invitee@uma.domain diff --git a/openapi/components/schemas/invitations/UmaInvitationCreateRequest.yaml b/openapi/components/schemas/invitations/UmaInvitationCreateRequest.yaml new file mode 100644 index 00000000..803878f2 --- /dev/null +++ b/openapi/components/schemas/invitations/UmaInvitationCreateRequest.yaml @@ -0,0 +1,36 @@ +type: object +required: + - inviterUma +properties: + inviterUma: + type: string + description: The UMA address of the customer creating the invitation + example: $inviter@uma.domain + firstName: + type: string + description: First name of the invitee to show as part of the invite + example: Alice + amountToSend: + description: > + An amount to send (in the smallest unit of the customer's currency) + to the invitee when the invitation is claimed. + + This is optional and if not provided, the invitee will not + receive any amount. Note that the actual sending of + + the amount must be done by the inviter platform once the + INVITATION_CLAIMED webhook is received. If the inviter + + platform either does not send the payment or the payment fails, + the invitee will not receive this amount. This + + field is primarily used for display purposes on the claiming + side of the invitation. + type: integer + format: int64 + example: 12550 + expiresAt: + type: string + format: date-time + description: When the invitation expires (if at all) + example: '2025-09-01T14:30:00Z' diff --git a/openapi/components/schemas/sandbox/SandboxFundRequest.yaml b/openapi/components/schemas/sandbox/SandboxFundRequest.yaml new file mode 100644 index 00000000..8a12a83f --- /dev/null +++ b/openapi/components/schemas/sandbox/SandboxFundRequest.yaml @@ -0,0 +1,13 @@ +type: object +required: + - amount +properties: + amount: + type: integer + format: int64 + description: >- + Amount to add in the smallest unit of the account's currency (e.g., + cents for USD/EUR, satoshis for BTC) + exclusiveMinimum: 0 + maximum: 100000000000 + example: 100000 diff --git a/openapi/components/schemas/sandbox/SandboxSendRequest.yaml b/openapi/components/schemas/sandbox/SandboxSendRequest.yaml new file mode 100644 index 00000000..fd2589e1 --- /dev/null +++ b/openapi/components/schemas/sandbox/SandboxSendRequest.yaml @@ -0,0 +1,21 @@ +type: object +required: + - quoteId + - currencyCode +properties: + quoteId: + type: string + description: The unique identifier of the quote + example: Quote:019542f5-b3e7-1d02-0000-000000000006 + currencyCode: + type: string + description: Currency code for the funds to be sent + example: USD + currencyAmount: + type: integer + format: int64 + description: >- + The amount to send in the smallest unit of the currency (eg. + cents). If not provided, the amount will be derived from the quote. + exclusiveMinimum: 0 + example: 1000 diff --git a/openapi/components/schemas/sandbox/SandboxUmaReceiveRequest.yaml b/openapi/components/schemas/sandbox/SandboxUmaReceiveRequest.yaml new file mode 100644 index 00000000..280b0159 --- /dev/null +++ b/openapi/components/schemas/sandbox/SandboxUmaReceiveRequest.yaml @@ -0,0 +1,32 @@ +type: object +required: + - senderUmaAddress + - receivingCurrencyCode + - receivingCurrencyAmount +properties: + senderUmaAddress: + type: string + description: UMA address of the sender from the sandbox + example: $success.usd@sandbox.grid.uma.money + receiverUmaAddress: + type: string + description: UMA address of the receiver (optional if customerId is provided) + example: $receiver@uma.domain + customerId: + type: string + description: >- + System ID of the receiver (optional if receiverUmaAddress is + provided) + example: Customer:019542f5-b3e7-1d02-0000-000000000001 + receivingCurrencyCode: + type: string + description: The currency code for the receiving amount + example: USD + receivingCurrencyAmount: + type: integer + format: int64 + description: >- + The amount to be received in the smallest unit of the currency + (eg. cents) + exclusiveMinimum: 0 + example: 1000 diff --git a/openapi/components/schemas/tokens/ApiTokenCreateRequest.yaml b/openapi/components/schemas/tokens/ApiTokenCreateRequest.yaml new file mode 100644 index 00000000..0dda2803 --- /dev/null +++ b/openapi/components/schemas/tokens/ApiTokenCreateRequest.yaml @@ -0,0 +1,14 @@ +type: object +required: + - name + - permissions +properties: + name: + type: string + description: Name of the token to help identify it + example: Sandbox read-only + permissions: + type: array + description: A list of permissions to grant to the token + items: + $ref: ./Permission.yaml diff --git a/openapi/components/schemas/transactions/ApprovePaymentRequest.yaml b/openapi/components/schemas/transactions/ApprovePaymentRequest.yaml new file mode 100644 index 00000000..92d37ebd --- /dev/null +++ b/openapi/components/schemas/transactions/ApprovePaymentRequest.yaml @@ -0,0 +1,9 @@ +type: object +properties: + receiverCustomerInfo: + type: object + additionalProperties: true + description: >- + Information about the recipient, provided by the platform if + requested in the original webhook via + `requestedReceiverCustomerInfoFields`. diff --git a/openapi/components/schemas/transactions/RejectPaymentRequest.yaml b/openapi/components/schemas/transactions/RejectPaymentRequest.yaml new file mode 100644 index 00000000..fe74d85f --- /dev/null +++ b/openapi/components/schemas/transactions/RejectPaymentRequest.yaml @@ -0,0 +1,8 @@ +type: object +properties: + reason: + type: string + description: >- + Optional reason for rejecting the payment. This is just for + debugging purposes or can be used for a platform's own purposes. + example: RESTRICTED_JURISDICTION diff --git a/openapi/components/schemas/transfers/TransferInRequest.yaml b/openapi/components/schemas/transfers/TransferInRequest.yaml new file mode 100644 index 00000000..9a0fbd0f --- /dev/null +++ b/openapi/components/schemas/transfers/TransferInRequest.yaml @@ -0,0 +1,32 @@ +type: object +required: + - source + - destination +properties: + source: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Source external account details + destination: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an internal account ID + example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Destination internal account details + amount: + type: integer + format: int64 + description: >- + Amount in the smallest unit of the currency (e.g., cents for USD/EUR, + satoshis for BTC) + example: 12550 diff --git a/openapi/components/schemas/transfers/TransferOutRequest.yaml b/openapi/components/schemas/transfers/TransferOutRequest.yaml new file mode 100644 index 00000000..302def09 --- /dev/null +++ b/openapi/components/schemas/transfers/TransferOutRequest.yaml @@ -0,0 +1,32 @@ +type: object +required: + - source + - destination +properties: + source: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an internal account ID + example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 + description: Source internal account details + destination: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + description: Destination external account details + amount: + type: integer + format: int64 + description: >- + Amount in the smallest unit of the currency (e.g., cents for USD/EUR, + satoshis for BTC) + example: 12550 diff --git a/openapi/paths/customers/customers_bulk_csv.yaml b/openapi/paths/customers/customers_bulk_csv.yaml index bfcc6297..f65539a7 100644 --- a/openapi/paths/customers/customers_bulk_csv.yaml +++ b/openapi/paths/customers/customers_bulk_csv.yaml @@ -118,20 +118,7 @@ post: content: application/json: schema: - type: object - required: - - jobId - - status - properties: - jobId: - type: string - description: Unique identifier for the bulk import job - example: Job:019542f5-b3e7-1d02-0000-000000000006 - status: - type: string - enum: - - PENDING - - PROCESSING + $ref: ../../components/schemas/customers/BulkCustomerImportJobAccepted.yaml '401': description: Unauthorized content: diff --git a/openapi/paths/customers/customers_kyc_link.yaml b/openapi/paths/customers/customers_kyc_link.yaml index 809b4c50..9597b184 100644 --- a/openapi/paths/customers/customers_kyc_link.yaml +++ b/openapi/paths/customers/customers_kyc_link.yaml @@ -25,20 +25,7 @@ get: content: application/json: schema: - type: object - properties: - kycUrl: - type: string - description: A hosted KYC link for your customer to complete KYC - example: "https://example.com/redirect" - platformCustomerId: - type: string - description: The platform id of the customer to onboard - example: 019542f5-b3e7-1d02-0000-000000000001 - customerId: - type: string - description: The customer id of the newly created customer on the system - example: Customer:019542f5-b3e7-1d02-0000-000000000001 + $ref: ../../components/schemas/customers/KycLinkResponse.yaml '401': description: Unauthorized content: diff --git a/openapi/paths/invitations/invitations.yaml b/openapi/paths/invitations/invitations.yaml index 74224daa..0d39da7f 100644 --- a/openapi/paths/invitations/invitations.yaml +++ b/openapi/paths/invitations/invitations.yaml @@ -12,42 +12,7 @@ post: content: application/json: schema: - type: object - required: - - inviterUma - properties: - inviterUma: - type: string - description: The UMA address of the customer creating the invitation - example: $inviter@uma.domain - firstName: - type: string - description: First name of the invitee to show as part of the invite - example: Alice - amountToSend: - description: > - An amount to send (in the smallest unit of the customer's currency) - to the invitee when the invitation is claimed. - - This is optional and if not provided, the invitee will not - receive any amount. Note that the actual sending of - - the amount must be done by the inviter platform once the - INVITATION_CLAIMED webhook is received. If the inviter - - platform either does not send the payment or the payment fails, - the invitee will not receive this amount. This - - field is primarily used for display purposes on the claiming - side of the invitation. - type: integer - format: int64 - example: 12550 - expiresAt: - type: string - format: date-time - description: When the invitation expires (if at all) - example: '2025-09-01T14:30:00Z' + $ref: ../../components/schemas/invitations/UmaInvitationCreateRequest.yaml responses: '201': description: Invitation created successfully diff --git a/openapi/paths/invitations/invitations_{invitationCode}_claim.yaml b/openapi/paths/invitations/invitations_{invitationCode}_claim.yaml index 2e3eb9f2..07072142 100644 --- a/openapi/paths/invitations/invitations_{invitationCode}_claim.yaml +++ b/openapi/paths/invitations/invitations_{invitationCode}_claim.yaml @@ -33,14 +33,7 @@ post: content: application/json: schema: - type: object - required: - - inviteeUma - properties: - inviteeUma: - type: string - description: The UMA address of the customer claiming the invitation - example: $invitee@uma.domain + $ref: ../../components/schemas/invitations/UmaInvitationClaimRequest.yaml responses: '200': description: Invitation claimed successfully diff --git a/openapi/paths/platform/config.yaml b/openapi/paths/platform/config.yaml index 5a2147eb..2d11b686 100644 --- a/openapi/paths/platform/config.yaml +++ b/openapi/paths/platform/config.yaml @@ -38,18 +38,7 @@ patch: content: application/json: schema: - type: object - properties: - umaDomain: - type: string - example: mycompany.com - webhookEndpoint: - type: string - example: https://api.mycompany.com/webhooks/uma - supportedCurrencies: - type: array - items: - $ref: ../../components/schemas/config/PlatformCurrencyConfig.yaml + $ref: ../../components/schemas/config/PlatformConfigUpdateRequest.yaml example: umaDomain: mycompany.com webhookEndpoint: https://api.mycompany.com/webhooks/uma diff --git a/openapi/paths/sandbox/sandbox_internal_accounts_{accountId}_fund.yaml b/openapi/paths/sandbox/sandbox_internal_accounts_{accountId}_fund.yaml index 8f6805d9..a25767b1 100644 --- a/openapi/paths/sandbox/sandbox_internal_accounts_{accountId}_fund.yaml +++ b/openapi/paths/sandbox/sandbox_internal_accounts_{accountId}_fund.yaml @@ -26,19 +26,7 @@ post: content: application/json: schema: - type: object - required: - - amount - properties: - amount: - type: integer - format: int64 - description: >- - Amount to add in the smallest unit of the account's currency (e.g., - cents for USD/EUR, satoshis for BTC) - exclusiveMinimum: 0 - maximum: 100000000000 - example: 100000 + $ref: ../../components/schemas/sandbox/SandboxFundRequest.yaml examples: fundUSDAccount: summary: Fund USD internal account with $1,000 diff --git a/openapi/paths/sandbox/sandbox_send.yaml b/openapi/paths/sandbox/sandbox_send.yaml index cf6d7998..541d8a17 100644 --- a/openapi/paths/sandbox/sandbox_send.yaml +++ b/openapi/paths/sandbox/sandbox_send.yaml @@ -15,27 +15,7 @@ post: content: application/json: schema: - type: object - required: - - quoteId - - currencyCode - properties: - quoteId: - type: string - description: The unique identifier of the quote - example: Quote:019542f5-b3e7-1d02-0000-000000000006 - currencyCode: - type: string - description: Currency code for the funds to be sent - example: USD - currencyAmount: - type: integer - format: int64 - description: >- - The amount to send in the smallest unit of the currency (eg. - cents). If not provided, the amount will be derived from the quote. - exclusiveMinimum: 0 - example: 1000 + $ref: ../../components/schemas/sandbox/SandboxSendRequest.yaml responses: '200': description: Funds received successfully diff --git a/openapi/paths/sandbox/sandbox_uma_receive.yaml b/openapi/paths/sandbox/sandbox_uma_receive.yaml index da87f376..bb65ce0c 100644 --- a/openapi/paths/sandbox/sandbox_uma_receive.yaml +++ b/openapi/paths/sandbox/sandbox_uma_receive.yaml @@ -16,38 +16,7 @@ post: content: application/json: schema: - type: object - required: - - senderUmaAddress - - receivingCurrencyCode - - receivingCurrencyAmount - properties: - senderUmaAddress: - type: string - description: UMA address of the sender from the sandbox - example: $success.usd@sandbox.grid.uma.money - receiverUmaAddress: - type: string - description: UMA address of the receiver (optional if customerId is provided) - example: $receiver@uma.domain - customerId: - type: string - description: >- - System ID of the receiver (optional if receiverUmaAddress is - provided) - example: Customer:019542f5-b3e7-1d02-0000-000000000001 - receivingCurrencyCode: - type: string - description: The currency code for the receiving amount - example: USD - receivingCurrencyAmount: - type: integer - format: int64 - description: >- - The amount to be received in the smallest unit of the currency - (eg. cents) - exclusiveMinimum: 0 - example: 1000 + $ref: ../../components/schemas/sandbox/SandboxUmaReceiveRequest.yaml responses: '200': description: Payment triggered successfully diff --git a/openapi/paths/tokens/tokens.yaml b/openapi/paths/tokens/tokens.yaml index cb8735ef..a2bbcee2 100644 --- a/openapi/paths/tokens/tokens.yaml +++ b/openapi/paths/tokens/tokens.yaml @@ -11,21 +11,7 @@ post: content: application/json: schema: - type: object - title: tokenCreate - properties: - name: - type: string - description: Name of the token to help identify it - example: Sandbox read-only - permissions: - type: array - description: A list of permissions to grant to the token - items: - $ref: ../../components/schemas/tokens/Permission.yaml - required: - - name - - permissions + $ref: ../../components/schemas/tokens/ApiTokenCreateRequest.yaml responses: '201': description: API token created successfully diff --git a/openapi/paths/transactions/transactions_{transactionId}_approve.yaml b/openapi/paths/transactions/transactions_{transactionId}_approve.yaml index d7eff6fd..d19bc9a9 100644 --- a/openapi/paths/transactions/transactions_{transactionId}_approve.yaml +++ b/openapi/paths/transactions/transactions_{transactionId}_approve.yaml @@ -23,15 +23,7 @@ post: content: application/json: schema: - type: object - properties: - receiverCustomerInfo: - type: object - additionalProperties: true - description: >- - Information about the recipient, provided by the platform if - requested in the original webhook via - `requestedReceiverCustomerInfoFields`. + $ref: ../../components/schemas/transactions/ApprovePaymentRequest.yaml responses: '200': description: Payment approved successfully diff --git a/openapi/paths/transactions/transactions_{transactionId}_reject.yaml b/openapi/paths/transactions/transactions_{transactionId}_reject.yaml index db0d6d49..34266534 100644 --- a/openapi/paths/transactions/transactions_{transactionId}_reject.yaml +++ b/openapi/paths/transactions/transactions_{transactionId}_reject.yaml @@ -23,14 +23,7 @@ post: content: application/json: schema: - type: object - properties: - reason: - type: string - description: >- - Optional reason for rejecting the payment. This is just for - debugging purposes or can be used for a platform's own purposes. - example: RESTRICTED_JURISDICTION + $ref: ../../components/schemas/transactions/RejectPaymentRequest.yaml responses: '200': description: Payment rejected successfully diff --git a/openapi/paths/transfers/transfer_in.yaml b/openapi/paths/transfers/transfer_in.yaml index c55436e5..9dff344f 100644 --- a/openapi/paths/transfers/transfer_in.yaml +++ b/openapi/paths/transfers/transfer_in.yaml @@ -24,38 +24,7 @@ post: content: application/json: schema: - type: object - required: - - source - - destination - properties: - source: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an external account ID - example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - description: Source external account details - destination: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an internal account ID - example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - description: Destination internal account details - amount: - type: integer - format: int64 - description: >- - Amount in the smallest unit of the currency (e.g., cents for USD/EUR, - satoshis for BTC) - example: 12550 + $ref: ../../components/schemas/transfers/TransferInRequest.yaml examples: transferIn: summary: Transfer from external to internal account diff --git a/openapi/paths/transfers/transfer_out.yaml b/openapi/paths/transfers/transfer_out.yaml index 31ee21bc..a14dab02 100644 --- a/openapi/paths/transfers/transfer_out.yaml +++ b/openapi/paths/transfers/transfer_out.yaml @@ -22,38 +22,7 @@ post: content: application/json: schema: - type: object - required: - - source - - destination - properties: - source: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an internal account ID - example: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 - description: Source internal account details - destination: - type: object - required: - - accountId - properties: - accountId: - type: string - description: Reference to an external account ID - example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 - description: Destination external account details - amount: - type: integer - format: int64 - description: >- - Amount in the smallest unit of the currency (e.g., cents for USD/EUR, - satoshis for BTC) - example: 12550 + $ref: ../../components/schemas/transfers/TransferOutRequest.yaml examples: transferOut: summary: Transfer from internal to external account