cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/customers/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_ids": [
"<string>"
],
"email": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"expand": "<string>",
"external_id": "<string>",
"external_ids": [
"<string>"
],
"filters": [
{
"field": "<string>",
"value": {
"array": [
"<string>"
],
"boolean": true,
"date": "<string>",
"number": 123,
"string": "<string>"
}
}
],
"limit": 500,
"metadata": {},
"offset": 1,
"sort": [
{
"field": "<string>"
}
],
"start_time": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.customers.query_customer()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.customers.queryCustomer({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Customers.QueryCustomer(ctx, types.CustomerFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListCustomersResponse != nil {
// handle response
}
}{
"items": [
{
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"address_postal_code": "<string>",
"address_state": "<string>",
"contact": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"email": "<string>",
"environment_id": "<string>",
"external_id": "<string>",
"id": "<string>",
"integrations": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"entity_id": "<string>",
"entity_type": "customer",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"provider_entity_id": "<string>",
"provider_type": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"metadata": {},
"name": "<string>",
"status": "published",
"tax_treatment": "taxable",
"tenant_id": "<string>",
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Customers
Query customers
Use when listing or searching customers (e.g. admin CRM or reporting). Returns a paginated list; supports filtering and sorting.
POST
/
customers
/
search
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/customers/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_ids": [
"<string>"
],
"email": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"expand": "<string>",
"external_id": "<string>",
"external_ids": [
"<string>"
],
"filters": [
{
"field": "<string>",
"value": {
"array": [
"<string>"
],
"boolean": true,
"date": "<string>",
"number": 123,
"string": "<string>"
}
}
],
"limit": 500,
"metadata": {},
"offset": 1,
"sort": [
{
"field": "<string>"
}
],
"start_time": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.customers.query_customer()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.customers.queryCustomer({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Customers.QueryCustomer(ctx, types.CustomerFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListCustomersResponse != nil {
// handle response
}
}{
"items": [
{
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"address_postal_code": "<string>",
"address_state": "<string>",
"contact": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"email": "<string>",
"environment_id": "<string>",
"external_id": "<string>",
"id": "<string>",
"integrations": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"entity_id": "<string>",
"entity_type": "customer",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"provider_entity_id": "<string>",
"provider_type": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"metadata": {},
"name": "<string>",
"status": "published",
"tax_treatment": "taxable",
"tenant_id": "<string>",
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
application/json
Filter
Show child attributes
Show child attributes
Required range:
1 <= x <= 1000Show child attributes
Show child attributes
Required range:
x >= 0Available options:
asc, desc Show child attributes
Show child attributes
Available options:
published, deleted, archived 
