cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/tasks/scheduled/schedule-draft-finalization \
--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.scheduled_tasks.schedule_draft_finalization()
# 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.scheduleDraftFinalization();
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.ScheduleDraftFinalization(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Scheduled Tasks
Schedule draft finalization
Triggers the draft invoice finalization workflow that scans computed draft invoices whose finalization delay has elapsed and finalizes them (assign invoice number, sync to vendors, attempt payment).
POST
/
tasks
/
scheduled
/
schedule-draft-finalization
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/tasks/scheduled/schedule-draft-finalization \
--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.scheduled_tasks.schedule_draft_finalization()
# 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.scheduleDraftFinalization();
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.ScheduleDraftFinalization(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{}{
"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>*
Response
OK
The response is of type object.

