Inserts or creates an invoice record.
To create an invoice, use the insertInvoice request with an input parameter (data object of type InvoiceCreate) that defines the properties of the invoice to create.
The response to creating an invoice is the unique key value of the new record. The unique key uniquely identifies a record and is used as a parameter in operations like updating and reading records.
Typically when approval rules (workflow) have been created for invoices, there may be scenarios when an approver rejects an invoice and you may resubmit another version of an existing invoice. When you create or update an invoice that has the same number, date, and vendor as an existing rejected invoice, the new or updated invoice will be saved with an auto-incremented version. For example, if the original rejected invoice's version was 1.0 then the resubmitted invoice's version will automatically be set to 1.1. For more information about rejected invoices, see the User Guide section on Invoices.
insertInvoice Parameter Descriptions
Parameter Name |
Data Type |
Description |
invoiceCreate |
Data object |
The following table lists properties from the invoiceCreate data object that must be populated in order to create an invoice. Also note that the same properties must be populated when you are updating an invoice, using the invoiceUpdate data object.
invoiceCreate Required Properties
Property Name |
Data Type |
Description |
numberString |
string |
The invoice number. |
invoiceDate |
date |
The invoice date. For example, the date the invoice was submitted. |
vendorUniqueKey |
string |
The account start date. |
The following table lists properties from the lineItemCreate data object that must be populated in order to create a line item. Although you can create or update an invoice with no line items, this is very impractical. Note that there are different required properties depending on the type of line item you are creating or editing.
Also note that the same properties must be populated when you are updating an invoice, using the invoiceUpdate data object with the lineItemUpdate data object.
lineItemCreate Required Properties
Property Name |
Data Type |
Description |
itemNumber |
int |
Numeric ID that will set the display order of the line item in the application UI. |
serviceDate |
date |
date for the expense or services provided. |
projectUniqueKey |
string |
The unique key of the project associated with this line item. |
categories |
List<category> |
•If the type property is expense, the category should be a line item expense category. •If the type property is fee, the category should be a line item task category. |
type |
lineItemType |
The line item type (EXPENSE or FEE). |
timekeeperUniqueKey |
string |
This property is only required if the type is Fee. Unique key of the timekeeper's contact record. |
activityUniqueKey |
string |
This property is only required if the type is Fee. Tree position of the item from the Activity Item system lookup table to associate with the Fee/Task. |
originalRate |
decimal |
•If the specified type is expense, the unit price for an expense. •If the specified type is fee, the original rate for services rendered. |
originalQuantity |
decimal |
•If the specified type is expense, the number of units for an expense. •If the specified type is fee, the number of hours of a service. |
insertInvoice Response Descriptions
Parameter Name |
Data Type |
Description |
uniqueKey |
string |
The unique key of the newly created invoice record. |
invoiceCreate for more information about the properties you can set for the invoice
lineItemCreate for more information about the properties you can set for line items