Quick Expense v4
The Quick Expense API can be used to create an expense with basic information such as date, amount, and expense type, with or without a receipt image. This expense can be added to an expense report within Concur Expense, allowing the user to provide additional details such as attendees, itemizations etc.
Limitations
Access to this documentation does not provide access to the API. This API is not available in Implementation environments. Endpoints of this API have a shared rate limit of 30 requests per minute per userID
.
Products and Editions
- Concur Expense Professional Edition
- Concur Expense Standard Edition
Scope Usage
Required Scopes:
Name | Description | Endpoint |
---|---|---|
quickexpense.writeonly |
Write quick expense. | POST |
user.read |
Get User Information, necessary for userID . |
POST |
receipts.writeonly |
Required if e-Bunsho is enabled Write quick expense. | POST |
Optional Scope:
Name | Description | Endpoint |
---|---|---|
CONFIG |
Get Expense Configuration information, necessary for expenseTypeId . |
POST |
Dependencies
SAP Concur clients must purchase Concur Expense in order to use this API. This API requires the Identity v4.0 API which is currently only available to approved early access partners. Please contact your SAP Concur representative for more information.
The partner may use the following SAP Concur APIs to get optional information:
- Expense Group Configurations v3.0, to retrieve the
expenseTypeId
Japan Market: If the partner is using this API to provide the e-Bunsho digital timestamp for the receipt, the partner should confirm that the client has e-Bunsho activated in SAP Concur.
Access Token Usage
This API supports both company level and user level access tokens.
Create a Quick Expense
Creates a quick expense without an image.
Scopes
quickexpense.writeonly
- Refer to Scope Usage for full details.
Request
URI
Template
https://{datacenterURI}/quickexpense/v4/users/{userID}/context/{contextType}/quickexpenses
Parameters
Name | Type | Format | Description |
---|---|---|---|
userID |
string |
- | Required The unique identifier of the SAP Concur user. Use Identity v4.0 to retrieve the userID . |
contextType |
string |
- | Required The access level of the SAP Concur user, which determines the form fields they can view/modify. Supported value: TRAVELER. |
Headers
- RFC 7231 Accept-Language
- RFC 7231 Content-Type
- RFC 7235 Authorization - Bearer Token that identifies the caller. This is the Company or User access token.
concur-correlationid
is a Concur specific custom header used for technical support in the form of a RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace
Payload
Response
Status Codes
Headers
concur-correlationid
is a SAP Concur specific custom header used for technical support in the form of a RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace
Payload
Example
Request
curl -X POST \
https://us.api.concursolutions.com/quickexpense/v4/users/184dd31a-f48a-4103-879f-c8d45456c7cd/context/TRAVELER/quickexpenses \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'concur-correlationid: quick-expense-test' \
-d '{
"comment": "Offsite team lunch.",
"expenseTypeId": "BUSML",
"entryDetails": "test-entry",
"location": {
"city": "Bellevue",
"countryCode": "US",
"countrySubDivisionCode": "US-WA",
"id": "",
"name": "Bellevue"
},
"paymentTypeId": "CASHX",
"transactionAmount": {
"currencyCode": "USD",
"value": 88.05
},
"transactionDate": "2019-02-04"
}'
Response
201 Created
{
"quickExpenseIdUri": "https://seapr1qes.concurasp.com/quickexpense/v4/users/184dd31a-f48a-4103-879f-c8d45456c7cd/context/TRAVELER/quickexpenses/E018795D2B09094FBF223E209E921B88"
}
Create a Quick Expense with an Image
Creates a quick expense with an image.
Scopes
quickexpense.writeonly
- Refer to Scope Usage for full details.
receipts.writeonly
- Refer to Scope Usage for full details.
Request
URI
Template
https://{datacenterURI}/quickexpense/v4/users/{userID}/context/{contextType}/quickexpenses/image
Parameters
Name | Type | Format | Description |
---|---|---|---|
userID |
string |
- | Required The unique identifier of the SAP Concur user. Use Identity v4.0 to retrieve the userID . |
contextType |
string |
- | Required The access level of the SAP Concur user, which determines the form fields they can view/modify. Supported values: TRAVELER. |
fileContent |
file |
- | Required The quick expense image. Maximum size 50 MB. Supported image types are: PNG, PDF, TIFF, JPEG |
Headers
- RFC 7231 Accept-Language
- RFC 7231 Content-Type
- RFC 7235 Authorization - Bearer Token that identifies the caller. This is the Company or User access token.
concur-correlationid
is a Concur specific custom header used for technical support in the form of a RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace
Payload
Response
Status Codes
Headers
concur-correlationid
is a SAP Concur specific custom header used for technical support in the form of a RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace
Payload
Example
Request
curl -X POST \
https://us.api.concursolutions.com/quickexpense/v4/users/184dd31a-f48a-4103-879f-c8d45456c7cd/context/TRAVELER/quickexpenses/image \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: multipart/form-data' \
-H 'concur-correlationid: quick-expense-with-image' \
-H 'content-type: multipart/form-data' \
-F fileContent=@/Users/i845500/Pictures/Snip20180410_1.png \
-F 'quickExpenseRequest={
"comment": "Offsite team lunch.",
"expenseTypeId": "BUSML",
"entryDetails": "test-entry",
"location": {
"city": "Bellevue",
"countryCode": "US",
"countrySubDivisionCode": "US-WA",
"id": "",
"name": ""
},
"paymentTypeId": "CASHX",
"transactionAmount": {
"currencyCode": "USD",
"value": 88.05
},
"transactionDate": "2019-02-04"
}'
Response
201 Created
{
"quickExpenseIdUri": "https://seapr1qes.concurasp.com/quickexpense/v4/users/184dd31a-f48a-4103-879f-c8d45456c7cd/context/TRAVELER/quickexpenses/A0D1CE97B4692B4F8E29BEA53B250E36"
}
Schema
Quick Expense Request
Name | Type | Format | Description |
---|---|---|---|
comment |
string |
- | This is a comment attached to the quick expense. |
entryDetails |
string |
- | The quick expense entry details. |
expenseTypeId |
string |
- | Required This is the expense type id of quick expense. Use Expense Group Configurations v3.0 to retrieve the supported expense types. Supported values for a null value are: UNDEF , NULL . NULL can only be used on a POST operation and will be converted to UNDEF . |
location |
- | Location | The location where the quick expense occurred. |
paymentTypeId |
string |
- | This is the payment type id of quick expense. Supported values: CASHX , CPAID , PENDC . |
transactionAmount |
- | Amount | Required The amount of the quick expense. |
transactionDate |
string |
YYYY-MM-DD | Required This is the transaction date of the quick expense. |
vendor |
string |
- | The name of the vendor. |
Location
Name | Type | Format | Description |
---|---|---|---|
city |
string |
- | The location city. |
countryCode |
string |
- | The location country ISO 3166-1 code. |
countrySubDivisionCode |
string |
- | The location country sub division ISO 3166-2 code. |
id |
string |
- | The unique identifier of the location. |
name |
string |
- | The location name. |
When a quick expense is processed to be an available expense (or expense entry added to a report) in Concur Expense, the location will be normalized to be a valid value, searched by following order with the first match:
- If in NextGen UI
- id (if a valid V4 UUID present)
- combination of city, countrySibDivsion, country (if all present and non-blank)
- fuzzy search by name
- If not in NextGen UI
- search by name
Amount
Name | Type | Format | Description |
---|---|---|---|
currencyCode |
string |
- | Required The 3-letter ISO 4217 currency code. |
value |
number |
- | Required The amount value. |
Quick Expense Response
Name | Type | Format | Description |
---|---|---|---|
quickExpenseIdUri |
string |
- | The quick expense created resource url. |
Error
Name | Type | Format | Description |
---|---|---|---|
errorId |
string |
- | The unique identifier of the error. |
errorMessage |
string |
- | Required Message associated with the error. |
httpStatus |
string |
- | The HTTP status associated with the error. |
path |
string |
- | The path to the resource. |
timestamp |
string |
- | The timestamp for the error. |
validationErrors |
array |
validationErrors | An array of validation errors. |
Validation Errors
Name | Type | Format | Description |
---|---|---|---|
message |
string |
- | The validation error message. |
source |
string |
- | The source of the validation error. |