Skip to main content
GET
Get weekly collections

Authorizations

X-App-Id
string
header
required

App ID for authentication

X-Api-Key
string
header
required

API Key for authentication

Query Parameters

weeks
enum<integer>
default:52

Number of complete weeks to return, ending with last week. Ignored when you send start_date or end_date.

Available options:
13,
26,
52
start_date
string<date>

Return the complete weeks whose Monday is on or after this date, as YYYY-MM-DD. At most 52 weeks, and no more than 104 weeks back.

end_date
string<date>

Return the complete weeks whose Monday is on or before this date, as YYYY-MM-DD. Defaults to last week. Sent alone, returns up to 52 weeks ending here.

compare
boolean
default:false

Set to true to fill each week's prior_year_rate.

Response

Successful operation

status
enum<string>

preparing while your weekly figures are worked out for the first time. Then data is empty and estimate, estimate_unavailable_reason, and usual_rate are null. Ask again in a few minutes.

Available options:
ready,
preparing
Example:

"ready"

currency
enum<string>

ISO currency code. Most resources support these. Products are limited to USD, CAD, EUR, GBP, AUD.

Available options:
USD,
CAD,
GBP,
EUR,
AUD,
JPY,
INR
week_starts_on
enum<string>

Weeks run Monday to Sunday, in your account's time zone.

Available options:
monday
weeks_available
integer

Number of complete weeks since the week of your first payment, including weeks with no payments.

Example:

52

min_weeks_for_estimate
integer

Number of complete weeks needed before there's an estimate or a usual rate.

Example:

8

open_receivables
integer

What your customers owe now, in cents. The same as total_receivables on Get receivables aging.

Example:

124900000

estimate
object | null

This week's likely collections, in cents. Null with a reason in estimate_unavailable_reason.

estimate_unavailable_reason
enum<string> | null

Why there's no estimate. not_enough_weeks: fewer than min_weeks_for_estimate complete weeks, or no week that opened owing anything. no_open_receivables: nothing is owed now. no_recent_payments: something is owed, but nothing was paid in the last 13 weeks. Null when there's an estimate.

Available options:
not_enough_weeks,
no_open_receivables,
no_recent_payments
Example:

null

usual_rate
number | null

The share of opening receivables usually collected in a week, as a fraction (0.146 is 14.6%). Null before min_weeks_for_estimate weeks.

Example:

0.146

data
object[]

The complete weeks asked for, oldest first, including weeks with no payments.