RocketKOR

List All Customers

Retrieve all Customers created within a Business Account.

Use the query parameters to filter the results. Use the sort query parameter to sort the results, and use the page and size query parameters to limit the number of results returned.

Note  Customers will be retrieved for the Business Account associated with the request access token.

Endpoint

GET /v1/customers

Authorization Header

Authorization: Bearer <access_token>

Query Parameters

search

string

Perform a full-text search on the Customer’s ID, name, phone number, and email address. The following fields are included in the search.

Individual Customers

  • ID  Searches the id field.
  • Name  Searches the firstName, middleName, and LastName fields.
  • Email  Searches the primaryEmail field.
  • Phone Number  Searches the primaryPhonenumber field.

Business Customers

  • ID  Searches the id field.
  • Name  Searches the doingBusinessAsName field.
  • Email  Searches the primaryEmail field for the primary contact for the Customer Account.
  • Phone Number  Searches the contacts.primaryPhonenumber field for the primary contact for the Customer Account.

You can also use the following filters to limit the search results. If both full-text search and search filters are used, they will be joined using AND.

name

string

Filter results based on the Customer’s name.

  • Individual Customers  Includes the firstName, middleName, and LastName fields.

  • Business Customers  Includes the doingBusinessAsName field.

primaryEmail

string

Filter results based on the Customer’s email address.

  • Individual Customers  Includes the primaryEmail field.

  • Business Customers  Includes the primaryEmail field for the primary contact for the Customer Account.

primaryPhonenumber

string

Filter results based on the Customer’s phone number.

  • Individual Customers  Includes the primaryPhonenumber field.
  • Business Customers  Includes the contacts.primaryPhonenumber field for the primary contact for the Customer Account.

createdAtFrom

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

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

Note  The date is interpreted using the specified timeZone. UTC format is used if timeZone is not provided.

createdAtTo

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

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

Note  The date is interpreted using the specified timeZone. UTC format is used if timeZone is not provided.

timeZone

string (timeZone), default: UTC

Time zone for the createdAtFrom and createdAtTo filters. The following values are supported:

  • Z, UTC or GMT  UTC
  • {+,-}N(N)(:MM)  Zone offset in hours and minutes
  • UTC+<offset>, UTC-<offset>, GMT+<offset>, GMT-<offset>
  • IANA Time Zone Database region ID (example: the value for America/New_York is -04)

type

string enum, values: INDIVIDUAL, BUSINESS

Type of Customer Account.

status

string enum, values: ACTIVE, SUSPENDED

Current status of the Customer Account. The following values are supported:

  • ACTIVE  Customer Account is active.
  • SUSPENDED  Customer Account is inactive.

cityName

string

City.

stateCode  

string

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.

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

string

Zip code or postal code.

sort

array of strings

Sort the response by any field in ascending or descending order. The default sort order is createdAt,DESC. For more information, see Sorting and Pagination.

page

integer (int32)

Page number to return, based on zero-based page index.

size

integer (int32)

Maximum number of results to return per page.

Request Body

None

Returns

Returns a paginated response with an array of Business Customer and/or Individual Customer objects.

SAMPLE RESPONSE

				
					{
  "totalElements": 0,
  "totalPages": 0,
  "number": 0,
  "numberOfElements": 0,
  "hasNext": true,
  "content": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "ACTIVE",
      "addresses": [
        {
          "type": "MAILING",
          "streetLine1": "400 Richmond St",
          "streetLine2": "Suite 500",
          "streetLine3": "",
          "streetLine4": "",
          "streetLine5": "",
          "cityName": "New York",
          "stateCode": "NY",
          "countryCode": "USA",
          "zipCode": "10001",
          "primary": true
        },
        {
          "type": "SHIPPING",
          "name": {
            "firstName": "Sarah",
            "middleName": "Jane",
            "lastName": "Green"
          },
          "streetLine1": "200 Queen St",
          "streetLine2": "Suite 230",
          "streetLine3": "",
          "streetLine4": "",
          "streetLine5": "",
          "cityName": "New York",
          "stateCode": "NY",
          "countryCode": "USA",
          "zipCode": "10001",
          "primary": true
        }
      ],
      "metadata": {
        "customerRefId": "200000777"
      },
      "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": "INDIVIDUAL",
      "firstName": "Sarah",
      "middleName": "Jane",
      "lastName": "Green",
      "prefix": "Ms",
      "suffix": "",
      "sex": "FEMALE",
      "gender": "",
      "securityQuestion": "Who is your favorite author?",
      "securityAnswer": "Barbara Gowdy",
      "pronoun": "She/Her",
      "primaryPhoneNumber": {
        "number": "+15556589",
        "type": "WORK",
        "provider": "ABC",
        "extension": "31",
        "verified": false
      },
      "primaryEmail": {
        "value": "sgreen@abc.com",
        "verified": false
      },
      "dateOfBirth": "1991-06-21",
      "placeOfBirth": {
        "city": "Houston",
        "countryCode": "USA"
      },
      "socialId": "123-45-6789",
      "socialIdCountryCode": "USA",
      "citizenshipCountryCode": "CAN"
    },
    {
      "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": false,
          "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"
    }
  ]
}