ExpenseItems
This entity describes a line item associated with an Expense Report entity. It allows expense line items to be created, queried, and updated through the API.
In Autotask, Expense Items can be added to an Expense Report from the Timesheets or Home modules, or a ticket, project, or task.
NOTE You can refer to the Online Help to find root and child access URLs of the entity you wish to query. Refer to Finding resource and child access URLs of REST API entities for more information.
Entity details
Entity Name: | ExpenseItems |
Entity Path: |
/atservicesrest/v1.0/ExpenseItems |
Can Create: | |
Can Update: | |
Can Query: | |
Can Delete: | |
Can Have UDFs: |
Fields that cannot be queried
The following fields from this entity will return an error when queried.
- gLCode
- isReimbursable
- isRejected
Conditions and requirements
General
- Create and update are allowed only when the associated ExpenseReport has a Status = In Progress or isRejected.
- To create, update, delete, and query the ExpenseItems entity, the API user must have the corresponding object-level system security permissions for Expenses.
- The visibility of charges and expenses is controlled by the object permissions of the co-managed help desk security level. The API user's ability to interact with the entity is determined by these settings.
Special field attributes
Field | Conditions and Requirements |
---|---|
companyID |
When a ticketID or projectID are set, the companyID is calculated based on the ticket or project. If you set an companyID that differs from the calculated companyID, an error is returned. When a taskID is set, the companyID and projectID are calculated based on the task and associated project. If you set an companyID or projectID that differs from the calculated companyID and Project ID, an error is returned. If no companyID is supplied, the expense is associated to the "0" account. |
currencyID | If no currencyID is specified, the ExpenseItem will use the Currency associated with the Company associated with ExpenseItem.companyID. |
destination, origin, and miles | destination, origin, and miles are all required when Category = Mileage |
entertainmentLocation | entertainmentLocation is required when Category = Entertainement Expense |
internalCurrencyExpenseAmount | internalCurrencyExpenseAmount represents the internal currency value of the expenseCurrencyExpenseAmount. |
internalCurrencyExpenseAmount, expenseCurrencyExpenseAmount |
Neither internalCurrencyExpenseAmount or expenseCurrencyExpenseAmount is required. The following conditions apply for single currency databases (multi-currency is not enabled):
The following conditions apply for multi-currency databases:
|
expenseCategory |
An inactive expenseCategory cannot be specified when creating an ExpenseItem or updating the expenseCategory field. An ExpenseItem with an inactive expenseCategory can be updated. PaymentCategory options are configurable in the Autotask Admin module. Use REST API GET call to retrieve the list for a specific implementation. |
expenseReportID | If Organizational Structure is enabled in Autotask, access to Expense Items is subject to the user's Organizational Structure Line of Business assignments and the Line of Business associated with ExpenseItem.expenseReportID, if any. |
paymentType |
paymentType picklist options = American Express, Cash, Company Check, Company Credit Card, Mastercard, Other, Personal Check, Visa. These picklist options are not configurable. isReimbursable status is updated from the corresponding attribute of the current paymentType every time the ExpenseItem entity is touched. |
expenseCurrencyExpenseAmount |
expenseCurrencyExpenseAmount specifies the amount of the expense in the currency it was received. internalCurrencyExpenseAmount now represents the internal currency value of the expenseCurrencyExpenseAmount. If no expenseCurrencyExpenseAmount is specified for the ExpenseItem, the field will be populated by the amount equal to internalCurrencyExpenseAmount divided by the exchangeRate of the specified currency (expenseCurrencyID). |
internalCurrencyReimbursementAmount |
internalCurrencyReimbursementAmount = the reimbursement amount for this expense in the internal currency. This field impacts databases with multi-currency enabled. If this value is not supplied on creation of an ExpenseItem, the field will be populated with the internalCurrencyExpenseAmount value (the expense amount of the expense in the internal currency). If ExpenseItem.paymentType is not reimbursable, this value will be 0 and cannot be updated. |
reimbursementCurrencyReimbursementAmount |
reimbursementCurrencyReimbursementAmount = the reimbursement amount for this expense in the reimbursement currency of ExpenseItem.expenseReportID (the expense's expense report.) This field impacts databases with multi-currency enabled.
|
workType | workType picklist options are configurable in the Autotask Admin module. Use REST API GET call to retrieve the list for a specific implementation. |
Field definitions
The following table describes the standard Autotask fields for this entity. Refer to the following articles for more information about working with these fields:
- The entityInformation REST API call
- Making basic query calls to the REST API
- Advanced query features of the REST API
To learn how to query picklist endpoints, refer to Understanding picklists.
Notes
- For string datatypes, the number in parentheses ( ) indicates the maximum number of characters allowed.
- LT indicates Local Term.
- If this entity has child collections, they will appear in a Child collection access URLs or an Entity URLs and relationships drop-down in the Entity details section of this article.
- You can call the /query/count/ endpoint of a resource to determine how many records a collection holds.
Field Name | Datatype | Read-Only | Is Required | Reference Name | Picklist |
---|---|---|---|---|---|
companyID | integer | Companies | |||
description | string (128) | ||||
destination | string (128) | See Conditions | |||
entertainmentLocation | string (128) | See Conditions | |||
expenseCategory | integer | ||||
expenseCurrencyExpenseAmount | decimal | ||||
expenseCurrencyID | integer | Currencies | |||
expenseDate | datetime | ||||
expenseReportID | integer | ExpenseReports | |||
gLCode | String(20) | ||||
haveReceipt | boolean | ||||
id | long | ||||
internalCurrencyExpenseAmount | decimal | ||||
internalCurrencyReimbursementAmount | decimal | ||||
isBillableToCompany | boolean | ||||
isReimbursable | boolean | ||||
isRejected | boolean | ||||
miles | decimal | See Conditions | |||
odometerEnd | decimal | ||||
odometerStart | decimal | ||||
origin | string (128) | See Conditions | |||
paymentType | integer | ||||
projectID | integer | Projects | |||
purchaseOrderNumber | string (50) | ||||
reimbursementCurrencyReimbursementAmount | decimal | ||||
taskID | integer | Tasks | |||
ticketID | integer | Tickets | |||
workType | integer |