curl --location --request GET 'https://api.stateset.com/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
/
v1
/
customers
curl --location --request GET 'https://api.stateset.com/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
Maximum number of customers to return per page. Range: 1-100.Example:
50Number of records to skip for pagination.Example:
20Sort direction for results. Options:
asc, desc.Filter customers by email address (exact match).Example:
jane.doe@example.comFilter customers created after this ISO 8601 date.Example:
2024-01-01T00:00:00.000ZResponse
Array of customer objects.
Show Customer Object
Show Customer Object
Unique identifier for the customer.
Customer’s email address.
Customer’s first name.
Customer’s last name.
Customer’s phone number.
Associated Stripe customer ID.
ISO 8601 date when the customer account was activated.
ISO 8601 timestamp of the last update.
Total number of customers matching the query.
Whether there are more results beyond the current page.
curl --location --request GET 'https://api.stateset.com/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