RocketKOR

Create a Business Customer

Add a new Customer Account for a business. The Customer Account contains the Customer’s profile (business name and contact information).

Note  You can also add a Customer Account for an individual.

Endpoint

POST /v1/customers

Authorization Header

Authorization: Bearer <access_token>

Request Body

addresses

array

Customer addresses.

  • The Customer can have multiple addresses for each address type (MAILING, PHYSICAL, and SHIPPING).
  • A primary address must be specified for each address type added to the Customer Account.
    • Only one primary address can be specified for each address type.
    • If a primary address is not specified for an address type, the first address of this type will be set as the primary address.
    • If multiple addresses exist for an address type and the primary address is removed (and another address is not explicitly set as primary), another address of the same type will be set as the primary address.

type  REQUIRED

string enum, values: MAILING, PHYSICAL, SHIPPING

Type of address. The following values are supported:

  • MAILING  Address used for mail.
  • PHYSICAL  Registered address for the Customer’s business. Cannot be a post office (PO) box.
  • SHIPPING  Address used for packages or shipments.

name  CONDITIONAL

object

Name of the contact person for shipments. Required if type is SHIPPING. Ignored for other address types.

firstName  REQUIRED

string, min length: 1, max length: 40

Contact person’s first name.

middleName

string, min length: 1, max length: 40

Contact person’s middle name.

lastName  REQUIRED

string, min length: 1, max length: 40

Contact person’s last name.

streetLine1  REQUIRED

string, min length: 1, max length: 50

First line of the street address.

streetLine2

string, min length: 1, max length: 50

Second line of the street address.

streetLine3

string, min length: 1, max length: 50

Third line of the street address.

streetLine4

string, min length: 1, max length: 50

Fourth line of the street address. Only used for issued cards.

streetLine5

string, min length: 1, max length: 50

Fifth line of the street address. Only used for issued cards.

cityName

string, min length: 1, max length: 25

City.

stateCode  CONDITIONAL

string, min length: 2, max length: 3

State, province, or territory. Required if countryCode is USA or CAN. Must be an ISO 3166-2 uppercase alpha 2-character or 3-character country subdivision code (for example, Missouri is MO).

countryCode

string, min length: 3, max length: 3

Country code. Must be an ISO 3166-1 uppercase alpha 3-character country code. For example, the United States is USA and Canada is CAN.

zipCode  REQUIRED

string, min length: 1, max length: 10

Zip code or postal code.

primary  CONDITIONAL

boolean

Whether this is the primary address for this address type. A primary address must be specified for each address type added to the Customer Account.

metadata

string, max items: 5, value max length: 1024

Use a maximum of 5 key/value pairs to store additional information about the Customer.

type  REQUIRED

string enum, value: BUSINESS

Type of Customer. Value must be BUSINESS.

doingBusinessAsName  REQUIRED

string, min length: 1, max length: 40

Business operating name. Used by the business in marketing and day-to-day activities.

contacts  REQUIRED

object

Contacts for the business. A primary contact must be provided.

firstName  REQUIRED

string, min length: 1, max length: 40

Contact’s first name.

middleName

string, min length: 1, max length: 40

Contact’s middle name.

lastName  REQUIRED

string, min length: 1, max length: 40

Contact’s last name.

primary  CONDITIONAL

boolean

Whether this is the primary contact for the business. At least one contact must be marked as primary.

primaryPhoneNumber  REQUIRED

object

Contact’s primary phone number.

number  REQUIRED

string

required format: [+] [country code] [phone number including area code]

Contact’s phone number. The phone number can be entered in any of the following formats:

  • [+] [country code] [phone number including area code] (example: +14151234)

  • [country code] [phone number including area code] (example: 14151234)

  • [phone number including area code] (example: 4151234)

RocketKOR will convert the phone number to E.164 format (example: +14151234).

type  REQUIRED

string enum, values: WORK, HOME, MOBILE

Type of phone number.

provider

string, min length: 1, max length: 40

Phone provider.

extension

string, min length: 1, max length: 40

Phone extension.

verified

boolean

Whether the phone number has been verified.

primaryEmail  REQUIRED

string (email), max length: 320

Contact’s primary email address.

value  REQUIRED

string (email), max length: 320

Contact’s email address.

verified

boolean

Whether the email address has been verified.

legalName

string, min length: 1, max length: 40

Legal name of the business.

primaryPhone

string

format: [+] [country code] [phone number including area code]

Primary phone number for the business in E.164 format:

[+] [country code] [phone number including area code]

Example: +14151234

website

string (URL)

Complete URL for the business website. Example: https://abc.com

dateOfFormation

string (date)

Date the business was officially created.

legalEntityType

string, enum values: SP, GP, LP, LLP, LLLP, LLC, CORP, NONPROFIT, GOVERNMENT

Legal definition of the business. The following values are supported:

  • SP  Sole proprietorship
  • GP  General Partnership
  • LP  Limited partnership
  • LLP  Limited Liability Partnership
  • LLLP  Limited Liability Limited Partnership
  • LLC  Limited Liability Company
  • CORP  Corporation
  • NONPROFIT  Nonprofit
  • GOVERNMENT  Government

taxIdCountryCode  CONDITIONAL

string, min length: 3, max length: 3

Country where the tax ID was issued. Must be an ISO 3166-1 uppercase alpha 3-character country code. For example, the United States is USA and Canada is CAN. Required if taxId is provided.

taxId

string, max length: 50

Unique national tax identifier for the business, such as an Employer Identification Number (EIN). Responses include a truncated value only.

Returns

Returns the Business Customer object. This object contains the Customer Account details, including a unique ID for the account.

SAMPLE REQUEST

				
					{
  "addresses": [
    {
      "type": "MAILING",
      "streetLine1": "100 Main St",
      "streetLine2": "Suite 100",
      "streetLine3": "",
      "streetLine4": "",
      "streetLine5": "",
      "cityName": "Greenville",
      "stateCode": "MO",
      "countryCode": "USA",
      "zipCode": "63368",
      "primary": true
    },
    {
      "type": "SHIPPING",
      "name": {
        "firstName": "Jack",
        "middleName": "Fred",
        "lastName": "Smith"
      },
      "streetLine1": "200 King St",
      "streetLine2": "Suite 310",
      "streetLine3": "",
      "streetLine4": "",
      "streetLine5": "",
      "cityName": "Greenville",
      "stateCode": "MO",
      "countryCode": "USA",
      "zipCode": "63368",
      "primary": true
    }
  ],
  "metadata": {
    "customerRefId": "100000333"
  },
  "type": "BUSINESS",
  "doingBusinessAsName": "ACME Corp.",
  "contacts": [
    {
      "firstName": "Jack",
      "middleName": "Fred",
      "lastName": "Smith",
      "primary": true,
      "primaryPhoneNumber": {
        "number": "+14151234",
        "type": "WORK",
        "provider": "ABC",
        "extension": "675",
        "verified": false
      },
      "primaryEmail": {
        "value": "jsmith@acme.com",
        "verified": false
      }
    }
  ],
  "legalName": "ACME Corporation",
  "primaryPhone": "+14151234",
  "website": "https://www.acme.com",
  "dateOfFormation": "2010-01-31",
  "legalEntityType": "CORP",
  "taxIdCountryCode": "USA",
  "taxId": "12-3456789"
}

				
			

SAMPLE RESPONSE

				
					{
  "id": "e4021849-0e09-43ef-b9a7-18124356f489",
  "status": "ACTIVE",
  "addresses": [
    {
      "type": "MAILING",
      "streetLine1": "100 Main St",
      "streetLine2": "Suite 100",
      "streetLine3": "",
      "streetLine4": "",
      "streetLine5": "",
      "cityName": "Greenville",
      "stateCode": "MO",
      "countryCode": "USA",
      "zipCode": "63368",
      "primary": true
    },
    {
      "type": "SHIPPING",
      "name": {
        "firstName": "Jack",
        "middleName": "Fred",
        "lastName": "Smith"
      },
      "streetLine1": "200 King St",
      "streetLine2": "Suite 310",
      "streetLine3": "",
      "streetLine4": "",
      "streetLine5": "",
      "cityName": "Greenville",
      "stateCode": "MO",
      "countryCode": "USA",
      "zipCode": "63368",
      "primary": true
    }
  ],
  "metadata": {
    "customerRefId": "100000333"
  },
  "createdBy": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "type": "service-account"
  },
  "createdAt": "2022-11-23T00:42:50.311Z",
  "updatedBy": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "type": "service-account"
  },
  "updatedAt": "2022-12-11T00:42:50.311Z",
  "type": "BUSINESS",
  "doingBusinessAsName": "ACME Corp.",
  "contacts": [
    {
      "firstName": "Jack",
      "middleName": "Fred",
      "lastName": "Smith",
      "primary": true,
      "primaryPhoneNumber": {
        "number": "+14151234",
        "type": "WORK",
        "provider": "ABC",
        "extension": "675",
        "verified": false
      },
      "primaryEmail": {
        "value": "jsmith@acme.com",
        "verified": false
      }
    }
  ],
  "legalName": "ACME Corporation",
  "primaryPhone": "+14151234",
  "website": "https://www.acme.com",
  "dateOfFormation": "2010-01-31",
  "legalEntityType": "CORP",
  "taxIdCountryCode": "USA",
  "taxId": "12-3456789"
}