Referrals
Defined in: src/onboarding/client.gen.ts:8
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Referrals(
_core):Referrals
Defined in: src/onboarding/client.gen.ts:9
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Referrals
Methods
Section titled “Methods”createDocument()
Section titled “createDocument()”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
Parameters
Section titled “Parameters”string
"ARTICLES_OF_INCORPORATION" | "IRS_EIN_CONFIRMATION" | "IRS_EIN_APPLICATION" | "CERTIFICATE_GOOD_STANDING"
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ id: string; uri: string; }>
createRequest()
Section titled “createRequest()”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
Parameters
Section titled “Parameters”applicant
Section titled “applicant”{ email: string; first_name: string; last_name: string; }
applicant.email
Section titled “applicant.email”string
Format: email
Description
Business email of the applying customer.
Example
jane.smith@example.comapplicant.first_name
Section titled “applicant.first_name”string
Description
First name of the applying customer.
Example
Janeapplicant.last_name
Section titled “applicant.last_name”string
Description
Last name of the applying customer.
Example
Smithbusiness?
Section titled “business?”{ 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
contact_preference?
Section titled “contact_preference?”"NO_OUTBOUND" | "EMAIL_OUTBOUND" | null
referral_code
Section titled “referral_code”string
Description
Referral code that attributes credit to you if the prospect signs up for a Brex account.
Example
partner_abc123options?
Section titled “options?”Returns
Section titled “Returns”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}
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ customer_email?: string | null; expires_at: string; id: string; products: object[]; referral_signup_url: string; status: "ACTIVE" | "EXPIRED" | "CLOSED" | "UNCLAIMED"; }>
list()
Section titled “list()”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.
Parameters
Section titled “Parameters”query?
Section titled “query?”cursor?
Section titled “cursor?”string | null
options?
Section titled “options?”Returns
Section titled “Returns”PagePromise<{ items: object[]; next_cursor?: string | null; }>
processDelayedEINDocument()
Section titled “processDelayedEINDocument()”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
Parameters
Section titled “Parameters”string
document_id
Section titled “document_id”string
Description
The document ID returned from the initial document creation request
options?
Section titled “options?”Returns
Section titled “Returns”Promise<void>