Customers

Markdown

View as Markdown

A store's customers, known from their orders' email or phone, with what they ordered. Reading them needs your role to read orders.

All paths are relative to the base URL https://api.store.link/v1. Every request needs your API key; see Overview.

Endpoints

EndpointWhat it does
GET /stores/{storeId}/customersList customers
GET /stores/{storeId}/customers/{customerId}Get a customer

List customers

GET /stores/{storeId}/customers

Customers, newest first, or those whose name, email or phone has the search.

Your role in the store needs to read orders.

Path parameters

NameTypeDescription
storeIdstring
required
A store id from GET /stores.

Query parameters

NameTypeDescription
searchstringPart of a name, email or phone.
pageintegerDefault: 1. At least 1.
limitintegerDefault: 25. 1 to 100.

Example request

curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/customers' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring, nullable
data[].emailstring, nullable
data[].phonestring, nullableWith the country code, e.g. +15550100.
data[].order_countintegerOrders linked to the customer, leaving out those over the plan's monthly limit.
data[].created_atstring (date-time)
pageintegerGreater than 0.
limitintegerGreater than 0.
totalinteger
has_moreboolean

Example response

{
  "data": [
    {
      "id": "6663c2f5e4b3da0015ef7801",
      "name": "Jane Doe",
      "email": "[email protected]",
      "phone": "+14155550123",
      "order_count": 3,
      "created_at": "2026-11-20T10:15:00.000Z"
    }
  ],
  "page": 1,
  "limit": 25,
  "total": 50,
  "has_more": true
}

Errors

The common errors: 400 invalid_request, 401 unauthorized, 403 insufficient_permission, 404 store_not_found, 429 rate_limited, 500 internal_error. See Errors in the Overview.

Get a customer

GET /stores/{storeId}/customers/{customerId}

One customer with their saved addresses, amount spent and 10 newest orders.

Your role in the store needs to read orders.

Path parameters

NameTypeDescription
storeIdstring
required
A store id from GET /stores.
customerIdstring
required
A customer id from GET /stores/{storeId}/customers. A 24-character id.

Example request

curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/customers/6663c2f5e4b3da0015ef7801' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

FieldTypeDescription
idstring
namestring, nullable
emailstring, nullable
phonestring, nullableWith the country code, e.g. +15550100.
order_countintegerOrders linked to the customer, leaving out those over the plan's monthly limit.
created_atstring (date-time)
amount_spentnumberThe total of the customer's orders, leaving out those over the plan's limit.
addressesarray of object
addresses[].idstring
addresses[].defaultboolean
addresses[].labelstring, nullable
addresses[].namestring, nullable
addresses[].phonestring, nullable
addresses[].address_line1string, nullable
addresses[].address_line2string, nullable
addresses[].citystring, nullable
addresses[].statestring, nullable
addresses[].zipstring, nullable
addresses[].countrystring, nullable
addresses[].instructionsstring, nullable
recent_ordersarray of objectThe 10 newest, leaving out those over the plan's monthly limit.
recent_orders[].idstring
recent_orders[].numberstring, nullableThe order number the customer sees, e.g. "1042". Test orders have test_ numbers.
recent_orders[].statusstringdelivered appears only on older orders. One of: pending, shipped, completed, cancelled, delivered.
recent_orders[].payment_statusstring, nullableOne of: pending, paid, failed.
recent_orders[].customerobject
recent_orders[].customer.namestring, nullable
recent_orders[].customer.emailstring, nullable
recent_orders[].customer.phonestring, nullable
recent_orders[].currencystring, nullableISO 4217 code.
recent_orders[].totalnumber, nullable
recent_orders[].item_countinteger
recent_orders[].testbooleanPlaced while the store was in test mode.
recent_orders[].created_atstring (date-time)
recent_orders[].updated_atstring (date-time)

Example response

{
  "id": "6663c2f5e4b3da0015ef7801",
  "name": "Jane Doe",
  "email": "[email protected]",
  "phone": "+14155550123",
  "order_count": 3,
  "created_at": "2026-11-20T10:15:00.000Z",
  "amount_spent": 135,
  "addresses": [
    {
      "id": "6664d306f5c4eb0016f08912",
      "default": true,
      "label": "Home",
      "name": "Jane Doe",
      "phone": "+14155550123",
      "address_line1": "221 Market St",
      "address_line2": "Apt 4",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94105",
      "country": "US",
      "instructions": "Leave at the front desk"
    }
  ],
  "recent_orders": [
    {
      "id": "6661a0d3c2f1b80013cd56ef",
      "number": "1042",
      "status": "pending",
      "payment_status": "pending",
      "customer": {
        "name": "Jane Doe",
        "email": "[email protected]",
        "phone": "+14155550123"
      },
      "currency": "USD",
      "total": 50,
      "item_count": 2,
      "test": false,
      "created_at": "2026-11-20T10:15:00.000Z",
      "updated_at": "2026-11-20T10:15:00.000Z"
    }
  ]
}

Errors

  • 404 not_found: Nothing with this id in this store, or something the body names, such as a product or coupon, is not there.

Plus the common errors: 400 invalid_request, 401 unauthorized, 403 insufficient_permission, 404 store_not_found, 429 rate_limited, 500 internal_error. See Errors in the Overview.

Related Articles

Was this article helpful?