curl --location --request GET 'https://api.stateset.com/api/v1/customers?limit=20&offset=0&order_direction=desc' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
query listCustomers($limit: Int!, $offset: Int!) {
customers(limit: $limit, offset: $offset, order_by: { timestamp: desc }) {
sso_id
activationDate
email
firstName
lastName
phone
stripe_customer_id
timestamp
}
customers_aggregate {
aggregate {
count
}
}
}
const customers = await stateset.customers.list({
limit: 20,
offset: 0,
order_direction: 'desc',
});
customers = stateset.customers.list(
limit=20,
offset=0,
order_direction='desc',
)
customers = Stateset::Customers.list(
limit: 20,
offset: 0,
order_direction: 'desc',
)
customers, err := stateset.Customers.List(&CustomerListParams{
Limit: 20,
Offset: 0,
OrderDirection: "desc",
})
$customers = $stateset->customers->list([
'limit' => 20,
'offset' => 0,
'order_direction' => 'desc',
]);
CustomerCollection customers = stateset.customers().list(
CustomerListParams.builder()
.setLimit(20)
.setOffset(0)
.setOrderDirection("desc")
.build()
);
{
"customers": [
{
"sso_id": "1234-5678-9012-3456",
"email": "jane.doe@example.com",
"firstName": "Jane",
"lastName": "Doe",
"phone": "+1-555-123-4567",
"stripe_customer_id": "cus_1234567890",
"activationDate": "2024-01-15T00:00:00.000Z",
"timestamp": "2024-06-01T12:30:00.000Z"
},
{
"sso_id": "9876-5432-1098-7654",
"email": "john.smith@example.com",
"firstName": "John",
"lastName": "Smith",
"phone": "+1-555-987-6543",
"stripe_customer_id": "cus_0987654321",
"activationDate": "2024-02-20T00:00:00.000Z",
"timestamp": "2024-05-28T09:15:00.000Z"
}
],
"total_count": 142,
"has_more": true
}
{
"error": {
"code": "INVALID_PARAMETER",
"message": "limit must be between 1 and 100",
"details": {
"parameter": "limit",
"value": 500
},
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is invalid or has been revoked",
"request_id": "req_abc123def456"
}
}
List Customers
Retrieve a paginated list of customers with optional filtering and sorting
GET
/
api
/
v1
/
customers
curl --location --request GET 'https://api.stateset.com/api/v1/customers?limit=20&offset=0&order_direction=desc' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
query listCustomers($limit: Int!, $offset: Int!) {
customers(limit: $limit, offset: $offset, order_by: { timestamp: desc }) {
sso_id
activationDate
email
firstName
lastName
phone
stripe_customer_id
timestamp
}
customers_aggregate {
aggregate {
count
}
}
}
const customers = await stateset.customers.list({
limit: 20,
offset: 0,
order_direction: 'desc',
});
customers = stateset.customers.list(
limit=20,
offset=0,
order_direction='desc',
)
customers = Stateset::Customers.list(
limit: 20,
offset: 0,
order_direction: 'desc',
)
customers, err := stateset.Customers.List(&CustomerListParams{
Limit: 20,
Offset: 0,
OrderDirection: "desc",
})
$customers = $stateset->customers->list([
'limit' => 20,
'offset' => 0,
'order_direction' => 'desc',
]);
CustomerCollection customers = stateset.customers().list(
CustomerListParams.builder()
.setLimit(20)
.setOffset(0)
.setOrderDirection("desc")
.build()
);
{
"customers": [
{
"sso_id": "1234-5678-9012-3456",
"email": "jane.doe@example.com",
"firstName": "Jane",
"lastName": "Doe",
"phone": "+1-555-123-4567",
"stripe_customer_id": "cus_1234567890",
"activationDate": "2024-01-15T00:00:00.000Z",
"timestamp": "2024-06-01T12:30:00.000Z"
},
{
"sso_id": "9876-5432-1098-7654",
"email": "john.smith@example.com",
"firstName": "John",
"lastName": "Smith",
"phone": "+1-555-987-6543",
"stripe_customer_id": "cus_0987654321",
"activationDate": "2024-02-20T00:00:00.000Z",
"timestamp": "2024-05-28T09:15:00.000Z"
}
],
"total_count": 142,
"has_more": true
}
{
"error": {
"code": "INVALID_PARAMETER",
"message": "limit must be between 1 and 100",
"details": {
"parameter": "limit",
"value": 500
},
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is invalid or has been revoked",
"request_id": "req_abc123def456"
}
}
Returns a paginated array of customer objects. Use query parameters to filter, sort, and paginate results.
Query Parameters
integer
default:"20"
Maximum number of customers to return per page. Range: 1-100.Example:
50integer
default:"0"
Number of records to skip for pagination.Example:
20string
default:"desc"
Sort direction for results. Options:
asc, desc.string
Filter customers by email address (exact match).Example:
jane.doe@example.comstring
Filter customers created after this ISO 8601 date.Example:
2024-01-01T00:00:00.000ZResponse
array
Array of customer objects.
Show Customer Object
Show Customer Object
string
Unique identifier for the customer.
string
Customer’s email address.
string
Customer’s first name.
string
Customer’s last name.
string
Customer’s phone number.
string
Associated Stripe customer ID.
string
ISO 8601 date when the customer account was activated.
string
ISO 8601 timestamp of the last update.
integer
Total number of customers matching the query.
boolean
Whether there are more results beyond the current page.
curl --location --request GET 'https://api.stateset.com/api/v1/customers?limit=20&offset=0&order_direction=desc' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
query listCustomers($limit: Int!, $offset: Int!) {
customers(limit: $limit, offset: $offset, order_by: { timestamp: desc }) {
sso_id
activationDate
email
firstName
lastName
phone
stripe_customer_id
timestamp
}
customers_aggregate {
aggregate {
count
}
}
}
const customers = await stateset.customers.list({
limit: 20,
offset: 0,
order_direction: 'desc',
});
customers = stateset.customers.list(
limit=20,
offset=0,
order_direction='desc',
)
customers = Stateset::Customers.list(
limit: 20,
offset: 0,
order_direction: 'desc',
)
customers, err := stateset.Customers.List(&CustomerListParams{
Limit: 20,
Offset: 0,
OrderDirection: "desc",
})
$customers = $stateset->customers->list([
'limit' => 20,
'offset' => 0,
'order_direction' => 'desc',
]);
CustomerCollection customers = stateset.customers().list(
CustomerListParams.builder()
.setLimit(20)
.setOffset(0)
.setOrderDirection("desc")
.build()
);
{
"customers": [
{
"sso_id": "1234-5678-9012-3456",
"email": "jane.doe@example.com",
"firstName": "Jane",
"lastName": "Doe",
"phone": "+1-555-123-4567",
"stripe_customer_id": "cus_1234567890",
"activationDate": "2024-01-15T00:00:00.000Z",
"timestamp": "2024-06-01T12:30:00.000Z"
},
{
"sso_id": "9876-5432-1098-7654",
"email": "john.smith@example.com",
"firstName": "John",
"lastName": "Smith",
"phone": "+1-555-987-6543",
"stripe_customer_id": "cus_0987654321",
"activationDate": "2024-02-20T00:00:00.000Z",
"timestamp": "2024-05-28T09:15:00.000Z"
}
],
"total_count": 142,
"has_more": true
}
{
"error": {
"code": "INVALID_PARAMETER",
"message": "limit must be between 1 and 100",
"details": {
"parameter": "limit",
"value": 500
},
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is invalid or has been revoked",
"request_id": "req_abc123def456"
}
}
⌘I