Invoice

From API Documentation

Jump to: navigation, search

This object provides needed information about the customer's account for an invoice, including payment terms, payment type, and due date.

Supported Calls

This object is used in the generate, update, and query calls.

Fields

In addition to the following fields, zObject contributes additional fields. For information on the field types, see Field Types.

Name Required? Type Allowed Operations:
● Yes
○ No
Allowable Values Description
AccountID Yes zns:ID ● Create

● Query
○ Update
● Delete
● Filter

A valid account number The customer account ID.
AdjustmentAmount System generated Decimal ○ Create

● Query
○ Update
○ Delete
● Filter

Valid currency amount of an adjustment. Available in version 20.0. The amount of adjustments applied to the invoice.
Amount Yes. System generated. double (v1.0-18.0) / decimal (v19.0+) ○ Create

● Query
○ Update
○ Delete
● Filter

A valid currency amount The amount of the invoice.
AmountWithoutTax No. Only available for Z-Taxation customers. System generated. double (v1.0-18.0) / decimal (v19.0+) ○ Create

● Query
○ Update
○ Delete
● Filter

A valid currency amount The total of the invoice before any taxes have been applied.
Balance Yes. System generated. double (v1.0-18.0) / decimal (v19.0+) ○ Create

● Query
○ Update
○ Delete
● Filter

A valid currency amount The balance due on the invoice after the Amount is applied.
Body No string ○ Create

● Query
○ Update
○ Delete
○ Filter

A Base64-encoded PDF The body can be a PDF file. You can only query one invoice at a time if querying on the Body field. You cannot filter on Body. For that reason, if you query on Body, you must also query and filter on ID (inherited from zObject).
Comments No String ○ Create

● Query
○ Update
○ Delete
● Filter

255 characters Available in version 20.0. Any comments added to the invoice.
CreatedBy System generated, always exists. ID A valid user ID. 32 characters maximum. DEPRECATED AS OF VERSION 20.0 (REPLACED WITH CreatedById). The ID of the user who created the invoice. If the invoice was generated by a bill run, it is the ID of the user who created the billrun.
CreatedById System generated, always exists. ID ○ Create

● Query
○ Update
○ Delete
● Filter

A valid user ID Available as of version 20.0, replaces CreatedBy. The ID of the user who created the invoice. If the invoice was generated by a bill run, it is the ID of the user who created the billrun.
CreatedDate System generated, always exists. dateTime ○ Create

● Query
○ Update
○ Delete
● Filter

A valid dateTime value The date when the invoice was generated.
DueDate Yes dateTime ○ Create

● Query
○ Update
○ Delete
● Filter

A valid dateTime value The date by which the payment for this invoice is due.
IncludesOneTime No. Only used with generate(), and is optional. boolean ● Create

● Query
○ Update
● Delete
● Filter

True/False. The default value is True. Available in release 11.0+. Used only with generate() call for invoices, and is not queryable. Specifies whether the invoice generated with generate() includes one time charges. Defaults to true if omitted.
IncludesRecurring No. Only used with generate(), and is optional. boolean ● Create

● Query
○ Update
● Delete
● Filter

True/False. The default value is True. Available in release 11.0+. Used only with generate() call for invoices, and is not queryable. Specifies whether the invoice generated with generate() includes recurring charges. Defaults to true if omitted.
IncludesUsage No. Only used with generate(), and is optional. boolean ● Create

● Query
○ Update
● Delete
● Filter

True/False. The default value is True. Available in release 11.0+. Used only with generate() call for invoices, and is not queryable. Specifies whether the invoice generated with generate() includes usage charges. Defaults to true if omitted.
InvoiceDate Yes dateTime ● Create

● Query
○ Update
● Delete
● Filter

A valid dateTime value The date on which the invoice is being generated.
InvoiceNumber Yes sequence ○ Create

● Query
○ Update
○ Delete
● Filter

This is automatically generated. 255 characters maximum. A unique identification number for this invoice; returned as a string.
LastEmailSentDate System generated. dateTime ○ Create

● Query
○ Update
○ Delete
● Filter

A valid dateTime value The date when the invoice was last emailed.
PaymentAmount System generated Decimal ○ Create

● Query
○ Update
○ Delete
● Filter

Available in version 20.0. The amount of payments applied to the invoice
PostedBy System generated. ID ○ Create

● Query
○ Update
○ Delete
● Filter

A valid user ID The ID of the user who created the invoice. If the invoice was generated by a bill run, it is the ID of the user who created the billrun.
PostedDate System generated. dateTime ○ Create

● Query
○ Update
○ Delete
● Filter

A valid dateTime value The date when the invoice was posted.
RefundAmount No, read-only field (system generated). Only exists when a payment that had been applied to an invoice is later refunded. Decimal ○ Create

● Query
○ Update
○ Delete
● Filter

A valid currency value Specifies the amount of a refund that had been applied against a payment that had been applied to the invoice earlier.

EXAMPLE: An invoice is generated for $1000, an $800 payment is applied, and then $300 is refunded (of the $800 payment). In this example, the amount of the invoice (Invoice.Amount) is $1000, the balance (Invoice.Balance) is $500 (= $1000-$800+$300), refund amount (Invoice.RefundAmount) is $300, and the payment amount (Invoice.PaymentAmount) is $800.

The general formula is Amount - Payments + Adjustments - Applied Credit Balance = Balance.

Status Yes string (enum) ○ Create

● Query
● Update
○ Delete
● Filter

Canceled, Draft, Error, Posted The status of the invoice. These statuses are determined by the system.
TargetDate Yes dateTime ● Create

● Query
○ Update
○ Delete
● Filter

A valid dateTime value The invoice is generated as of this date.
TaxAmount No. System generated, read only Decimal ○ Create

● Query
○ Update
○ Delete
● Filter

Valid currency amount Available in version 20.0. The amount of taxes applied to the invoice. Only available to Z-Tax customers.
TaxExemptAmount No. System generated, read only Decimal ○ Create

● Query
○ Update
○ Delete
● Filter

Valid currency amount Available in version 20.0. The amount of the invoice that is exempt from taxes. Only available to Z-Tax customers.
TransferredToAccounting No String ○ Create

● Query
● Update
○ Delete
● Filter

Processing, Yes, Error, Ignore Available in version 26.0 and greater. Specifies whether or not the object has been transferred to an external accounting system. Used for integrations with accounting systems such as NetSuite.
UpdatedBy System generated. ID ○ Create

● Query
○ Update
○ Delete
● Filter

A valid user ID. 32 characters maximum. The ID of the user who last updated the invoice.
UpdatedDate System generated. dateTime ○ Create

● Query
○ Update
○ Delete
● Filter

A valid dateTime value The date when the invoice was last updated.