Skip to content

Get a customer

GET
/api/v1/commerce/customers/{id}
curl --request GET \
--url https://digize.com/api/v1/commerce/customers/example \
--header 'x-api-key: <x-api-key>'

One customer and their orders, the newest first, or null when there’s no such contact.

Needs the commerce:read permission.

id
required
string
>= 1 characters <= 64 characters

Done

Media typeapplication/json
Any of:
object
customer
required
object
id
required

The CRM contact’s id.

string
firstName
required
string
lastName
required
string
name
required
string
email
required
string
phone
required
string
location
required
string
company
required
string | null
tags
required
Array<string>
emailMarketing
required
string
Allowed values: subscribed not_subscribed unsubscribed
smsMarketing
required
string
Allowed values: subscribed not_subscribed unsubscribed
orders
required
number
amountSpent
required

What they’ve paid, less refunds.

number
firstOrderAt
required
Any of:
string format: date-time
lastOrderAt
required
Any of:
string format: date-time
customerSince
required
string format: date-time
addresses
required
Array<object>
object
id
required
string
label
required
string
line1
required
string
line2
required
string | null
city
required
string
region
required
string
postalCode
required
string
country
required
string
isDefault
required
boolean
notes
required
Array<object>
object
id
required
string
body
required
string
author
required
string
createdAt
required
string format: date-time
orders
required
Array<object>
object
id
required
string
number
required
number
customer
required
object
id
required
string
name
required
string
email
required
string
status
required
string
Allowed values: paid partially_refunded refunded disputed
fulfillment
required
string
Allowed values: unfulfilled fulfilled not_required
channel
required
string
Allowed values: storefront subscription checkout_link
currency
required
string
lines
required
Array<object>
object
id
required
string
productId
required
string
variantId
required
string
name
required
string
variant
required
string
sku
required
string
quantity
required
number
price
required
number
fulfilled
required
number
refunded
required
number
subtotal
required
number
discount
required
number
discountCode
required
string | null
shipping
required
number
shippingName
required
string | null
tax
required
number
taxName
required
string
taxIncluded
required
boolean
total
required
number
giftCard
required

What a gift card paid of the total.

number
refunded
required
number
checkoutId
required
string
paymentId
required

The Stripe PaymentIntent, when Stripe was paid.

string
placedAt
required
string format: date-time
fulfilledAt
required
Any of:
string format: date-time
refundedAt
required
Any of:
string format: date-time
cancelledAt
required
Any of:
string format: date-time
phone
required
string
shippingAddress
required
Any of:
object
name
required
string
line1
required
string
line2
required
string | null
city
required
string
zip
required
string
country
required
string
tracking
required
Any of:
object
carrier
required
string
number
required
string | null
url
required
string | null
note
required
string
tags
required
Array<string>
attention
required

Something the team needs to look at.

string | null
receipt
required

Unreceipted: no sending domain yet, so only Stripe’s receipt went.

string
Allowed values: queued unreceipted not_sent

Example

{
"customer": {
"emailMarketing": "subscribed",
"smsMarketing": "subscribed"
},
"orders": [
{
"status": "paid",
"fulfillment": "unfulfilled",
"channel": "storefront",
"receipt": "queued"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}