cURL
curl --request PUT \
--url https://us.api.flexprice.io/v1/collections/reminders/bulk-update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"body": "<string>",
"expected_body": "<string>",
"expected_subject": "<string>",
"invoice_ids": [
"<string>"
],
"status_reason": "<string>",
"subject": "<string>",
"tone": "<string>"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.collections.bulk_update_reminder_drafts()
# 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.collections.bulkUpdateReminderDrafts({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Collections.BulkUpdateReminderDrafts(ctx, types.BulkUpdateRemindersRequest{})
if err != nil {
log.Fatal(err)
}
if res.BulkUpdateRemindersResponse != nil {
// handle response
}
}{
"drafts": [
{
"amount": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer_email": "<string>",
"customer_id": "<string>",
"customer_name": "<string>",
"days_overdue": 123,
"due_date": "2023-11-07T05:31:56Z",
"edited": true,
"email": {
"sent_at": "2023-11-07T05:31:56Z",
"status": "queued",
"status_reason": "<string>",
"to": [
"<string>"
]
},
"id": "<string>",
"invoice_id": "<string>",
"invoice_number": "<string>",
"original_body": "<string>",
"original_subject": "<string>",
"original_tone": "friendly",
"status": "pending",
"status_reason": "<string>",
"subject": "<string>",
"tone": "friendly",
"tone_reason": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"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>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Collections
Update reminders in bulk
Use when you want to apply one status (and optionally tone) change to up to 200 invoices at once, with the same rules as updating one reminder. Subject and body are not allowed. All or nothing: if any invoice cannot take the change (unknown or not overdue, a change not legal for its status, someone changed it meanwhile, or, where emails are on, an approval for a customer without an email address), the request fails and no invoice changes. The error details name the invoice. Approving queues each email for the dispatcher.
PUT
/
collections
/
reminders
/
bulk-update
cURL
curl --request PUT \
--url https://us.api.flexprice.io/v1/collections/reminders/bulk-update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"body": "<string>",
"expected_body": "<string>",
"expected_subject": "<string>",
"invoice_ids": [
"<string>"
],
"status_reason": "<string>",
"subject": "<string>",
"tone": "<string>"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.collections.bulk_update_reminder_drafts()
# 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.collections.bulkUpdateReminderDrafts({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Collections.BulkUpdateReminderDrafts(ctx, types.BulkUpdateRemindersRequest{})
if err != nil {
log.Fatal(err)
}
if res.BulkUpdateRemindersResponse != nil {
// handle response
}
}{
"drafts": [
{
"amount": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer_email": "<string>",
"customer_id": "<string>",
"customer_name": "<string>",
"days_overdue": 123,
"due_date": "2023-11-07T05:31:56Z",
"edited": true,
"email": {
"sent_at": "2023-11-07T05:31:56Z",
"status": "queued",
"status_reason": "<string>",
"to": [
"<string>"
]
},
"id": "<string>",
"invoice_id": "<string>",
"invoice_number": "<string>",
"original_body": "<string>",
"original_subject": "<string>",
"original_tone": "friendly",
"status": "pending",
"status_reason": "<string>",
"subject": "<string>",
"tone": "friendly",
"tone_reason": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"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>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Body
application/json
Invoice IDs and the change

