Customers
List Customers
List all end-customers for the current tenant.
Admin-only. Supports pagination, search by email and sorting. RLS ensures only the current tenant's customers are visible.
"Round up the usual suspects." - Captain Renault, Casablanca
In: header
Query Parameters
Page number
11 <= valueItems per page
201 <= value <= 100Search by email
""Sort field
"created_at"Sort direction: asc or desc
"desc"Header Parameters
Response Body
curl -X GET "https://loading/v1/customers?page=1&per_page=20&search=&sort_by=created_at&sort_dir=desc" \ -H "X-Api-Key: string"{
"customers": [
{
"active_subscription_count": 0,
"company_name": "string",
"country_code": "string",
"created_at": "2019-08-24T14:15:22Z",
"currency": "string",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"instance_count": 0,
"latest_subscription_status": "string",
"running_instance_count": 0,
"subscription_count": 0,
"timezone": "string"
}
],
"page": 0,
"per_page": 0,
"total": 0,
"total_pages": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Create Customer
Create a new end-customer for the current tenant.
Admin-only. This is how tenants (e.g. CrewAmp) onboard their customers (e.g. IQM, Steve) programmatically or via the dashboard.
Duplicate email within the same tenant is rejected.
In: header
Header Parameters
Response Body
curl -X POST "https://loading/v1/customers" \ -H "X-Api-Key: string" \ -H "Content-Type: application/json" \ -d '{}'{
"company_name": "string",
"created_at": "2019-08-24T14:15:22Z",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Customer
Get detailed info for a single customer.
"You're gonna need a bigger boat." - Chief Brody, Jaws (what you say when a customer's instance count keeps growing)
In: header
Path Parameters
uuidHeader Parameters
Response Body
curl -X GET "https://loading/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "X-Api-Key: string"{
"active_subscription_count": 0,
"company_name": "string",
"country_code": "string",
"created_at": "2019-08-24T14:15:22Z",
"currency": "string",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"instance_count": 0,
"instances": [],
"latest_subscription_status": "string",
"locale": "string",
"running_instance_count": 0,
"stripe_customer_id": "string",
"subscription_count": 0,
"subscriptions": [],
"timezone": "string",
"updated_at": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Clone Customer Setup
Clone a customer's rules to a new customer. 'Set up like Steve but for this new plumber.'
In: header
Path Parameters
uuidHeader Parameters
truelength <= 200uuidResponse Body
curl -X POST "https://loading/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/clone" \ -H "X-Api-Key: string" \ -H "Content-Type: application/json" \ -d '{ "company_name": "string", "source_customer_id": "22f9e5e1-5129-4cc7-9d8d-1248b092e05b" }'{
"company_name": "string",
"created_at": "2019-08-24T14:15:22Z",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}