cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/tasks/scheduled/{id}/run \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.scheduled_tasks.trigger_scheduled_task_run(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.scheduledTasks.triggerScheduledTaskRun("<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.ScheduledTasks.TriggerScheduledTaskRun(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.TriggerForceRunResponse != nil {
// handle response
}
}{
"end_time": "2023-11-07T05:31:56Z",
"message": "<string>",
"mode": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"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>"
}Scheduled Tasks
Trigger force run
Use when you need to run a scheduled export immediately (e.g. on-demand report or catch-up). Supports optional custom time range.
POST
/
tasks
/
scheduled
/
{id}
/
run
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/tasks/scheduled/{id}/run \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.scheduled_tasks.trigger_scheduled_task_run(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.scheduledTasks.triggerScheduledTaskRun("<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.ScheduledTasks.TriggerScheduledTaskRun(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.TriggerForceRunResponse != nil {
// handle response
}
}{
"end_time": "2023-11-07T05:31:56Z",
"message": "<string>",
"mode": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"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
Scheduled Task ID
Body
application/json
Optional start and end time for custom range

