Skip to main content
POST
Create a recovery case

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
invoices
string[]
required

The IDs of the invoices to enrol. Every invoice must be open, belong to the same customer and be more than 28 days past due.

Minimum array length: 1
Pattern: ^[a-zA-Z0-9_]+$
metadata
object | null

The metadata for the case.

Response

200 - application/json

Returns a recovery case object if successful.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
recovery_case
canceled_at
integer | null
required

The date and time the case was canceled.

currency
enum<string>
required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

Available options:
gbp,
usd,
eur,
sek
Example:

"gbp"

customer
required

The customer the case is recovering from.

enrolled_at
integer | null
required

The date and time the invoices were enrolled in recovery.

enrolled_by
string | null
required

The ID of the user who enrolled the case, if it was enrolled from the dashboard.

fee_percent
number
required

The percentage of each recovered payment charged as a recovery fee.

hosted_recovery_url
string | null
required

The URL of the hosted recovery page, where the customer can pay or set up a payment plan.

last_contacted_at
integer | null
required

The date and time the customer was last contacted about the case.

payment_plan
required

The active payment plan for the case, if the customer has accepted one.

recovered_at
integer | null
required

The date and time every enrolled invoice was fully paid.

status
enum<string>
required

The status of the case.

Available options:
open,
plan_active,
recovered,
canceled
account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

amount_enrolled
integer
default:0

The total amount outstanding across the enrolled invoices when the case was opened.

amount_recovered
integer
default:0

The amount collected against the enrolled invoices since the case was opened.

email_attempt
integer
default:0

The number of escalated recovery emails sent for the case.

fee_collected
integer
default:0

The total recovery fee charged against the amount recovered, including tax.

invoices
string[]

The IDs of the invoices enrolled in the case.

metadata
object | null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.