Onboarding API examples

Create a referral.

Copy
Copied
POST https://platform.brexapis.com/v1/referrals

REQUEST
{
  "referral_code": "partner_refcode",
  "applicant": {
  	"first_name": "John",
  	"last_name": "Doe",
  	"email": "john.doe@doeinc.com"
  },
 "business": {
  	"legal_name": "Doe Inc",
	"Incorporation_type": "C-CORP",
	"website": "doeinc.com"
  }
}

RESPONSE
{
  "id": "referral_123",
  "referral_signup_url": "https://www.brex.com/signup/?pref_token=onb-mock-no-business",
  "expires_at": "2021-01-11T15:52:34.234Z",
  "status": "UNCLAIMED",
  "products": [
      {
          "cash": {
              "application": {
                  "status": "NO_ACCOUNT"
              }
          }
      }
  ]
}

The returned referral signup link can be provided to the user and will prefill the application form. See example signup link here.

Get an update about the application status of a referral.

Copy
Copied
GET https://platform.brexapis.com/v1/referrals/referral_123

RESPONSE
{
  "id": "referral_123",
  "referral_signup_url": "https://www.brex.com/signup/?pref_token=onb-mock-no-business",
  "expires_at": "2021-01-11T15:52:34.234Z",
  "status": "ACTIVE",
  "products": [
      {
          "cash": {
              "application": {
                  "status": "ACTIVE"
              }
          }
      }
  ]
}

Attach supporting documentation to a referral.

Step 1: Generate an upload link.

Copy
Copied
PUT https://platform.brexapis.com/v1/referrals/referral_123/document_upload

REQUEST
{
  "type": "ARTICLES_OF_INCORPORATION"
}

RESPONSE
{
  "uri": "https://s3.amazonaws.com/destination-link",
  "id": "document_123"
}

Step 2: Upload the file to the URL provided.

Copy
Copied
PUT https://s3.amazonaws.com/destination-link

REQUEST
* binary file content
Copyright © Brex 2019–2022. All rights reserved.