InvoiceModel

An Invoice represents a bill sent from one company to another. The creator of the invoice is identified
by the CompanyId field, and the recipient of the invoice is identified by the CustomerId field. Most
invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was
generated by the system that originated the invoice. Invoices have a total amount and a due date, and when
some payments have been made on the Invoice the TotalAmount and the OutstandingBalanceAmount may be
different.

Methods

Fields

groupKey

uuid, read-only

The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
account will share the same GroupKey value. GroupKey values cannot be changed once created.

For more information, see Accounts and GroupKeys.

invoiceId

uuid, read-only

The unique ID of this record, automatically assigned by Lockstep when this record is
added to the Lockstep platform.

For the ID of this record in its originating financial system, see ErpKey.

companyId

uuid

The ID number of the company that created this invoice.

customerId

uuid

The ID number of the counterparty for the invoice, for example, a customer or vendor.

erpKey

string, nullable, 0-100 characters

The unique ID of this record as it was known in its originating financial system.

If this company record was imported from a financial system, it will have the value ErpKey
set to the original primary key number of the record as it was known in the originating financial
system. If this record was not imported, this value will be null.

For more information, see Identity Columns.

purchaseOrderCode

string, nullable, 0-100 characters

The purchase order code as it exists in the user's ERP or accounting system.

referenceCode

string, nullable, 0-100 characters

An additional reference code that is sometimes used to identify this invoice.
The meaning of this field is specific to the ERP or accounting system used by the user.

salespersonCode

string, nullable, 0-50 characters

A code identifying the salesperson responsible for writing this quote, invoice, or order.

salespersonName

string, nullable, 0-50 characters

A string identifying the salesperson responsible for writing this quote, invoice, or order.

invoiceTypeCode

string, nullable, 0-50 characters

A code identifying the type of this invoice.

invoiceStatusCode

string, nullable, 0-50 characters

A code identifying the status of this invoice.

termsCode

string, nullable, 0-50 characters

A code identifying the terms given to the purchaser.

specialTerms

string, nullable, 0-200 characters

If the customer negotiated any special terms different from the standard terms above, describe them here.

currencyCode

string, nullable, 0-3 characters

The three-character ISO 4217 currency code used for this invoice.

totalAmount

double, nullable

The total value of this invoice, inclusive of all taxes and line items.

salesTaxAmount

double, nullable

The total sales (or transactional) tax calculated for this invoice.

discountAmount

double, nullable

The total discounts given by the seller to the buyer on this invoice.

outstandingBalanceAmount

double, nullable

The remaining balance value of this invoice.

invoiceDate

date, nullable

The reporting date for this invoice.

discountDate

date, nullable

The date when discounts were adjusted for this invoice.

postedDate

date, nullable

The date when this invoice posted to the company's general ledger.

invoiceClosedDate

date, nullable

The date when the invoice was closed and finalized after completion of all payments and delivery of all products and
services.

paymentDueDate

date, nullable

The date when the remaining outstanding balance is due.

importedDate

date-time, nullable

The date and time when this record was imported from the user's ERP or accounting system.

primaryOriginAddressId

uuid, nullable

The ID number of the invoice's origination address

primaryBillToAddressId

uuid, nullable

The ID number of the invoice's bill-to address

primaryShipToAddressId

uuid, nullable

The ID number of the invoice's ship-to address

created

date-time, nullable, read-only

The date on which this address record was created.

createdUserId

uuid, nullable, read-only

The ID number of the user who created this address.

modified

date-time, nullable, read-only

The date on which this address record was last modified.

modifiedUserId

uuid, nullable, read-only

The ID number of the user who most recently modified this address.

appEnrollmentId

uuid, nullable, read-only

AppEnrollmentId for this record; used for mapping purposes.

isVoided

boolean

Is the invoice voided?

inDispute

boolean

Is the invoice in dispute?

excludeFromAging

boolean

Should the invoice be excluded from aging calculations?

addresses

InvoiceAddressModel[], nullable

All addresses connected to this invoice.
To retrieve this collection, specify Addresses in the "Include" parameter for your query.

lines

InvoiceLineModel[], nullable

All lines attached to this invoice.
To retrieve this collection, specify Lines in the "Include" parameter for your query.

payments

InvoicePaymentDetailModel[], nullable, read-only

All payments attached to this invoice, the amount of the payment applied to this Invoice, and the date the Payment was applied.
To retrieve this collection, specify Payments in the "Include" parameter for your query.

notes

NoteModel[], nullable, read-only

All notes attached to this invoice.
To retrieve this collection, specify Notes in the "Include" parameter for your query.

attachments

AttachmentModel[], nullable, read-only

All attachments attached to this invoice.
To retrieve this collection, specify Attachments in the "Include" parameter for your query.

company

CompanyModel, nullable, read-only

The Company associated to this invoice.
To retrieve this item, specify Company in the "Include" parameter for your query.

customer

CompanyModel, nullable, read-only

The Customer associated to the invoice customer
To retrieve this item, specify Customer in the "Include" parameter for your query.

customerPrimaryContact

ContactModel, nullable, read-only

The Contact associated to the invoice customer
To retrieve this item, specify Customer in the "Include" parameter for your query.

creditMemos

CreditMemoInvoiceModel[], nullable, read-only

The credit memos associated to this invoice.
To retrieve this item, specify CreditMemos in the "Include" parameter for your query.

customFieldValues

CustomFieldValueModel[], nullable, read-only

All custom field values associated with this invoice
To retrieve this item, specify CustomFieldValues in the "Include" parameter for your query.

customFieldDefinitions

CustomFieldDefinitionModel[], nullable, read-only

All custom field definitions


Did this page help you?