Skip to main content
PATCH
Update an invoice series
Its scheduled invoice is rewritten to match, and invoices already sent are left as they are. See Edit a series.

Authorizations

X-API-Key
string
header
required

User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.

Headers

The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.

Pattern: ^le_[a-zA-Z0-9]+$

Path Parameters

seriesId
string
required

Series id with the inv_series_ prefix.

Body

application/json

Partial update. An omitted field is left unchanged; null clears a clearable field. recurrence, end, lineItems, ccEmails and paymentMethods are replaced as a whole. Changes apply to the next invoice and every one after it.

accountId
string

The account payments settle into, with the sa_group_ prefix.

virtualAccountId
string | null

A virtual account to settle into, with the subaccount_ prefix. null settles into the account's primary virtual account.

recurrence
Weekly · object

Which days the series issues an invoice on.

startDate
string<date>
timezone
string
Minimum string length: 1
paymentTermsDays
integer
Required range: 0 <= x <= 365
end
Never · object

When the series stops issuing invoices.

lineItems
InvoiceLineItemCreate · object[]
Required array length: 1 - 200 elements
discount
Percentage · object

null removes the discount.

taxRate
number | null

null removes the tax.

Required range: 0 <= x <= 100
memo
string | null

null clears the memo.

Required string length: 1 - 500
ccEmails
string<email>[]
Maximum array length: 10
paymentMethods
InvoicePaymentMethodInput · object[]
Maximum array length: 4

Response

The updated series.

Issues the same invoice to a customer on a schedule. Each invoice is created scheduled ahead of its send date, is sent at 9:00 in the series' timezone, and then behaves like any other invoice. All amounts are in USD.

id
string
required

Series id with the inv_series_ prefix.

Example:

"inv_series_2rj4l7hmrrrcv"

status
enum<string>
required
Available options:
active,
ended,
cancelled
accountId
string
required

The account payments settle into, with the sa_group_ prefix.

recurrence
Weekly · object
required

Which days the series issues an invoice on.

startDate
string<date>
required

The first day the series can issue an invoice on.

timezone
string
required

The IANA timezone the series' dates are in.

Example:

"America/New_York"

paymentTermsDays
integer
required

Each invoice is due this many days after it's issued.

end
Never · object
required

When the series stops issuing invoices.

lineItems
InvoiceLineItem · object[]
required
amounts
object
required

Each invoice's amounts.

ccEmails
string[]
required
paymentMethods
InvoicePaymentMethod · object[]
required
createdAt
string<date-time>
required
customerId
string

Customer id with the le_cus_ prefix.

virtualAccountId
string

The virtual account payments settle into, with the subaccount_ prefix. Absent when they settle into the account's primary virtual account.

discount
Percentage · object

Taken off the line items' subtotal before tax.

taxRate
number

Tax as a percent of the subtotal after the discount.

memo
string
nextInvoiceDate
string<date>

When the next invoice goes out. Only on active series.

nextInvoiceId
string

The next invoice, already created as scheduled, with the inv_ prefix. Only on active series.