cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/tasks/{id} \
--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.get_task(id="<id>")
# 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.getTask("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Tasks.GetTask(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.TaskResponse != nil {
// handle response
}
}{
"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>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Tasks
Get a task
Use when checking task status or progress (e.g. polling after create). Returns task by ID.
GET
/
tasks
/
{id}
cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/tasks/{id} \
--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.get_task(id="<id>")
# 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.getTask("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Tasks.GetTask(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.TaskResponse != nil {
// handle response
}
}{
"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>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"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>*
Path Parameters
Task ID
Response
OK
Available options:
EVENTS, PRICES, CUSTOMERS, FEATURES Available options:
CSV, JSON Available options:
published, deleted, archived Available options:
PENDING, PROCESSING, COMPLETED, FAILED Available options:
IMPORT, EXPORT 
