openapi: 3.2.0 info: title: Transfer Position External Subaccount V1 API description: Use API credentials to view and manage instruments. version: 1.0.0 servers: - url: https://optimalapi-ext.apx.com/transfer/v1 - url: https://optimalapi-uat-ext.apx.com/transfer/v1 tags: - name: subaccount-v1 description: View or create subaccounts. Use subaccounts to organize your account’s instruments. All accounts have a "Default" subaccount, where all new issuances and incoming transfers will be deposited. Subaccounts may also be used to delegate instrument management to an authorized third party. paths: /api/ledger/{ledgerIdentifier}/subaccount: get: tags: - subaccount-v1 summary: Retrieve sub-accounts description: Retrieve available subaccounts by account. operationId: getSubaccounts parameters: - name: ledgerIdentifier in: path description: Ledger identifier, can be found using /api/ledger endpoint required: true schema: type: string format: uuid example: 4b7375e9-79b0-4b8b-a89e-a21607f0239f - name: onBehalfOfSrcAcctId in: query description: If permitted, allows the caller to create subaccounts on behalf of another account holder, identifying that account holder by their system-assigned srcAcctId. required: false schema: type: string responses: '200': description: OK content: '*/*': schema: $ref: '#/components/schemas/Subaccounts' '400': description: Bad Request content: '*/*': schema: $ref: '#/components/schemas/AbstractRestError' '401': description: Unauthorized content: '*/*': schema: oneOf: - $ref: '#/components/schemas/GeneralError' - $ref: '#/components/schemas/AbstractRestError' '403': description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/AbstractRestError' '404': description: Not Found content: '*/*': schema: $ref: '#/components/schemas/ErrorContainer' '406': description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ErrorContainer' '422': description: Unprocessable Entity content: '*/*': schema: $ref: '#/components/schemas/GeneralError' '500': description: Internal Server Error content: '*/*': schema: $ref: '#/components/schemas/GeneralError' post: tags: - subaccount-v1 summary: Create sub-account description: Create a new subaccount to organize your account’s instruments or to delegate transaction authority to an authorized third party. All accounts have a "Default" subaccount. operationId: createSubaccount parameters: - name: ledgerIdentifier in: path description: Ledger identifier, can be found using /api/ledger endpoint required: true schema: type: string format: uuid example: 4b7375e9-79b0-4b8b-a89e-a21607f0239f requestBody: description: Subaccount payload content: application/json: schema: $ref: '#/components/schemas/Subaccount' required: true responses: '200': description: OK '400': description: Bad Request content: '*/*': schema: $ref: '#/components/schemas/AbstractRestError' '401': description: Unauthorized content: '*/*': schema: oneOf: - $ref: '#/components/schemas/GeneralError' - $ref: '#/components/schemas/AbstractRestError' '403': description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/AbstractRestError' '404': description: Not Found content: '*/*': schema: $ref: '#/components/schemas/ErrorContainer' '406': description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ErrorContainer' '422': description: Unprocessable Entity content: '*/*': schema: $ref: '#/components/schemas/GeneralError' '500': description: Internal Server Error content: '*/*': schema: $ref: '#/components/schemas/GeneralError' components: schemas: GeneralError: type: object properties: code: type: string ticket: type: string message: type: string ReferenceDatum: required: - code type: object properties: code: type: string description: The reference data's value. name: type: string description: The reference data's name description: A reference datum data object Account: type: object properties: srcAcctId: type: string description: The Account's unique system-assigned identifier used for programmatic (API) interactions. example: 4edse581-b97a-11ef-ea69-b61606fd520c identifier: type: string description: The Account's ID as displayed in the registry. example: '15184192' name: type: string description: The Account Operating Name on the registry. example: APXOPCAR Project Manager description: Account record Subaccounts: type: object properties: subaccounts: type: array description: Subaccounts items: $ref: '#/components/schemas/Subaccount' description: Subaccounts ExternalPlatform: type: object properties: externalPlatformIdentifier: type: string description: The managing external platform's system-assigned identifier. format: uuid example: a5f8c9fa-001b-4444-b966-17b1a7871bbf code: type: string description: The External Platform's system code, if applicable. name: type: string description: The External Platform's name. example: Xpansiv Connect account: $ref: '#/components/schemas/Account' metadataConfig: type: string description: Metadata configuration (JSON) for additional fields required by the External Platform. ErrorItem: type: object properties: parameter: type: string correlationId: type: string path: type: string field: type: string code: type: string message: type: string ErrorContainer: type: object properties: submissionId: type: string errors: type: array items: $ref: '#/components/schemas/ErrorItem' Subaccount: required: - name type: object properties: identifier: type: string description: The sub-account's system-assigned identifier. readOnly: true example: 6192c733-bbd2-11ef-acad-b63fd176813a number: type: string description: Sub-account number readOnly: true account: $ref: '#/components/schemas/Account' name: type: string description: Sub-account name example: Allocated description: type: string description: Sub-account description example: Holdings to retired & retired _default: type: boolean description: If true, this is the default sub-account writeOnly: true example: true status: $ref: '#/components/schemas/ReferenceDatum' viableStatusTransitions: uniqueItems: true type: array description: Viable Sub-account transitions readOnly: true items: type: string description: Subaccount Transition enum: - edit - activate - deactivate managingExternalPlatform: $ref: '#/components/schemas/ExternalPlatform' managingExternalPlatformAccountId: type: string description: If this is a managed sub-account, the relevant account ID in the external platform for the account associated with this sub-account. managingExternalPlatformSubaccountMetadata: type: string description: Optional JSON payload of managing external platform subaccount metadata. default: type: boolean description: If true, this is the default sub-account readOnly: true example: true description: This class contains caller-visible set of sub-accounts for either the calling account or the account identified by onBehalfOfSrcAcctId AbstractRestError: type: object properties: code: type: string ticket: type: string message: type: string