Skip to content

Referrals

Defined in: src/onboarding/client.gen.ts:8

new Referrals(_core): Referrals

Defined in: src/onboarding/client.gen.ts:9

BrexCore

Referrals

createDocument(id, body, options?): Promise<{ id: string; uri: string; }>

Defined in: src/onboarding/client.gen.ts:20

Create a new document upload

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 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 /v1/referrals/{id}/document_upload

string

"ARTICLES_OF_INCORPORATION" | "IRS_EIN_CONFIRMATION" | "IRS_EIN_APPLICATION" | "CERTIFICATE_GOOD_STANDING"

RequestOptions

Promise<{ id: string; uri: string; }>


createRequest(body, options?): Promise<{ customer_email?: string | null; expires_at: string; id: string; products: object[]; referral_signup_url: string; status: "ACTIVE" | "EXPIRED" | "CLOSED" | "UNCLAIMED"; }>

Defined in: src/onboarding/client.gen.ts:41

Creates a referral

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 /v1/referrals

{ email: string; first_name: string; last_name: string; }

string

Format: email

Description

Business email of the applying customer.

Example

jane.smith@example.com

string

Description

First name of the applying customer.

Example

Jane

string

Description

Last name of the applying customer.

Example

Smith

{ activity_description?: string | null; address?: { city?: string | null; country?: string | null; line1?: string | null; line2?: string | null; phone_number?: string | null; postal_code?: string | null; state?: string | null; } | null; alternate_address?: { city?: string | null; country?: string | null; line1?: string | null; line2?: string | null; phone_number?: string | null; postal_code?: string | null; state?: string | null; } | null; beneficial_owners?: object[] | null; employer_identification_number?: string | null; incorporation_state?: string | null; incorporation_type?: "C_CORP" | "S_CORP" | "B_CORP" | "LLC" | "LLP" | "SOLE_PROP" | "ORG_501C3" | "LP" | null; incorporation_year?: number | null; legal_name?: string | null; website_url?: string | null; } | null

"NO_OUTBOUND" | "EMAIL_OUTBOUND" | null

string

Description

Referral code that attributes credit to you if the prospect signs up for a Brex account.

Example

partner_abc123

RequestOptions

Promise<{ customer_email?: string | null; expires_at: string; id: string; products: object[]; referral_signup_url: string; status: "ACTIVE" | "EXPIRED" | "CLOSED" | "UNCLAIMED"; }>


get(id, options?): Promise<{ customer_email?: string | null; expires_at: string; id: string; products: object[]; referral_signup_url: string; status: "ACTIVE" | "EXPIRED" | "CLOSED" | "UNCLAIMED"; }>

Defined in: src/onboarding/client.gen.ts:59

Gets a referral by ID

Returns a referral object by ID if it exists.

GET /v1/referrals/{id}

string

RequestOptions

Promise<{ customer_email?: string | null; expires_at: string; id: string; products: object[]; referral_signup_url: string; status: "ACTIVE" | "EXPIRED" | "CLOSED" | "UNCLAIMED"; }>


list(query?, options?): PagePromise<{ items: object[]; next_cursor?: string | null; }>

Defined in: src/onboarding/client.gen.ts:79

List referrals

Returns referrals created. Note: This doesn’t include referrals that have expired.

GET /v1/referrals Await for a single page, or for await to iterate items across all pages.

string | null

RequestOptions

PagePromise<{ items: object[]; next_cursor?: string | null; }>


processDelayedEINDocument(id, body, options?): Promise<void>

Defined in: src/onboarding/client.gen.ts:102

Process a delayed EIN document after upload

Processes a delayed EIN document after it has been uploaded.

This endpoint should be called after successfully uploading an IRS EIN Confirmation document (CP-575, CP-575 fax sheet, or 147C) using the standard document upload flow (/v1/referrals/{id}/document_upload with type: IRS_EIN_CONFIRMATION).

The document_id should be the id returned from the document upload request.

POST /v1/referrals/{id}/process_ein_document

string

string

Description

The document ID returned from the initial document creation request

RequestOptions

Promise<void>