/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { '/v1/referrals': { /** * List referrals * @description Returns referrals created. * *Note*: This doesn't include referrals that have expired. */ get: operations['listReferrals'] /** * Creates a referral * @description This creates new referrals. The response will contain an identifier and a unique personalized link to an application flow. Many fields are optional and when they're provided they'll prefill the application flow for Brex. You should handle and store these references securely as they contain sensitive information about the referral. */ post: operations['createReferralRequest'] } '/v1/referrals/{id}': { /** * Gets a referral by ID * @description Returns a referral object by ID if it exists. */ get: operations['getReferral'] } '/v1/referrals/{id}/document_upload': { /** * Create a new document upload * @description * The `uri` will be a presigned S3 URL allowing you to upload the referral doc securely. This URL can only be used for a `PUT` operation and expires 30 minutes after its creation. Once your upload is complete, we will use this to prefill the application. * * Refer to these [docs](https://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html) on how to upload to this presigned S3 URL. We highly recommend using one of AWS SDKs if they're available for your language to upload these files. */ post: operations['createDocument'] } } export type webhooks = Record export interface components { schemas: { /** @description If the application status is APPROVED, array of bank cash management accounts (note there is currently only one account per customer). */ Account: { /** @description Brex Cash management account ID. */ id: string instructions?: components['schemas']['Instruction'] /** Format: date-time */ created_at: string } /** @description Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed). */ Address: { /** @description Address line 1, no PO Box. */ line1?: string | null /** @description Address line 2 (e.g., apartment, suite, unit, or building). */ line2?: string | null /** @description City, district, suburb, town, or village. */ city?: string | null /** @description For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region. */ state?: string | null /** @description Two-letter country code (ISO 3166-1 alpha-2). */ country?: string | null /** @description ZIP or postal code. */ postal_code?: string | null /** @description Phone number. */ phone_number?: string | null } /** @description Required information about the referred prospect. */ Applicant: { /** @description Last name of the applying customer. */ last_name: string /** @description First name of the applying customer. */ first_name: string /** * Format: email * @description Business email of the applying customer. */ email: string } Application: { status: components['schemas']['ApplicationStatus'] } /** * @description Application status of a product. * * `NO_ACCOUNT` - There is no active application, and the product account is not provisioned. * * `ACTIVE` - The application is approved, and the product account is provisioned. * * `NOT_SUBMITTED` - The application is started but not yet submitted. * * `INFORMATION_PENDING` - The application is submitted and additional information is requested. * * `MANUAL_REVIEW` - The application is under manual review. * * `PROCESSING` - The application is submitted and is under review. * * `REJECTED` - The application is rejected. * * `CLOSED` - The product account is closed. * * @enum {string} */ ApplicationStatus: | 'NO_ACCOUNT' | 'ACTIVE' | 'NOT_SUBMITTED' | 'INFORMATION_PENDING' | 'MANUAL_REVIEW' | 'PROCESSING' | 'REJECTED' | 'CLOSED' /** @description Federal law requires us to collect information for anyone who owns 25% or more of the company. */ BeneficialOwner: { /** @description Legal full name. */ legal_name: string company_relationship?: components['schemas']['CompanyRelationship'] /** * Format: date * @description Date of birth. */ date_of_birth?: string | null identity_document?: components['schemas']['IdentityDocument'] address?: components['schemas']['Address'] prong: components['schemas']['Prong'] } /** * @description Information about the business the application is for. * * You can optionally set the `alternate_address`, if the business has an additional address which is different from the * registration address. For instance, for international companies where their operational address may be different * than where the company was incorporated. */ Business: { /** @description Company legal name. */ legal_name?: string | null incorporation_type?: components['schemas']['IncorporationType'] /** @description Company Employer Identification Number(EIN). */ employer_identification_number?: string | null /** @description Business website (or link to ecommerce store for sellers). */ website_url?: string | null /** @description Brief description of the business activity. */ activity_description?: string | null address?: components['schemas']['Address'] /** @description List of beneficial owners of the company */ beneficial_owners?: components['schemas']['BeneficialOwner'][] | null alternate_address?: components['schemas']['Address'] } /** @description Available if customer applied for Brex Cash. */ Cash: { accounts?: components['schemas']['Account'][] | null application: components['schemas']['Application'] } /** * @description Relationship of this beneficial owner for this company. * @enum {string} */ CompanyRelationship: 'FOUNDER' | 'EXECUTIVE' | 'SENIOR_LEADERSHIP' | 'OTHER' /** * @description When set to `EMAIL_OUTBOUND`, Brex will email the referred prospective customer directly to prompt them to create their account rather than rely on you to direct them to claim the account. If not provided, you are responsible for contacting the prospect and the value defaults to `NO_OUTBOUND`. * @enum {string} */ ContactPreference: 'NO_OUTBOUND' | 'EMAIL_OUTBOUND' /** @description Request for creating new document upload URL. */ CreateDocumentRequest: { type: components['schemas']['DocumentType'] } /** @description Submit a new referral to Brex for onboarding. */ CreateReferralRequest: { /** @description Referral code that attributes credit to you if the prospect signs up for a Brex account. */ referral_code: string applicant: components['schemas']['Applicant'] business?: components['schemas']['Business'] contact_preference?: components['schemas']['ContactPreference'] } Document: { /** * @description This is a presigned S3 link that should be used to attach the document. * The maximum size accepted for this document is 50 MB. */ uri: string /** @description Unique identifier for the document. */ id: string } /** * @description Type of document being submitted. Allowable types: * - ARTICLES_OF_INCORPORATION * - IRS_EIN_CONFIRMATION (IRS CP 575 or 147C form) * - IRS_EIN_APPLICATION (IRS SS4 form) * - CERTIFICATE_GOOD_STANDING * * @enum {string} */ DocumentType: | 'ARTICLES_OF_INCORPORATION' | 'IRS_EIN_CONFIRMATION' | 'IRS_EIN_APPLICATION' | 'CERTIFICATE_GOOD_STANDING' /** @description Domestic ACH/wire instructions. */ DomesticInstruction: { account_type: string bank_account_number: string bank_routing_number: string beneficiary_name: string beneficiary_address: string bank_name: string bank_address: string } /** @description Document identifying the owner. */ IdentityDocument: { /** @description Country where the identity document was issued. */ country: string type: components['schemas']['IdentityDocumentType'] /** @description US SSN or passport number. */ number: string } /** * @description Either a US SSN or US/international passport. * @enum {string} */ IdentityDocumentType: 'SSN' | 'PASSPORT' /** * @description Incorporation type of the company referred. * @enum {string} */ IncorporationType: | 'C_CORP' | 'S_CORP' | 'B_CORP' | 'LLC' | 'LLP' | 'SOLE_PROP' | 'ORG_501C3' | 'LP' /** @description Domestic and international ACH/wire instructions. */ Instruction: { domestic: components['schemas']['DomesticInstruction'] international: components['schemas']['InternationalInstruction'] } /** @description International wire instructions. */ InternationalInstruction: { account_type: string swift_account_number: string swift_bank_number: string beneficiary_name: string beneficiary_address: string bank_name: string bank_address: string special_instructions: string } /** @description Array of Brex products that the customer has applied for. This is a gated feature available to select clients only. */ Product: { cash: components['schemas']['Cash'] } /** * @description When using `CONTROL` prong, the beneficial owner is a single individual with * significant responsibility to control, manage, or direct a legal entity customer. This includes, an * executive officer or senior manager (Chief Executive Officer, Chief Financial Officer, Chief * Operating Officer, President), or any other individual who regularly performs similar * functions. * * Under the `OWNERSHIP` prong, a beneficial owner is each individual, if any, who, directly or * indirectly, through any contract, arrangement, understanding, relationship or otherwise, owns * 25 percent or more of the equity interests of a legal entity customer. If a trust owns directly * or indirectly, through any contract, arrangement, understanding, relationship or otherwise, 25 * percent or more of the equity interests of a legal entity customer, the beneficial owner is the * trustee. * * Under the `BOTH` prong, the beneficial owner represents both. * * @enum {string} */ Prong: 'OWNERSHIP' | 'CONTROL' | 'BOTH' Referral: { /** @description Unique identifier for the referral. */ id: string /** * @description Signup URL to redirect prospects to complete their onboarding flow. * * *Note*: Necessary disclosures must be shown when the prospect clicks on this link. */ referral_signup_url: string /** * Format: date-time * @description The time at which this referral link expires. */ expires_at: string /** * Format: email * @description Customer's email address registered for the Brex application. This field is available only if there's a signup completed. */ customer_email?: string | null status: components['schemas']['ReferralStatus'] products: components['schemas']['Product'][] } ReferralPage: { next_cursor?: string | null items: components['schemas']['Referral'][] } /** * @description Status of the referral. `UNCLAIMED` or `EXPIRED` unless the customer completes signup. Customers are attributed once `ACTIVE` until the account is `CLOSED`. * @enum {string} */ ReferralStatus: 'UNCLAIMED' | 'EXPIRED' | 'ACTIVE' | 'CLOSED' } responses: never parameters: never requestBodies: never headers: never pathItems: never } export type $defs = Record export type external = Record export interface operations { /** * List referrals * @description Returns referrals created. * *Note*: This doesn't include referrals that have expired. */ listReferrals: { parameters: { query?: { cursor?: string | null } } responses: { /** @description listReferrals 200 response */ 200: { content: { 'application/json': components['schemas']['ReferralPage'] } } /** @description Invalid cursor */ 400: { content: never } /** @description Unauthorized */ 401: { content: never } } } /** * Creates a referral * @description This creates new referrals. The response will contain an identifier and a unique personalized link to an application flow. Many fields are optional and when they're provided they'll prefill the application flow for Brex. You should handle and store these references securely as they contain sensitive information about the referral. */ createReferralRequest: { requestBody: { content: { 'application/json': components['schemas']['CreateReferralRequest'] } } responses: { /** @description createReferralRequest 200 response */ 200: { content: { 'application/json': components['schemas']['Referral'] } } /** @description Unauthorized */ 401: { content: never } } } /** * Gets a referral by ID * @description Returns a referral object by ID if it exists. */ getReferral: { parameters: { path: { id: string } } responses: { /** @description getReferral 200 response */ 200: { content: { 'application/json': components['schemas']['Referral'] } } /** @description Unauthorized */ 401: { content: never } /** @description Referral not found */ 404: { content: never } } } /** * Create a new document upload * @description * The `uri` will be a presigned S3 URL allowing you to upload the referral doc securely. This URL can only be used for a `PUT` operation and expires 30 minutes after its creation. Once your upload is complete, we will use this to prefill the application. * * Refer to these [docs](https://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html) on how to upload to this presigned S3 URL. We highly recommend using one of AWS SDKs if they're available for your language to upload these files. */ createDocument: { parameters: { path: { id: string } } requestBody: { content: { 'application/json': components['schemas']['CreateDocumentRequest'] } } responses: { /** @description createDocument 200 response */ 200: { content: { 'application/json': components['schemas']['Document'] } } /** @description Unauthorized */ 401: { content: never } /** @description Referral not found */ 404: { content: never } } } } export interface oasTypes { components: components external: external operations: operations paths: paths webhooks: webhooks } export default oasTypes