Skip to main content
POST
Link Existing Invoice To Contract

Path Parameters

id
integer
required

Body

invoice
integer
required

Response

201 - application/json

Base serializer that injects the request user's customer on create and restricts related-object querysets to the same customer.

id
integer
required
read-only
contract
integer
required
read-only
contract_name
string
required
read-only
contract_number
string
required
read-only
entity
integer
required
read-only
entity_name
string
default:""
required
read-only
client
integer
required
read-only
client_name
string
default:""
required
read-only
invoice
integer
required
read-only
journal_entry
integer
required
read-only
journal_entry_number
string
required
read-only
issue_date
string<date>
required
tax_rate_name
string
default:""
required
read-only
anrok_connection_name
string
default:""
required
read-only
avalara_connection_name
string
default:""
required
read-only
sphere_connection_name
string
default:""
required
read-only
stripe_connection_name
string
default:""
required
read-only
subtotal
number<double>
required
read-only
Required range: -10000000000000 < x < 10000000000000
is_linked
boolean
required
read-only

Created by attaching an existing AR invoice to the contract rather than by issuing a billing-schedule row. The AR invoice is the source of truth: this row mirrors it, and deleting the AR invoice removes the row instead of returning it to Draft.

needs_live_date_fx_recalc
boolean
required
read-only

Set when Create All Now issued this row before its invoice date in a currency other than the entity book currency. Cleared after FX is recalculated on the invoice date.

lines
object[]
required
read-only
created_at
string<date-time>
required
read-only
last_modified_at
string<date-time>
required
read-only
ordinal
integer
Required range: 0 <= x <= 2147483647
invoice_number
string
Maximum string length: 255
status
enum<string>
  • DRAFT - Draft
  • SCHEDULED - Scheduled
  • OPEN - Open
  • SENT - Sent
  • PAID - Paid
  • VOIDED - Voided
Available options:
DRAFT,
SCHEDULED,
OPEN,
SENT,
PAID,
VOIDED
accounting_date
string<date> | null

Accounting date used as the issued AR invoice date; defaults to the issue date.

due_date
string<date> | null
payment_term
integer | null

Terms behind the due date; None means due on receipt or a manually set date.

bill_to_snapshot
any
currency
string
Maximum string length: 3
purchase_order_number
string | null
Maximum string length: 120
period_start
string<date> | null
period_end
string<date> | null
shipping_date
string<date> | null
location_of_sale
string | null
vat_number
string | null
Maximum string length: 250
billing_address
string | null
billing_addressee
string | null
Maximum string length: 255
shipping_address
string | null
shipping_addressee
string | null
Maximum string length: 255
message_on_invoice
string | null
tax_rate
integer | null
anrok_connection
integer | null

Draft override for Anrok. Null inherits the entity's tax connector at issuance.

avalara_connection
integer | null

Draft override for Avalara. Null inherits the entity's tax connector at issuance.

sphere_connection
integer | null

Draft override for Sphere. Null inherits the entity's tax connector at issuance.

stripe_connection
integer | null

Draft override for Stripe. Null inherits the contract's Stripe connection.

use_stripe_auto_bill
boolean | null

Draft override for Stripe auto-bill. Null inherits the contract setting.

discount
number<double>

This invoice's prorated share of the contract-wide discount.

Required range: -10000000000000 < x < 10000000000000
total_amount
number<double>
Required range: -10000000000000 < x < 10000000000000