Skip to main content
POST
Upsert customer

Authorizations

x-api-key
string
header
required

You can obtain this key from the Atlas dashboard. It must be of type secret

Body

application/json
externalId
string
required

The external ID of the customer (e.g. the customer ID in your system)

Minimum string length: 1
Example:

"external-customer-id-123"

billingAddress1
string | null

Billing address line 1

Minimum string length: 1
Example:

"123 Main St"

billingAddress2
string | null

Billing address line 2

Minimum string length: 1
Example:

"Apt 1"

billingCity
string | null

Billing city

Minimum string length: 1
Example:

"Anytown"

billingCountry
string | null

Billing country

Minimum string length: 1
Example:

"US"

billingState
string | null

Billing state

Minimum string length: 1
Example:

"CA"

billingZipCode
string | null

Billing zip code. Must be 5 digits or 5+4 format.

Pattern: ^\d{5}(-\d{4})?$
Example:

"12345"

shippingAddress1
string | null

Shipping address line 1

Minimum string length: 1
Example:

"123 Main St"

shippingAddress2
string | null

Shipping address line 2

Minimum string length: 1
Example:

"Apt 1"

shippingCity
string | null

Shipping city

Minimum string length: 1
Example:

"Anytown"

shippingCountry
string | null

Shipping country

Minimum string length: 1
Example:

"US"

shippingState
string | null

Shipping state

Minimum string length: 1
Example:

"CA"

shippingZipCode
string | null

Shipping zip code. Must be 5 digits or 5+4 format.

Pattern: ^\d{5}(-\d{4})?$
Example:

"12345"

email
string<email> | null

The email of the customer

Minimum string length: 1
Example:

"john.doe@example.com"

name
string | null

The name of the customer

Minimum string length: 1
Example:

"John Doe"

quickBooksId
string | null

The QuickBooks ID of the customer

Minimum string length: 1
Example:

"quickbooks-customer-id-123"

stripeId
string | null

The Stripe ID of the customer

Minimum string length: 1
Example:

"stripe-customer-id-123"

xeroId
string | null

The Xero ID of the customer

Minimum string length: 1
Example:

"xero-customer-id-123"

Response

The customer that has been upserted.

createdAt
string<date>
required

The date and time the customer was created

Example:

"2021-01-01T00:00:00.000Z"

id
string
required

The Atlas customer ID

Minimum string length: 1
Example:

"atlas-internal-customer-id-123"

updatedAt
string<date>
required

The date and time the customer was last updated

Example:

"2021-01-01T00:00:00.000Z"

merchantId
string
required

The Atlas merchant ID

Minimum string length: 1
Example:

"atlas-internal-merchant-id-123"

billingAddress1
string | null

Billing address line 1

Minimum string length: 1
Example:

"123 Main St"

billingAddress2
string | null

Billing address line 2

Minimum string length: 1
Example:

"Apt 1"

billingCity
string | null

Billing city

Minimum string length: 1
Example:

"Anytown"

billingCountry
string | null

Billing country

Minimum string length: 1
Example:

"US"

billingState
string | null

Billing state

Minimum string length: 1
Example:

"CA"

billingZipCode
string | null

Billing zip code. Must be 5 digits or 5+4 format.

Pattern: ^\d{5}(-\d{4})?$
Example:

"12345"

shippingAddress1
string | null

Shipping address line 1

Minimum string length: 1
Example:

"123 Main St"

shippingAddress2
string | null

Shipping address line 2

Minimum string length: 1
Example:

"Apt 1"

shippingCity
string | null

Shipping city

Minimum string length: 1
Example:

"Anytown"

shippingCountry
string | null

Shipping country

Minimum string length: 1
Example:

"US"

shippingState
string | null

Shipping state

Minimum string length: 1
Example:

"CA"

shippingZipCode
string | null

Shipping zip code. Must be 5 digits or 5+4 format.

Pattern: ^\d{5}(-\d{4})?$
Example:

"12345"

email
string<email> | null

The email of the customer

Minimum string length: 1
Example:

"john.doe@example.com"

externalId
string | null

The external ID of the customer (e.g. the customer ID in your system)

Minimum string length: 1
Example:

"external-customer-id-123"

name
string | null

The name of the customer

Minimum string length: 1
Example:

"John Doe"

quickBooksId
string | null

The QuickBooks ID of the customer

Minimum string length: 1
Example:

"quickbooks-customer-id-123"

stripeId
string | null

The Stripe ID of the customer

Minimum string length: 1
Example:

"stripe-customer-id-123"