Skip to content

Preview campaign execution

POST
/v1/dunning_campaigns/{campaign_id}/preview

Simulate what the campaign would do if executed now.

campaign_id
required
Campaign Id
string format: uuid

Successful Response

CampaignPreviewResponse

Preview of what a campaign would do if executed now.

object
campaign_id
required
Campaign Id
string format: uuid
campaign_name
required
Campaign Name
string
status
required
Status
string
total_overdue_invoices
required
Total Overdue Invoices
integer
total_overdue_amount_cents
required
Total Overdue Amount Cents
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
payment_requests_to_create
required
Payment Requests To Create
integer
groups
Groups
Array<object>
CampaignPreviewInvoiceGroup

A group of invoices for a customer+currency that would trigger a payment request.

object
customer_id
required
Customer Id
string format: uuid
customer_name
Any of:
string
currency
required
Currency
string
total_outstanding_cents
required
Total Outstanding Cents
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
matching_threshold_cents
required
Matching Threshold Cents
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
invoice_count
required
Invoice Count
integer
invoices
Invoices
Array<object>
ExecutionHistoryInvoice

Invoice summary within an execution history entry.

object
id
required
Id
string format: uuid
invoice_number
required
Invoice Number
string
amount_cents
required
Amount Cents
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
currency
required
Currency
string
status
required
Status
string
existing_pending_requests
required
Existing Pending Requests
integer

Unauthorized

Dunning campaign not found

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object