Skip to main content
PATCH
Update an invoice
Only the fields you send change, and null clears a field. See Edit an invoice.

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

invoiceId
string
required

Invoice id with the inv_ prefix.

Body

application/json

Partial update. An omitted field is left unchanged; null clears a clearable field. lineItems, ccEmails and paymentMethods are replaced as a whole.

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.

number
string
Required string length: 1 - 50
Pattern: ^[A-Z0-9_-]+$
issueDate
string<date>
dueDate
string<date>
timezone
string
Minimum string length: 1
scheduledSendDate
string<date>

Only for scheduled 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 invoice.

A request for payment you send a customer. Slash emails it, hosts a payment page at payUrl, matches incoming deposits to it and keeps its status and amounts up to date. All amounts are in USD.

id
string
required

Invoice id with the inv_ prefix.

Example:

"inv_2rj4l7hmrrrcv"

number
string
required

Unique per legal entity.

Example:

"INV-1042"

status
enum<string>
required
Available options:
scheduled,
unpaid,
partially_paid,
paid,
void
overdue
boolean
required

Whether the invoice is unpaid or partially_paid and its due date has passed in its timezone.

accountId
string
required

The account payments settle into, with the sa_group_ prefix.

Example:

"sa_group_2rj4l7hmrrrcv"

issueDate
string<date>
required
dueDate
string<date>
required
timezone
string
required

The IANA timezone the invoice's dates are in.

Example:

"America/New_York"

lineItems
InvoiceLineItem · object[]
required
amounts
object
required
ccEmails
string[]
required

Also copied on the invoice and its reminders.

billedTo
object
required

The customer's details as they were when the invoice was created.

paymentMethods
InvoicePaymentMethod · object[]
required
payments
InvoicePayment · object[]
required

Oldest first.

payUrl
string
required

The hosted page where the customer views and pays the invoice.

documentId
string
required

The invoice's PDF, with the st_ prefix. Download it with GET /v2/documents/{documentId}. Each edit issues a new PDF.

Example:

"st_2rj4l7hmrrrcv"

createdAt
string<date-time>
required
customerId
string

Customer id with the le_cus_ prefix.

Example:

"le_cus_2rj4l7hmrrrcv"

virtualAccountId
string

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

seriesId
string

The recurring series that issued the invoice, with the inv_series_ prefix.

scheduledSendDate
string<date>

When a scheduled invoice will be emailed, at 9:00 in its timezone.

discount
Percentage · object

Taken off the line items' subtotal before tax.

taxRate
number

Tax as a percent of the subtotal after the discount. 8.5 means 8.5%.

Example:

8.5

memo
string

A note printed on the invoice.

nextReminderAt
string<date-time>

When the next automatic reminder is due to go out.

paidAt
string<date-time>

When the invoice became paid.

voidedAt
string<date-time>

When the invoice was voided.