@cybrid/cybrid-api-organization-angular 0.122.57 → 0.122.58
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/esm2020/api/organizations.service.mjs +2 -2
- package/esm2020/api/subscriptionDeliveries.service.mjs +2 -2
- package/esm2020/api/subscriptionEvents.service.mjs +2 -2
- package/esm2020/api/subscriptions.service.mjs +2 -2
- package/esm2020/model/errorResponse.mjs +2 -2
- package/esm2020/model/organization.mjs +2 -2
- package/esm2020/model/patchOrganization.mjs +2 -2
- package/esm2020/model/postSubscription.mjs +2 -2
- package/esm2020/model/postSubscriptionDelivery.mjs +2 -2
- package/esm2020/model/subscription.mjs +2 -2
- package/esm2020/model/subscriptionDelivery.mjs +2 -2
- package/esm2020/model/subscriptionDeliveryList.mjs +1 -1
- package/esm2020/model/subscriptionEnvironment.mjs +2 -2
- package/esm2020/model/subscriptionEvent.mjs +2 -2
- package/esm2020/model/subscriptionEventList.mjs +1 -1
- package/esm2020/model/subscriptionList.mjs +1 -1
- package/esm2020/model/subscriptionState.mjs +2 -2
- package/esm2020/model/subscriptionType.mjs +2 -2
- package/fesm2015/cybrid-cybrid-api-organization-angular.mjs +10 -10
- package/fesm2015/cybrid-cybrid-api-organization-angular.mjs.map +1 -1
- package/fesm2020/cybrid-cybrid-api-organization-angular.mjs +15 -15
- package/fesm2020/cybrid-cybrid-api-organization-angular.mjs.map +1 -1
- package/model/errorResponse.d.ts +1 -1
- package/model/organization.d.ts +1 -1
- package/model/patchOrganization.d.ts +1 -1
- package/model/postSubscription.d.ts +1 -1
- package/model/postSubscriptionDelivery.d.ts +1 -1
- package/model/subscription.d.ts +1 -1
- package/model/subscriptionDelivery.d.ts +1 -1
- package/model/subscriptionDeliveryList.d.ts +1 -1
- package/model/subscriptionEnvironment.d.ts +1 -1
- package/model/subscriptionEvent.d.ts +1 -1
- package/model/subscriptionEventList.d.ts +1 -1
- package/model/subscriptionList.d.ts +1 -1
- package/model/subscriptionState.d.ts +1 -1
- package/model/subscriptionType.d.ts +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cybrid-cybrid-api-organization-angular.mjs","sources":["../../encoder.ts","../../variables.ts","../../configuration.ts","../../api/organizations.service.ts","../../api/subscriptionDeliveries.service.ts","../../api/subscriptionEvents.service.ts","../../api/subscriptions.service.ts","../../api/api.ts","../../model/postSubscription.ts","../../model/subscriptionDelivery.ts","../../model/subscriptionEnvironment.ts","../../model/subscription.ts","../../model/subscriptionState.ts","../../model/subscriptionType.ts","../../api.module.ts","../../cybrid-cybrid-api-organization-angular.ts"],"sourcesContent":["import { HttpParameterCodec } from '@angular/common/http';\n\n/**\n * Custom HttpParameterCodec\n * Workaround for https://github.com/angular/angular/issues/18261\n */\nexport class CustomHttpParameterCodec implements HttpParameterCodec {\n encodeKey(k: string): string {\n return encodeURIComponent(k);\n }\n encodeValue(v: string): string {\n return encodeURIComponent(v);\n }\n decodeKey(k: string): string {\n return decodeURIComponent(k);\n }\n decodeValue(v: string): string {\n return decodeURIComponent(v);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const BASE_PATH = new InjectionToken<string>('basePath');\nexport const COLLECTION_FORMATS = {\n 'csv': ',',\n 'tsv': ' ',\n 'ssv': ' ',\n 'pipes': '|'\n}\n","import { HttpParameterCodec } from '@angular/common/http';\n\nexport interface ConfigurationParameters {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials?: {[ key: string ]: string | (() => string | undefined)};\n}\n\nexport class Configuration {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials: {[ key: string ]: string | (() => string | undefined)};\n\n constructor(configurationParameters: ConfigurationParameters = {}) {\n this.apiKeys = configurationParameters.apiKeys;\n this.username = configurationParameters.username;\n this.password = configurationParameters.password;\n this.accessToken = configurationParameters.accessToken;\n this.basePath = configurationParameters.basePath;\n this.withCredentials = configurationParameters.withCredentials;\n this.encoder = configurationParameters.encoder;\n if (configurationParameters.credentials) {\n this.credentials = configurationParameters.credentials;\n }\n else {\n this.credentials = {};\n }\n\n // init default BearerAuth credential\n if (!this.credentials['BearerAuth']) {\n this.credentials['BearerAuth'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n\n // init default oauth2 credential\n if (!this.credentials['oauth2']) {\n this.credentials['oauth2'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n }\n\n /**\n * Select the correct content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param contentTypes - the array of content types that are available for selection\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\n if (contentTypes.length === 0) {\n return undefined;\n }\n\n const type = contentTypes.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return contentTypes[0];\n }\n return type;\n }\n\n /**\n * Select the correct accept content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param accepts - the array of content types that are available for selection.\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderAccept(accepts: string[]): string | undefined {\n if (accepts.length === 0) {\n return undefined;\n }\n\n const type = accepts.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return accepts[0];\n }\n return type;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n }\n\n public lookupCredential(key: string): string | undefined {\n const value = this.credentials[key];\n return typeof value === 'function'\n ? value()\n : value;\n }\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { OrganizationOrganizationModel } from '../model/organization';\n// @ts-ignore\nimport { PatchOrganizationOrganizationModel } from '../model/patchOrganization';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganizationsService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Get organization\n * Retrieve an organization. Required scope: **organizations:read**\n * @param organizationGuid Identifier for the organization.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getOrganization(organizationGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<OrganizationOrganizationModel>;\n public getOrganization(organizationGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<OrganizationOrganizationModel>>;\n public getOrganization(organizationGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<OrganizationOrganizationModel>>;\n public getOrganization(organizationGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (organizationGuid === null || organizationGuid === undefined) {\n throw new Error('Required parameter organizationGuid was null or undefined when calling getOrganization.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<OrganizationOrganizationModel>(`${this.configuration.basePath}/api/organizations/${encodeURIComponent(String(organizationGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Patch organization\n * Update an organization. Required scope: **organizations:write**\n * @param organizationGuid Identifier for the organization.\n * @param patchOrganizationOrganizationModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<OrganizationOrganizationModel>;\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<OrganizationOrganizationModel>>;\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<OrganizationOrganizationModel>>;\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (organizationGuid === null || organizationGuid === undefined) {\n throw new Error('Required parameter organizationGuid was null or undefined when calling updateOrganization.');\n }\n if (patchOrganizationOrganizationModel === null || patchOrganizationOrganizationModel === undefined) {\n throw new Error('Required parameter patchOrganizationOrganizationModel was null or undefined when calling updateOrganization.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.patch<OrganizationOrganizationModel>(`${this.configuration.basePath}/api/organizations/${encodeURIComponent(String(organizationGuid))}`,\n patchOrganizationOrganizationModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostSubscriptionDeliveryOrganizationModel } from '../model/postSubscriptionDelivery';\n// @ts-ignore\nimport { SubscriptionDeliveryListOrganizationModel } from '../model/subscriptionDeliveryList';\n// @ts-ignore\nimport { SubscriptionDeliveryOrganizationModel } from '../model/subscriptionDelivery';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubscriptionDeliveriesService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create SubscriptionDelivery\n * Creates a SubscriptionDelivery. ## Subscription Delivery Create a SubscriptionDelivery to retry the delivery of a SubscriptionEvent to a Subscription. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the SubscriptionDelivery details in our private store | | completed | The Platform has successfully delivered the SubscriptionEvent to specified Subscription | | failing | The Platform is failing to deliver the SubscriptionDelivery, a new attempt will be made (see `next_attempt_at`) | | failed | The Platform has failed to deliver the SubscriptionDelivery, no more attempts will be made | Required scope: **subscription_events:execute\n * @param postSubscriptionDeliveryOrganizationModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionDeliveryOrganizationModel>;\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionDeliveryOrganizationModel>>;\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionDeliveryOrganizationModel>>;\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postSubscriptionDeliveryOrganizationModel === null || postSubscriptionDeliveryOrganizationModel === undefined) {\n throw new Error('Required parameter postSubscriptionDeliveryOrganizationModel was null or undefined when calling createSubscriptionDelivery.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<SubscriptionDeliveryOrganizationModel>(`${this.configuration.basePath}/api/subscription_deliveries/`,\n postSubscriptionDeliveryOrganizationModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get Subscription Delivery \n * Retrieves a subscription delivery. Required scope: **subscription_events:read**\n * @param subscriptionDeliveryGuid Identifier for the subscription delivery.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionDeliveryOrganizationModel>;\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionDeliveryOrganizationModel>>;\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionDeliveryOrganizationModel>>;\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionDeliveryGuid === null || subscriptionDeliveryGuid === undefined) {\n throw new Error('Required parameter subscriptionDeliveryGuid was null or undefined when calling getSubscriptionDelivery.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionDeliveryOrganizationModel>(`${this.configuration.basePath}/api/subscription_deliveries/${encodeURIComponent(String(subscriptionDeliveryGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get subscription deliveries list\n * Retrieves a listing of subscription deliveries s. Required scope: **subscription_events:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated subscription_delivery_guids to list subscription deliveries for.\n * @param subscriptionEventGuid Comma separated subscription_event_guids to list subscription deliveries for.\n * @param subscriptionGuid Comma separated subscription_guids to list subscription deliveries for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionDeliveryListOrganizationModel>;\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionDeliveryListOrganizationModel>>;\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionDeliveryListOrganizationModel>>;\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n if (subscriptionEventGuid !== undefined && subscriptionEventGuid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>subscriptionEventGuid, 'subscription_event_guid');\n }\n if (subscriptionGuid !== undefined && subscriptionGuid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>subscriptionGuid, 'subscription_guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionDeliveryListOrganizationModel>(`${this.configuration.basePath}/api/subscription_deliveries`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { SubscriptionEventListOrganizationModel } from '../model/subscriptionEventList';\n// @ts-ignore\nimport { SubscriptionEventOrganizationModel } from '../model/subscriptionEvent';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubscriptionEventsService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Get Subscription Event \n * Retrieves a Subscription Event. Required scope: **subscription_events:read**\n * @param subscriptionEventGuid Identifier for the Subscription Event.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getSubscriptionEvent(subscriptionEventGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionEventOrganizationModel>;\n public getSubscriptionEvent(subscriptionEventGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionEventOrganizationModel>>;\n public getSubscriptionEvent(subscriptionEventGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionEventOrganizationModel>>;\n public getSubscriptionEvent(subscriptionEventGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionEventGuid === null || subscriptionEventGuid === undefined) {\n throw new Error('Required parameter subscriptionEventGuid was null or undefined when calling getSubscriptionEvent.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionEventOrganizationModel>(`${this.configuration.basePath}/api/subscription_events/${encodeURIComponent(String(subscriptionEventGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get subscription events list\n * Retrieves a listing of subscription events s. Required scope: **subscription_events:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated subscription_event_guids to list subscription events for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionEventListOrganizationModel>;\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionEventListOrganizationModel>>;\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionEventListOrganizationModel>>;\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionEventListOrganizationModel>(`${this.configuration.basePath}/api/subscription_events`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostSubscriptionOrganizationModel } from '../model/postSubscription';\n// @ts-ignore\nimport { SubscriptionListOrganizationModel } from '../model/subscriptionList';\n// @ts-ignore\nimport { SubscriptionOrganizationModel } from '../model/subscription';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubscriptionsService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create Subscription\n * Creates a Subscription. ## Subscription creation Subscriptions can be created for webhook endpoints. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the subscription details in our private store | | completed | The Platform has created the subscription | | failed | The Platform was not able to successfully create the subscription | Required scope: **subscriptions:execute\n * @param postSubscriptionOrganizationModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionOrganizationModel>;\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionOrganizationModel>>;\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionOrganizationModel>>;\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postSubscriptionOrganizationModel === null || postSubscriptionOrganizationModel === undefined) {\n throw new Error('Required parameter postSubscriptionOrganizationModel was null or undefined when calling createSubscription.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<SubscriptionOrganizationModel>(`${this.configuration.basePath}/api/subscriptions/`,\n postSubscriptionOrganizationModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Delete Subscription\n * Deletes a subscription. Required scope: **subscriptions:execute**\n * @param subscriptionGuid Identifier for the subscription.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deleteSubscription(subscriptionGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public deleteSubscription(subscriptionGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public deleteSubscription(subscriptionGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public deleteSubscription(subscriptionGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionGuid === null || subscriptionGuid === undefined) {\n throw new Error('Required parameter subscriptionGuid was null or undefined when calling deleteSubscription.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/subscriptions/${encodeURIComponent(String(subscriptionGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get Subscription \n * Retrieves a subscription. Required scope: **subscriptions:read**\n * @param subscriptionGuid Identifier for the subscription.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getSubscription(subscriptionGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionOrganizationModel>;\n public getSubscription(subscriptionGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionOrganizationModel>>;\n public getSubscription(subscriptionGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionOrganizationModel>>;\n public getSubscription(subscriptionGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionGuid === null || subscriptionGuid === undefined) {\n throw new Error('Required parameter subscriptionGuid was null or undefined when calling getSubscription.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionOrganizationModel>(`${this.configuration.basePath}/api/subscriptions/${encodeURIComponent(String(subscriptionGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get subscriptions list\n * Retrieves a listing of subscriptions. Required scope: **subscriptions:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated subscription_guids to list subscriptions for.\n * @param environment Environment to list subscriptions for.\n * @param state State to list subscriptions for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionListOrganizationModel>;\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionListOrganizationModel>>;\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionListOrganizationModel>>;\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n if (environment !== undefined && environment !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>environment, 'environment');\n }\n if (state !== undefined && state !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>state, 'state');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionListOrganizationModel>(`${this.configuration.basePath}/api/subscriptions`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","export * from './organizations.service';\nimport { OrganizationsService } from './organizations.service';\nexport * from './subscriptionDeliveries.service';\nimport { SubscriptionDeliveriesService } from './subscriptionDeliveries.service';\nexport * from './subscriptionEvents.service';\nimport { SubscriptionEventsService } from './subscriptionEvents.service';\nexport * from './subscriptions.service';\nimport { SubscriptionsService } from './subscriptions.service';\nexport const APIS = [OrganizationsService, SubscriptionDeliveriesService, SubscriptionEventsService, SubscriptionsService];\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n/**\n * Request body for subscription creation.\n */\nexport interface PostSubscriptionOrganizationModel { \n /**\n * The environment that the subscription is configured for.\n */\n environment: PostSubscriptionOrganizationModel.EnvironmentEnum;\n /**\n * Type of the subscription.\n */\n type: PostSubscriptionOrganizationModel.TypeEnum;\n /**\n * Name provided for the subscription.\n */\n name: string;\n /**\n * URL provided for the subscription.\n */\n url: string;\n}\nexport namespace PostSubscriptionOrganizationModel {\n export type EnvironmentEnum = 'sandbox' | 'production';\n export const EnvironmentEnum = {\n Sandbox: 'sandbox' as EnvironmentEnum,\n Production: 'production' as EnvironmentEnum\n };\n export type TypeEnum = 'webhook';\n export const TypeEnum = {\n Webhook: 'webhook' as TypeEnum\n };\n}\n\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface SubscriptionDeliveryOrganizationModel { \n /**\n * Auto-generated unique identifier for the subscription delivery.\n */\n guid: string;\n /**\n * The response of the subscription delivery.\n */\n response?: string | null;\n /**\n * The subscription event guid of the subscription delivery.\n */\n subscription_event_guid: string;\n /**\n * The subscription guid of the subscription delivery.\n */\n subscription_guid: string;\n /**\n * The state of the subscription delivery.\n */\n state: SubscriptionDeliveryOrganizationModel.StateEnum;\n /**\n * ISO8601 datetime the next attempt will be made.\n */\n next_attempt_at?: string | null;\n /**\n * The number of attempts made to deliver the event.\n */\n attempt_count: string;\n /**\n * ISO8601 datetime the event was delivered.\n */\n completed_at?: string | null;\n /**\n * ISO8601 datetime the event delivery was marked as failed.\n */\n failed_at?: string | null;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at?: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\nexport namespace SubscriptionDeliveryOrganizationModel {\n export type StateEnum = 'storing' | 'completed' | 'failing' | 'failed';\n export const StateEnum = {\n Storing: 'storing' as StateEnum,\n Completed: 'completed' as StateEnum,\n Failing: 'failing' as StateEnum,\n Failed: 'failed' as StateEnum\n };\n}\n\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport type SubscriptionEnvironmentOrganizationModel = 'sandbox' | 'production';\n\nexport const SubscriptionEnvironmentOrganizationModel = {\n Sandbox: 'sandbox' as SubscriptionEnvironmentOrganizationModel,\n Production: 'production' as SubscriptionEnvironmentOrganizationModel\n};\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface SubscriptionOrganizationModel { \n /**\n * Auto-generated unique identifier for the subscription.\n */\n guid: string;\n /**\n * The organization guid for the subscription.\n */\n organization_guid?: string;\n /**\n * Name provided for the subscription.\n */\n name: string;\n /**\n * The type of subscription.\n */\n type: SubscriptionOrganizationModel.TypeEnum;\n /**\n * The url for the subscription.\n */\n url: string;\n /**\n * Subscription private signing key.\n */\n signing_key?: string;\n /**\n * ISO8601 datetime the deliveries started failing.\n */\n deliveries_failing_since?: string | null;\n /**\n * The environment that the subscription is configured for; one of sandbox or production.\n */\n environment: string;\n /**\n * The state of the subscription; one of storing, completed, or failed.\n */\n state: string;\n /**\n * The failure code of a subscription (if any)\n */\n failure_code?: string | null;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at?: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\nexport namespace SubscriptionOrganizationModel {\n export type TypeEnum = 'webhook';\n export const TypeEnum = {\n Webhook: 'webhook' as TypeEnum\n };\n}\n\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport type SubscriptionStateOrganizationModel = 'storing' | 'completed' | 'failed';\n\nexport const SubscriptionStateOrganizationModel = {\n Storing: 'storing' as SubscriptionStateOrganizationModel,\n Completed: 'completed' as SubscriptionStateOrganizationModel,\n Failed: 'failed' as SubscriptionStateOrganizationModel\n};\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.57\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport type SubscriptionTypeOrganizationModel = 'webhook';\n\nexport const SubscriptionTypeOrganizationModel = {\n Webhook: 'webhook' as SubscriptionTypeOrganizationModel\n};\n\n","import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';\nimport { Configuration } from './configuration';\nimport { HttpClient } from '@angular/common/http';\n\nimport { OrganizationsService } from './api/organizations.service';\nimport { SubscriptionDeliveriesService } from './api/subscriptionDeliveries.service';\nimport { SubscriptionEventsService } from './api/subscriptionEvents.service';\nimport { SubscriptionsService } from './api/subscriptions.service';\n\n@NgModule({\n imports: [],\n declarations: [],\n exports: [],\n providers: []\n})\nexport class ApiModule {\n public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {\n return {\n ngModule: ApiModule,\n providers: [ { provide: Configuration, useFactory: configurationFactory } ]\n };\n }\n\n constructor( @Optional() @SkipSelf() parentModule: ApiModule,\n @Optional() http: HttpClient) {\n if (parentModule) {\n throw new Error('ApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/issues/20575');\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.Configuration"],"mappings":";;;;;AAEA;;;AAGG;MACU,wBAAwB,CAAA;AACjC,IAAA,SAAS,CAAC,CAAS,EAAA;AACf,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACD,IAAA,WAAW,CAAC,CAAS,EAAA;AACjB,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACD,IAAA,SAAS,CAAC,CAAS,EAAA;AACf,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACD,IAAA,WAAW,CAAC,CAAS,EAAA;AACjB,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACJ;;MCjBY,SAA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AAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAT,SAAS,EAAA,CAAA,CAAA;wGAAT,SAAS,EAAA,CAAA,CAAA;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAO,EAAE;AAChB,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAO,EAAE;AAChB,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;8BASiB,QAAQ;;8BAAI,QAAQ;;8BACpB,QAAQ;;;;ACxB1B;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"cybrid-cybrid-api-organization-angular.mjs","sources":["../../encoder.ts","../../variables.ts","../../configuration.ts","../../api/organizations.service.ts","../../api/subscriptionDeliveries.service.ts","../../api/subscriptionEvents.service.ts","../../api/subscriptions.service.ts","../../api/api.ts","../../model/postSubscription.ts","../../model/subscriptionDelivery.ts","../../model/subscriptionEnvironment.ts","../../model/subscription.ts","../../model/subscriptionState.ts","../../model/subscriptionType.ts","../../api.module.ts","../../cybrid-cybrid-api-organization-angular.ts"],"sourcesContent":["import { HttpParameterCodec } from '@angular/common/http';\n\n/**\n * Custom HttpParameterCodec\n * Workaround for https://github.com/angular/angular/issues/18261\n */\nexport class CustomHttpParameterCodec implements HttpParameterCodec {\n encodeKey(k: string): string {\n return encodeURIComponent(k);\n }\n encodeValue(v: string): string {\n return encodeURIComponent(v);\n }\n decodeKey(k: string): string {\n return decodeURIComponent(k);\n }\n decodeValue(v: string): string {\n return decodeURIComponent(v);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const BASE_PATH = new InjectionToken<string>('basePath');\nexport const COLLECTION_FORMATS = {\n 'csv': ',',\n 'tsv': ' ',\n 'ssv': ' ',\n 'pipes': '|'\n}\n","import { HttpParameterCodec } from '@angular/common/http';\n\nexport interface ConfigurationParameters {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials?: {[ key: string ]: string | (() => string | undefined)};\n}\n\nexport class Configuration {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials: {[ key: string ]: string | (() => string | undefined)};\n\n constructor(configurationParameters: ConfigurationParameters = {}) {\n this.apiKeys = configurationParameters.apiKeys;\n this.username = configurationParameters.username;\n this.password = configurationParameters.password;\n this.accessToken = configurationParameters.accessToken;\n this.basePath = configurationParameters.basePath;\n this.withCredentials = configurationParameters.withCredentials;\n this.encoder = configurationParameters.encoder;\n if (configurationParameters.credentials) {\n this.credentials = configurationParameters.credentials;\n }\n else {\n this.credentials = {};\n }\n\n // init default BearerAuth credential\n if (!this.credentials['BearerAuth']) {\n this.credentials['BearerAuth'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n\n // init default oauth2 credential\n if (!this.credentials['oauth2']) {\n this.credentials['oauth2'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n }\n\n /**\n * Select the correct content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param contentTypes - the array of content types that are available for selection\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\n if (contentTypes.length === 0) {\n return undefined;\n }\n\n const type = contentTypes.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return contentTypes[0];\n }\n return type;\n }\n\n /**\n * Select the correct accept content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param accepts - the array of content types that are available for selection.\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderAccept(accepts: string[]): string | undefined {\n if (accepts.length === 0) {\n return undefined;\n }\n\n const type = accepts.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return accepts[0];\n }\n return type;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n }\n\n public lookupCredential(key: string): string | undefined {\n const value = this.credentials[key];\n return typeof value === 'function'\n ? value()\n : value;\n }\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { OrganizationOrganizationModel } from '../model/organization';\n// @ts-ignore\nimport { PatchOrganizationOrganizationModel } from '../model/patchOrganization';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganizationsService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Get organization\n * Retrieve an organization. Required scope: **organizations:read**\n * @param organizationGuid Identifier for the organization.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getOrganization(organizationGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<OrganizationOrganizationModel>;\n public getOrganization(organizationGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<OrganizationOrganizationModel>>;\n public getOrganization(organizationGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<OrganizationOrganizationModel>>;\n public getOrganization(organizationGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (organizationGuid === null || organizationGuid === undefined) {\n throw new Error('Required parameter organizationGuid was null or undefined when calling getOrganization.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<OrganizationOrganizationModel>(`${this.configuration.basePath}/api/organizations/${encodeURIComponent(String(organizationGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Patch organization\n * Update an organization. Required scope: **organizations:write**\n * @param organizationGuid Identifier for the organization.\n * @param patchOrganizationOrganizationModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<OrganizationOrganizationModel>;\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<OrganizationOrganizationModel>>;\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<OrganizationOrganizationModel>>;\n public updateOrganization(organizationGuid: string, patchOrganizationOrganizationModel: PatchOrganizationOrganizationModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (organizationGuid === null || organizationGuid === undefined) {\n throw new Error('Required parameter organizationGuid was null or undefined when calling updateOrganization.');\n }\n if (patchOrganizationOrganizationModel === null || patchOrganizationOrganizationModel === undefined) {\n throw new Error('Required parameter patchOrganizationOrganizationModel was null or undefined when calling updateOrganization.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.patch<OrganizationOrganizationModel>(`${this.configuration.basePath}/api/organizations/${encodeURIComponent(String(organizationGuid))}`,\n patchOrganizationOrganizationModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostSubscriptionDeliveryOrganizationModel } from '../model/postSubscriptionDelivery';\n// @ts-ignore\nimport { SubscriptionDeliveryListOrganizationModel } from '../model/subscriptionDeliveryList';\n// @ts-ignore\nimport { SubscriptionDeliveryOrganizationModel } from '../model/subscriptionDelivery';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubscriptionDeliveriesService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create SubscriptionDelivery\n * Creates a SubscriptionDelivery. ## Subscription Delivery Create a SubscriptionDelivery to retry the delivery of a SubscriptionEvent to a Subscription. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the SubscriptionDelivery details in our private store | | completed | The Platform has successfully delivered the SubscriptionEvent to specified Subscription | | failing | The Platform is failing to deliver the SubscriptionDelivery, a new attempt will be made (see `next_attempt_at`) | | failed | The Platform has failed to deliver the SubscriptionDelivery, no more attempts will be made | Required scope: **subscription_events:execute\n * @param postSubscriptionDeliveryOrganizationModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionDeliveryOrganizationModel>;\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionDeliveryOrganizationModel>>;\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionDeliveryOrganizationModel>>;\n public createSubscriptionDelivery(postSubscriptionDeliveryOrganizationModel: PostSubscriptionDeliveryOrganizationModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postSubscriptionDeliveryOrganizationModel === null || postSubscriptionDeliveryOrganizationModel === undefined) {\n throw new Error('Required parameter postSubscriptionDeliveryOrganizationModel was null or undefined when calling createSubscriptionDelivery.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<SubscriptionDeliveryOrganizationModel>(`${this.configuration.basePath}/api/subscription_deliveries/`,\n postSubscriptionDeliveryOrganizationModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get Subscription Delivery \n * Retrieves a subscription delivery. Required scope: **subscription_events:read**\n * @param subscriptionDeliveryGuid Identifier for the subscription delivery.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionDeliveryOrganizationModel>;\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionDeliveryOrganizationModel>>;\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionDeliveryOrganizationModel>>;\n public getSubscriptionDelivery(subscriptionDeliveryGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionDeliveryGuid === null || subscriptionDeliveryGuid === undefined) {\n throw new Error('Required parameter subscriptionDeliveryGuid was null or undefined when calling getSubscriptionDelivery.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionDeliveryOrganizationModel>(`${this.configuration.basePath}/api/subscription_deliveries/${encodeURIComponent(String(subscriptionDeliveryGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get subscription deliveries list\n * Retrieves a listing of subscription deliveries s. Required scope: **subscription_events:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated subscription_delivery_guids to list subscription deliveries for.\n * @param subscriptionEventGuid Comma separated subscription_event_guids to list subscription deliveries for.\n * @param subscriptionGuid Comma separated subscription_guids to list subscription deliveries for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionDeliveryListOrganizationModel>;\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionDeliveryListOrganizationModel>>;\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionDeliveryListOrganizationModel>>;\n public listSubscriptionDeliveries(page?: string, perPage?: string, guid?: string, subscriptionEventGuid?: string, subscriptionGuid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n if (subscriptionEventGuid !== undefined && subscriptionEventGuid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>subscriptionEventGuid, 'subscription_event_guid');\n }\n if (subscriptionGuid !== undefined && subscriptionGuid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>subscriptionGuid, 'subscription_guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionDeliveryListOrganizationModel>(`${this.configuration.basePath}/api/subscription_deliveries`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { SubscriptionEventListOrganizationModel } from '../model/subscriptionEventList';\n// @ts-ignore\nimport { SubscriptionEventOrganizationModel } from '../model/subscriptionEvent';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubscriptionEventsService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Get Subscription Event \n * Retrieves a Subscription Event. Required scope: **subscription_events:read**\n * @param subscriptionEventGuid Identifier for the Subscription Event.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getSubscriptionEvent(subscriptionEventGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionEventOrganizationModel>;\n public getSubscriptionEvent(subscriptionEventGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionEventOrganizationModel>>;\n public getSubscriptionEvent(subscriptionEventGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionEventOrganizationModel>>;\n public getSubscriptionEvent(subscriptionEventGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionEventGuid === null || subscriptionEventGuid === undefined) {\n throw new Error('Required parameter subscriptionEventGuid was null or undefined when calling getSubscriptionEvent.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionEventOrganizationModel>(`${this.configuration.basePath}/api/subscription_events/${encodeURIComponent(String(subscriptionEventGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get subscription events list\n * Retrieves a listing of subscription events s. Required scope: **subscription_events:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated subscription_event_guids to list subscription events for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionEventListOrganizationModel>;\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionEventListOrganizationModel>>;\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionEventListOrganizationModel>>;\n public listSubscriptionEvents(page?: string, perPage?: string, guid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionEventListOrganizationModel>(`${this.configuration.basePath}/api/subscription_events`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseOrganizationModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostSubscriptionOrganizationModel } from '../model/postSubscription';\n// @ts-ignore\nimport { SubscriptionListOrganizationModel } from '../model/subscriptionList';\n// @ts-ignore\nimport { SubscriptionOrganizationModel } from '../model/subscription';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubscriptionsService {\n\n protected basePath = 'https://organization.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create Subscription\n * Creates a Subscription. ## Subscription creation Subscriptions can be created for webhook endpoints. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the subscription details in our private store | | completed | The Platform has created the subscription | | failed | The Platform was not able to successfully create the subscription | Required scope: **subscriptions:execute\n * @param postSubscriptionOrganizationModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionOrganizationModel>;\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionOrganizationModel>>;\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionOrganizationModel>>;\n public createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postSubscriptionOrganizationModel === null || postSubscriptionOrganizationModel === undefined) {\n throw new Error('Required parameter postSubscriptionOrganizationModel was null or undefined when calling createSubscription.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<SubscriptionOrganizationModel>(`${this.configuration.basePath}/api/subscriptions/`,\n postSubscriptionOrganizationModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Delete Subscription\n * Deletes a subscription. Required scope: **subscriptions:execute**\n * @param subscriptionGuid Identifier for the subscription.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deleteSubscription(subscriptionGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public deleteSubscription(subscriptionGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public deleteSubscription(subscriptionGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public deleteSubscription(subscriptionGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionGuid === null || subscriptionGuid === undefined) {\n throw new Error('Required parameter subscriptionGuid was null or undefined when calling deleteSubscription.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/subscriptions/${encodeURIComponent(String(subscriptionGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get Subscription \n * Retrieves a subscription. Required scope: **subscriptions:read**\n * @param subscriptionGuid Identifier for the subscription.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getSubscription(subscriptionGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionOrganizationModel>;\n public getSubscription(subscriptionGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionOrganizationModel>>;\n public getSubscription(subscriptionGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionOrganizationModel>>;\n public getSubscription(subscriptionGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (subscriptionGuid === null || subscriptionGuid === undefined) {\n throw new Error('Required parameter subscriptionGuid was null or undefined when calling getSubscription.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionOrganizationModel>(`${this.configuration.basePath}/api/subscriptions/${encodeURIComponent(String(subscriptionGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get subscriptions list\n * Retrieves a listing of subscriptions. Required scope: **subscriptions:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated subscription_guids to list subscriptions for.\n * @param environment Environment to list subscriptions for.\n * @param state State to list subscriptions for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SubscriptionListOrganizationModel>;\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SubscriptionListOrganizationModel>>;\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SubscriptionListOrganizationModel>>;\n public listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n if (environment !== undefined && environment !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>environment, 'environment');\n }\n if (state !== undefined && state !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>state, 'state');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<SubscriptionListOrganizationModel>(`${this.configuration.basePath}/api/subscriptions`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","export * from './organizations.service';\nimport { OrganizationsService } from './organizations.service';\nexport * from './subscriptionDeliveries.service';\nimport { SubscriptionDeliveriesService } from './subscriptionDeliveries.service';\nexport * from './subscriptionEvents.service';\nimport { SubscriptionEventsService } from './subscriptionEvents.service';\nexport * from './subscriptions.service';\nimport { SubscriptionsService } from './subscriptions.service';\nexport const APIS = [OrganizationsService, SubscriptionDeliveriesService, SubscriptionEventsService, SubscriptionsService];\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n/**\n * Request body for subscription creation.\n */\nexport interface PostSubscriptionOrganizationModel { \n /**\n * The environment that the subscription is configured for.\n */\n environment: PostSubscriptionOrganizationModel.EnvironmentEnum;\n /**\n * Type of the subscription.\n */\n type: PostSubscriptionOrganizationModel.TypeEnum;\n /**\n * Name provided for the subscription.\n */\n name: string;\n /**\n * URL provided for the subscription.\n */\n url: string;\n}\nexport namespace PostSubscriptionOrganizationModel {\n export type EnvironmentEnum = 'sandbox' | 'production';\n export const EnvironmentEnum = {\n Sandbox: 'sandbox' as EnvironmentEnum,\n Production: 'production' as EnvironmentEnum\n };\n export type TypeEnum = 'webhook';\n export const TypeEnum = {\n Webhook: 'webhook' as TypeEnum\n };\n}\n\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface SubscriptionDeliveryOrganizationModel { \n /**\n * Auto-generated unique identifier for the subscription delivery.\n */\n guid: string;\n /**\n * The response of the subscription delivery.\n */\n response?: string | null;\n /**\n * The subscription event guid of the subscription delivery.\n */\n subscription_event_guid: string;\n /**\n * The subscription guid of the subscription delivery.\n */\n subscription_guid: string;\n /**\n * The state of the subscription delivery.\n */\n state: SubscriptionDeliveryOrganizationModel.StateEnum;\n /**\n * ISO8601 datetime the next attempt will be made.\n */\n next_attempt_at?: string | null;\n /**\n * The number of attempts made to deliver the event.\n */\n attempt_count: string;\n /**\n * ISO8601 datetime the event was delivered.\n */\n completed_at?: string | null;\n /**\n * ISO8601 datetime the event delivery was marked as failed.\n */\n failed_at?: string | null;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at?: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\nexport namespace SubscriptionDeliveryOrganizationModel {\n export type StateEnum = 'storing' | 'completed' | 'failing' | 'failed';\n export const StateEnum = {\n Storing: 'storing' as StateEnum,\n Completed: 'completed' as StateEnum,\n Failing: 'failing' as StateEnum,\n Failed: 'failed' as StateEnum\n };\n}\n\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport type SubscriptionEnvironmentOrganizationModel = 'sandbox' | 'production';\n\nexport const SubscriptionEnvironmentOrganizationModel = {\n Sandbox: 'sandbox' as SubscriptionEnvironmentOrganizationModel,\n Production: 'production' as SubscriptionEnvironmentOrganizationModel\n};\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface SubscriptionOrganizationModel { \n /**\n * Auto-generated unique identifier for the subscription.\n */\n guid: string;\n /**\n * The organization guid for the subscription.\n */\n organization_guid?: string;\n /**\n * Name provided for the subscription.\n */\n name: string;\n /**\n * The type of subscription.\n */\n type: SubscriptionOrganizationModel.TypeEnum;\n /**\n * The url for the subscription.\n */\n url: string;\n /**\n * Subscription private signing key.\n */\n signing_key?: string;\n /**\n * ISO8601 datetime the deliveries started failing.\n */\n deliveries_failing_since?: string | null;\n /**\n * The environment that the subscription is configured for; one of sandbox or production.\n */\n environment: string;\n /**\n * The state of the subscription; one of storing, completed, or failed.\n */\n state: string;\n /**\n * The failure code of a subscription (if any)\n */\n failure_code?: string | null;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at?: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\nexport namespace SubscriptionOrganizationModel {\n export type TypeEnum = 'webhook';\n export const TypeEnum = {\n Webhook: 'webhook' as TypeEnum\n };\n}\n\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport type SubscriptionStateOrganizationModel = 'storing' | 'completed' | 'failed';\n\nexport const SubscriptionStateOrganizationModel = {\n Storing: 'storing' as SubscriptionStateOrganizationModel,\n Completed: 'completed' as SubscriptionStateOrganizationModel,\n Failed: 'failed' as SubscriptionStateOrganizationModel\n};\n\n","/**\n * Cybrid Organization API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.122.58\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport type SubscriptionTypeOrganizationModel = 'webhook';\n\nexport const SubscriptionTypeOrganizationModel = {\n Webhook: 'webhook' as SubscriptionTypeOrganizationModel\n};\n\n","import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';\nimport { Configuration } from './configuration';\nimport { HttpClient } from '@angular/common/http';\n\nimport { OrganizationsService } from './api/organizations.service';\nimport { SubscriptionDeliveriesService } from './api/subscriptionDeliveries.service';\nimport { SubscriptionEventsService } from './api/subscriptionEvents.service';\nimport { SubscriptionsService } from './api/subscriptions.service';\n\n@NgModule({\n imports: [],\n declarations: [],\n exports: [],\n providers: []\n})\nexport class ApiModule {\n public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {\n return {\n ngModule: ApiModule,\n providers: [ { provide: Configuration, useFactory: configurationFactory } ]\n };\n }\n\n constructor( @Optional() @SkipSelf() parentModule: ApiModule,\n @Optional() http: HttpClient) {\n if (parentModule) {\n throw new Error('ApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/issues/20575');\n }\n }\n}\n","/**\n * Generated bundle index. Do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