RocketKOR

Update a Business Customer

Update the profile information for a business Customer Account. You can also add additional contacts to the Customer Account.

Endpoint

PUT /v1/customers/{customerId}

Authorization Header

Authorization: Bearer <access_token>

Path Parameters

customerId

string (UUID)

Customer ID.

Request Body

addresses

array

Customer addresses. You can add multiple addresses, such as a billing address, shipping address, and mailing address.

type  REQUIRED

string enum, values: WORKPLACE, RESIDENTIAL, MAILING, BILLING, SHIPPING, OTHER

Type of address.

addressLine1  REQUIRED

string, max length: 50, min length: 1

Address line 1.

addressLine2

string, max length: 50, min length: 1

Address line 2.

addressLine3

string, max length: 50, min length: 1

Address line 3.

addressLine4

string, max length: 50, min length: 1

Address line 4.

addressLine5

string, max length: 50, min length: 1

Address line 5.

cityName

string

Customer’s city.

stateCode  CONDITIONAL

string

Customer’s state, province, or territory. Required if country 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

Customer’s country. Must be an ISO 3166-1 uppercase alpha 3-character country code. For example, the United States is USA.

zipCode

string

Customer’s zip code or postal code.

shippingContact

object

Customer’s shipping contact person.

shipToFirstName

string, max length: 40, min length: 1

First name of the person responsible for receiving shipments.

shipToMiddleName

string, max length: 40, min length: 1

Middle name of the person responsible for receiving shipments.

shipToLastName

string, max length: 40, min length: 1

Last name of the person responsible for receiving shipments.

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

string enum, values: INDIVIDUAL, BUSINESS

Type of customer. For business customers, value must be BUSINESS.

doingBusinessAsName

string, max length: 40, min length: 1

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

contacts

object

Contacts for the business. At least one contact mut be provided.

firstName

string, max length: 40, min length: 1

Contact’s first name.

middleName

string, max length: 40, min length: 1

Contact’s middle name.

lastName

string, max length: 40, min length: 1

Contact’s last name.

primary

boolean

Whether this is the primary contact for the business.

primaryPhoneNumber

object

Contact’s primary phone number.

number

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

string enum, values: WORK, HOME, MOBILE

Type of phone number.

provider

string, max length: 40, min length: 1

Phone provider.

extension

string, max length: 10, min length: 1

Phone extension.

verified

boolean

Whether the phone number has been verified.

primaryEmail

string (email), max length: 320

Contact’s primary email address.

value

string (email), max length: 320

Contact’s email address.

verified

boolean

Whether the email address has been verified.

Returns

Returns the customer details, including a unique ID for the account. For details, see the Business Customer object.

SAMPLE REQUEST

				
					{
  "doingBusinessAsName": "ACME Corp."
}
				
			

SAMPLE RESPONSE

				
					{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "ACTIVE",
  "addresses": [
    {
      "type": "MAILING",
      "addressLine1": "100 Main St",
      "addressLine2": "Suite 100",
      "addressLine3": "",
      "addressLine4": "",
      "addressLine5": "",
      "cityName": "Greenville",
      "stateCode": "MO",
      "countryCode": "USA",
      "zipCode": "63368"
    },
    {
      "type": "SHIPPING",
      "addressLine1": "200 King St",
      "addressLine2": "Suite 310",
      "addressLine3": "",
      "addressLine4": "",
      "addressLine5": "",
      "cityName": "Greenville",
      "stateCode": "MO",
      "countryCode": "USA",
      "zipCode": "63368"
    }
  ],
  "shippingContact": {
    "shipToFirstName": "Jack",
    "shipToMiddleName": "Fred",
    "shipToLastName": "Smith"
  },
  "metadata": {
    "customerRefId": "100000333"
  },
  "createdBy": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "type": "EMPLOYEE"
  },
  "createdAt": "2022-11-23T00:42:50.311Z",
  "updatedBy": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "type": "EMPLOYEE"
  },
  "updatedAt": "2022-11-23T00: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
      }
    }
  ]
}