RocketKOR

BI Search Customers

Gather Business Insights (BI) by analyzing one or more Customer Accounts.

Use this API to search Customer Accounts based on filters such as the account status, Customer name, and Customer contact details. The API returns a queryId that can be used to query the search status and retrieve the results.

Endpoint

POST /v1/search/customer-accounts

Authorization Header

Authorization: Bearer <access_token>

Request Body

businessAccountIds  REQUIRED

string (UUID)

Provide a list of one or more Business Account IDs. Customer Accounts belonging to these Business Accounts will be included in the search.

  • If you provide a single Business Account ID, it must be the Business Account associated with the request access token.
  • If you provide a Parent Business Account ID, the associated Child Business Accounts will also be included in the search.

fromCreatedAt

string (date), required format: yyyy-mm-dd

Date the Customer Account was created in RocketKOR. This filter will return Customer Accounts created on or after this date.

toCreatedAt

string (date), required format: yyyy-mm-dd

Date the Customer Account was created in RocketKOR. This filter will return Customer Accounts created on or before this date.

customerAccountStatus

string enum, values: ACTIVE, SUSPENDED, DELETED

Customer Account status. The following values are supported:

  • ACTIVE  Customer Account is active.
  • SUSPENDED  Customer Account is inactive.
  • DELETED  Customer Account has been deleted.

customerAccountType

string enum, values: INDIVIDUAL, BUSINESS

Type of Customer Account.

firstName

string, max length: 40, min length: 1

Customer’s first name. For Business Customer Accounts, the search will include all contacts associated with the Customer Account.

middleName

string, max length: 40, min length: 1

Customer’s middle name. For Business Customer Accounts, the search will include all contacts associated with the Customer Account.

lastName

string, max length: 40, min length: 1

Customer’s last name. For Business Customer Accounts, the search will include all contacts associated with the Customer Account.

customerDoingAsBusinessName

string, max length: 40, min length: 1

This filter is available for Business Customer Accounts.

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

email

string (email), max length: 320

Customer’s email address.

phoneNumber

string

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

Customer’s phone number. For Business Customer Accounts, the search will include all contacts associated with the Customer Account.

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).

addressLine1

string, max length: 50, min length: 1

Customer’s address line 1. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

addressLine2

string, max length: 50, min length: 1

Customer’s address line 2. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

addressLine3

string, max length: 50, min length: 1

Customer’s address line 3. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

city

string

Customer’s city. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

state

string

Customer’s state, province, or territory. Must be an ISO 3166-2 uppercase alpha 2-character or 3-character country subdivision code. For example, Missouri is MO. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

postalCode

string

Customer’s zip code or postal code. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

country

string, min length: 3, max length: 3

Customer’s 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. This filter will search all of the Customer’s addresses (shipping, billing, etc.).

prefix

string, max length: 40, min length: 1

This filter is available for Individual Customer Accounts. Title before the Customer’s name (example: Dr.).

suffix

string, max length: 40, min length: 1

This filter is available for Individual Customer Accounts. Title following the Customer’s name (example: PhD).

gender

string

This filter is available for Individual Customer Accounts. Customer’s gender.

sex

string enum, values: MALE, FEMALE

This filter is available for Individual Customer Accounts. Customer’s birth sex.

resultFormat

string enum, values: CSV, JSON

Type of file used to store the search results.

Returns

Returns a queryId. Use this queryId to query the search status and retrieve the search results.

queryId

string (UUID)

ID representing the search results.

SAMPLE REQUEST

				
					{
  "businessAccountIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "fromCreatedAt": "2023-01-01",
  "toCreatedAt": "2023-01-31",
  "customerAccountStatus": [
    "ACTIVE"
  ],
  "customerAccountType": "INDIVIDUAL",
  "firstName": "Sarah",
  "middleName": "Jane",
  "lastName": "Green",
  "doingAsBusinessName": "",
  "email": "sgreen@abc.com",
  "phoneNumber": "+15556589",
  "addressLine1": "400 Richmond St",
  "addressLine2": "Suite 500",
  "addressLine3": "",
  "city": "New York",
  "state": "NY",
  "postalCode": "10001",
  "country": "USA",
  "prefix": "Ms",
  "suffix": "",
  "gender": "",
  "sex": "FEMALE",
  "resultFormat": "CSV"
}
				
			

SAMPLE RESPONSE

				
					{
  "queryId": "88fe3238-8b6c-4de7-a77a-05fe43541d56"
}