cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/tasks \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tasks.list_tasks()
# 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.tasks.listTasks();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/dtos"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Tasks.ListTasks(ctx, dtos.ListTasksRequest{})
if err != nil {
log.Fatal(err)
}
if res.ListTasksResponse != nil {
// handle response
}
}{
"items": [
{
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"entity_type": "EVENTS",
"environment_id": "<string>",
"error_summary": "<string>",
"failed_at": "2023-11-07T05:31:56Z",
"failed_records": 123,
"file_name": "<string>",
"file_type": "CSV",
"file_url": "<string>",
"id": "<string>",
"metadata": {},
"processed_records": 123,
"scheduled_task_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"status": "published",
"successful_records": 123,
"task_status": "PENDING",
"task_type": "IMPORT",
"tenant_id": "<string>",
"total_records": 123,
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"workflow_id": "<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>"
}Tasks
List tasks
Use when listing or searching async tasks (e.g. admin queue view). Returns list with optional filtering.
GET
/
tasks
cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/tasks \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tasks.list_tasks()
# 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.tasks.listTasks();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/dtos"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Tasks.ListTasks(ctx, dtos.ListTasksRequest{})
if err != nil {
log.Fatal(err)
}
if res.ListTasksResponse != nil {
// handle response
}
}{
"items": [
{
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"entity_type": "EVENTS",
"environment_id": "<string>",
"error_summary": "<string>",
"failed_at": "2023-11-07T05:31:56Z",
"failed_records": 123,
"file_name": "<string>",
"file_type": "CSV",
"file_url": "<string>",
"id": "<string>",
"metadata": {},
"processed_records": 123,
"scheduled_task_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"status": "published",
"successful_records": 123,
"task_status": "PENDING",
"task_type": "IMPORT",
"tenant_id": "<string>",
"total_records": 123,
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"workflow_id": "<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>*
Query Parameters
Available options:
EVENTS, PRICES, CUSTOMERS, FEATURES Required range:
1 <= x <= 1000Required range:
x >= 0Available options:
asc, desc Available options:
published, deleted, archived Available options:
PENDING, PROCESSING, COMPLETED, FAILED Available options:
IMPORT, EXPORT 
