This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Expense Entries in Concur
Overview
The following operations allow you to work with expense entries. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with expense entries, see Sample configuration.
Operation | Description |
---|---|
Creates a new expense entry. | |
deleteExpenseEntry | Deletes an expense entry. |
getAllExpenseEntries | Returns all expense entries. |
getExpenseEntry | Returns a single expense entry. |
Operation details
This section provides details on each of the operations.
 Creating a new expense entry
The createExpenseEntry operation allows you to create a new expense entry.
<concur.createExpenseEntry> <entry>{$ctx:entry}</entry> <contentType>{$ctx:contentType}</contentType> <user>{$ctx:user}</user> </concur.createExpenseEntry>
Properties
entry:
 Required - The object that is used for creating the entry. Following are the mandatory fields to include in theentry
object:
Required -Â The code for the expense type.ÂExpenseTypeCode:
ÂReportId:
Required - The ID of the report where the entry will be added.
Required - Date on which the expense entry was made. Format: YYYY-MM-DDTransactionDate:
ÂJourney
Required -Â Refers to the location where the journey ended. This is also known as the "To Location". Max length: 100.EndLocation:
Â
Required -Â Refers to the location where the journey started. This is also known as the "From Location". Max length: 100.StartLocation:
Â
Required -Â Unit of measure for distance and odometer values: M for miles or K for kilometers.UnitOfMeasure:
Â
contentType:
 Content Type value for the Content-Type header field.Âuser:
 Optional - The login ID of the user. The access token owner must have the Web Services Admin (Professional) or Can Administer (Standard) user role to use this parameter.
Sample request
Following is a sample REST/XML request that can be handled by the createExpenseEntry
 operation.
<createExpenseEntry> <accessToken>hnfdT+hNb/sV4Rl6+cRwdfgyoIDhA8=</accessToken> <apiUrl>https://www.concursolutions.com </apiUrl> <contentType>application/xml</contentType> <user>user@gmail.com</user> <entry> <Comment>Sample</Comment> <Description>User1 User2</Description> <ExchangeRate>1.0</ExchangeRate> <ExpenseTypeCode>AIRFE</ExpenseTypeCode> <IsBillable>false</IsBillable> <IsPersonal>false</IsPersonal> <Journey> <BusinessDistance></BusinessDistance> <EndLocation>BBBBBBB</EndLocation> <NumberOfPassengers></NumberOfPassengers> <OdometerEnd></OdometerEnd> <OdometerStart></OdometerStart> <PersonalDistance></PersonalDistance> <StartLocation>AAAAAAA</StartLocation> <UnitOfMeasure>K</UnitOfMeasure> <VehicleID></VehicleID> </Journey> <LocationID>nzTbT6caRcqxzp$srvCdBOVGEwTG1J4Weht</LocationID> <PaymentTypeID>n$pP8QhL$pEKtgefddR1q7RIyOZlwYpk</PaymentTypeID> <ReportID>167F315DA7EB4sB2881E6</ReportID> <TaxReceiptType>T</TaxReceiptType> <TransactionAmount>20</TransactionAmount> <TransactionCurrencyCode>CAD</TransactionCurrencyCode> <TransactionDate>2014-01-01</TransactionDate> <VendorDescription>TestDescription</VendorDescription> <VendorListItemID></VendorListItemID> </entry> </createExpenseEntry>
Note:Â If you send the request with blank or invalid data, it returns the 400 HTTP error code.
Related Concur documentation
https://www.concursolutions.com/api/docs/index.html#!/Entries/Post_content_user_post_2
 Deleting an expense entry
The deleteExpenseEntry
operation deletes a specified expense entry.
<concur.deleteExpenseEntry> <id>{$ctx:id}</id> <user>{$ctx:user}</user> </concur.deleteExpenseEntry>
Properties
id:
 Required - ID of the expense entry to be deleted.Âuser:
 Optional - The login ID of the user. The access token owner must have the Web Services Admin (Professional) or Can Administer (Standard) user role to use this parameter.
Sample request
Following is a sample REST/XML request that can be handled by the deleteExpenseEntry
 operation.
<deleteExpenseEntry> <accessToken>hnfdT+hNb/sV4Rl6fg+cRwyoIDhA8=</accessToken> <apiUrl>https://www.concursolutions.com</apiUrl> <contentType>application/xml</contentType> <user>user@gmail.com</user> <id>n63EB66fq4gT$p$p$fgpLwfWqg$st$pAlKn0hkbi</id> </deleteExpenseEntry>
Related Concur documentation
https://www.concursolutions.com/api/docs/index.html#!/Entries/Delete_id_user_delete_3
Returning all expense entries
The getAllExpenseEntries
operation returns all expense entries owned by a user.Â
<concur.getAllExpenseEntries> <limit>{$ctx:limit}</limit> <hasAttendees>{$ctx:hasAttendees}</hasAttendees> <isBillable>{$ctx:isBillable}</isBillable> <attendeeTypeCode>{$ctx:attendeeTypeCode}</attendeeTypeCode> <batchID>{$ctx:batchID}</batchID> <paymentTypeID>{$ctx:paymentTypeID}</paymentTypeID> <hasVAT>{$ctx:hasVAT}</hasVAT> <offset>{$ctx:offset}</offset> <user>{$ctx:user}</user> <expenseTypeCode>{$ctx:expenseTypeCode}</expenseTypeCode> <reportID>{$ctx:reportID}</reportID> </concur.getAllExpenseEntries>
Properties
limit:
 Number of records to be returned (default is 25).hasAttendees:
 Gets information for expense entries that have attendees.isBillable:
 Gets information for billable expense entries.attendeeTypeCode:
 Gets information for expense entries that have attendees of the specified type.batchID:
 Gets information for expense entries that are part of a report payee that is in the specified batch ID. Use the GET Payment Batch function to learn the batch ID for the desired payment batch.paymentTypeID:
 Gets information for expense entries with the specified payment type ID. Use the GET Expense Group Configurations function to learn the payment type ID for the desired payment type.hasVAT:
 Gets information for expense entries that have VAT details.offset:
 Starting page offset.user:
 Optional - The login ID of the user. The access token owner must have the Web Services Admin (Professional) or Can Administer (Standard) user role to use this parameter.expenseTypeCode:
 Gets information for expense entries that have a specified expense type code.ÂreportID:
 Gets information for the specified report ID. Use the GET Expense Report Digests function to learn the valid report ID. Format: text, alpha-numeric GUID
Sample request
Following is a sample REST/XML request that can be handled by the getAllExpenseEntries
 operation.
<getAllExpenseEntries> <accessToken>hnfdT+hNb/sV4Rl6gfh+cRwyoIDhA8=</accessToken> <apiUrl>https://www.concursolutions.com</apiUrl> <contentType>application/xml</contentType> <user></user> <limit>20</limit> <hasAttendees></hasAttendees> <isBillable></isBillable> <attendeeTypeCode></attendeeTypeCode> <batchID></batchID> <paymentTypeID></paymentTypeID> <hasVAT></hasVAT> <offset></offset> <expenseTypeCode>SUBWY</expenseTypeCode> <reportID>167F315DA7EB4B288g1E6</reportID> </getAllExpenseEntries>
Related Concur documentation
 Returning an expense entry
The getExpenseEntry
operation returns the expense entry with the specified ID.
<concur.getExpenseEntry> <id>{$ctx:id}</id> <user>{$ctx:user}</user> </concur.getExpenseEntry>
Properties
id:
 Required - Refers to the ID of the expense entry.user:
 Optional - The login ID of the user. The access token owner must have the Web Services Admin (Professional) or Can Administer (Standard) user role to use this parameter.
Sample request
Following is a sample REST/XML request that can be handled by the getExpenseEntry
 operation.
<getExpenseEntry> <accessToken>hnfdT+hNb/sV4Rl6+cdfRwyoIDhA8=</accessToken> <apiUrl>https://www.concursolutions.com</apiUrl> <contentType>application/xml</contentType> <id>n63EB6tTo4APBpTQsfdffkfsV5g$pjzUcx$pY</id> <user>user@gmail.com</user> </getExpenseEntry>Â
Related Concur documentation
https://www.concursolutions.com/api/docs/index.html#!/Entries/Get_id_user_get_1
Sample configuration
Following is a sample proxy service that illustrates how to connect to Concur with the init
operation and use the createExpenseEntry
 operation. The sample request for this proxy can be found in createExpenseEntry sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="concur_createExpenseEntry" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="accessToken" expression="//accessToken/text()"/> <property name="apiUrl" expression="//apiUrl/text()"/> <property name="contentType" expression="//contentType/text()"/> <property name="entry" expression="//entry"/> <property name="contentType" expression="//contentType/text()"/> <property name="user" expression="//user/text()"/> <concur.init> <accessToken>{$ctx:accessToken}</accessToken> <apiUrl>{$ctx:apiUrl}</apiUrl> <contentType>{$ctx:contentType}</contentType> </concur.init> <concur.createExpenseEntry> <entry>{$ctx:entry}</entry> <contentType>{$ctx:contentType}</contentType> <user>{$ctx:user}</user> </concur.createExpenseEntry> <filter xpath="get-property('contentType') != 'application/json'"> <then> <property name="uri.var.errorMessage" expression="json-eval($.Error.Message)"/> </then> <else> <property name="uri.var.errorMessage" expression="json-eval($.Message)"/> </else> </filter> <filter source="$axis2:HTTP_SC" regex="^[^2][0-9][0-9]"> <then> <switch source="$axis2:HTTP_SC"> <case regex="400"> <property name="ERROR_CODE" value="600400"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </case> <case regex="401"> <property name="ERROR_CODE" value="600401"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </case> <case regex="404"> <property name="ERROR_CODE" value="600404"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </case> <case regex="403"> <property name="ERROR_CODE" value="600403"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </case> <case regex="400"> <property name="ERROR_CODE" value="600400"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </case> <case regex="500"> <property name="ERROR_CODE" value="600500"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </case> <default> <property name="ERROR_CODE" expression="$axis2:HTTP_SC"/> <property name="ERROR_MESSAGE" expression="get-property('uri.var.errorMessage')"/> </default> </switch> <sequence key="faultHandlerSeq"/> </then> </filter> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>