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):

  • If a value for internalCurrencyExpenseAmount or expenseCurrencyExpenseAmount (not both) is provided, the value for both is set to the value provided.
  • If values for both internalCurrencyExpenseAmount and expenseCurrencyExpenseAmount are provided, the value for expenseCurrencyExpenseAmount is used and internalCurrencyExpenseAmount is updated to equal expenseCurrencyExpenseAmount.
  • If no value is provided for either, then the fields remain without value.

The following conditions apply for multi-currency databases:

  • On create, expenseCurrencyExpenseAmount is required when no value is provided, or if only the internalCurrencyExpenseAmount value is provided. When values are provided for both internalCurrencyExpenseAmount and expenseCurrencyExpenseAmount, expenseCurrencyExpenseAmount is used and internalCurrencyExpenseAmount is updated to equal expenseCurrencyExpenseAmount.
  • On update, the expenseCurrencyExpenseAmount value always populates both fields. If only internalCurrencyExpenseAmount is provided, neither field is updated.

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.

  • If this value is not supplied on creation of an ExpenseItem, the field will be populated by dividing the internalCurrencyExpenseAmount by the exchangeRate of the ReimbursementCurrency associated with the ExpenseItem's ExpenseReport. If the ExpenseItem.paymentType is not reimbursable, this value will be 0 and cannot be updated.
  • If this value is edited, the internalCurrencyReimbursementAmount will be recalculated by multiplying the new value by the exchangeRate of the ReimbursementCurrency associated with the ExpenseItem's ExpenseReport.
  • If both values are supplied or edited at the same time, we will take the internalCurrencyReimbursementAmount as the correct one and calculate the reimbursementCurrencyReimbursementAmount. The supplied reimbursementCurrencyReimbursementAmount will be discarded.
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

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      

Additional resources