import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.customers.get({
id: "<id>",
});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"email": "<string>",
"name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"customer_type": "paid",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"orders_count": 123,
"total_spend": 123,
"tags": "<array>"
}Returns a specific customer
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.customers.get({
id: "<id>",
});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"email": "<string>",
"name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"customer_type": "paid",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"orders_count": 123,
"total_spend": 123,
"tags": "<array>"
}API key in the format: Bearer {api_token}
The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
Customer details
paid, free, lead Was this page helpful?