Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const result = await priceos.usage.deleteEvents({
eventIds: ["event_123", "event_456"],
});curl -X POST "https://api.priceos.com/v1/usage/delete" \
-H "x-api-key: PRICEOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"eventIds": ["event_123", "event_456"]
}'{
"deletedCount": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Usage
Delete Usage Events (Batch)
Delete usage events by IDs or by customer selectors.
POST
/
v1
/
usage
/
delete
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const result = await priceos.usage.deleteEvents({
eventIds: ["event_123", "event_456"],
});curl -X POST "https://api.priceos.com/v1/usage/delete" \
-H "x-api-key: PRICEOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"eventIds": ["event_123", "event_456"]
}'{
"deletedCount": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json