Workflows v4
The Workflows v4 APIs are used to Approve or Send Back or Recall an expense report that is in the workflow. These APIs are used only for normal approval steps and not for Cost Object Approval steps.
Prior Versions
- Report Workflow Action v1.1 documentation is available here.
Limitations
These APIs are only available to partners who have been granted access by SAP Concur. Access to this documentation does not provide access to the APIs.
Products and Editions
- Concur Expense Professional Edition
- Concur Expense Standard Edition
Scope Usage
Required Scope:
Name | Description | Endpoint |
---|---|---|
expense.report.workflowstatus.write |
Approve or Send Back or Recall the Report in the workflow | PATCH |
Dependencies
SAP Concur clients must purchase Concur Expense in order to use this API. These APIs requires the identity v4 API which is currently only available to approved early access partners. Please contact your SAP Concur representative for more information.
Access Token Usage
Approve and Send Back short URL (i.e. with no userId and contextType) APIs supports company level access token. Approve, Send Back and Recall long URL (i.e. with userId and contextType) APIs supports user level access token.
Approve or Send Back or Recall a Report
- The Approve function advances the specified report to the next step (use short URL Approve API if the report is in a system step).
- The Send Back function sends back the specified report to report owner.
- The Recall function moves the specified report to an unsubmitted state.
Scopes
expense.report.workflowstatus.write
- Refer to Scope Usage for full details.
Request
URI Template
https://{datacenterURI}/expensereports/v4/reports/{reportId}/approve
https://{datacenterURI}/expensereports/v4/reports/{reportId}/sendBack
https://{datacenterURI}/expensereports/v4/users/{userID}/context/{contextType}/reports/{reportId}/approve
https://{datacenterURI}/expensereports/v4/users/{userID}/context/{contextType}/reports/{reportId}/sendBack
https://{datacenterURI}/expensereports/v4/users/{userID}/context/{contextType}/reports/{reportId}/recall
Parameters
Name | Type | Format | Description |
---|---|---|---|
userId |
string |
- | Required The unique identifier of the SAP Concur user. Use Identity v4 API 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 for Recall API: TRAVELER , PROXY . Supported value for Approve and Send Back API: MANAGER |
reportId |
string |
- | Required The unique identifier of the report that is being approved or sent back or recalled. |
Headers
- RFC 7231 Accept-Language
- RFC 7231 Content-Type
- RFC 7231 Content-Encoding
- RFC 7234 Cache-Control
- RFC 7232 If-Modified-Since
- RFC 7231 Accept-Encoding
- RFC 7235 Authorization - Bearer Token that identifies the caller. This is the Company or User access token.
REST Design Specification
PATCH operations in Expense Reports v4 conform to the JSON Merge Patch specification:
Payload
Response
Status Codes
- 204 No Content
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 500 Internal Server Error
Payload
Example
Sample Requests (short and long URL)
curl --location --request PATCH 'https://us.api.concursolutions.com/expensereports/reports/764428DD6A664AF0BFCB/approve' \
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--data-raw '{
"comment":"Approved"
}'
curl --location --request PATCH 'https://us.api.concursolutions.com/expensereports/v4/users/32C2FCC3-B2E8-4907-9672-5B3F49B1C643/context/MANAGER/reports/764428DD6A664AF0BFCB/approve' \
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--data-raw '{
"comment":"Approved",
"expenseRejectedComment":"Expense rejected"
}'
Response
204 No Content
Schema
ReportSendBackRequest
Name | Type | Format | Description |
---|---|---|---|
comment |
string |
- | Required Comments for sending back the report. |
ReportApproveRequest
Name | Type | Format | Description |
---|---|---|---|
comment |
string |
- | Approver comments. |
expenseRejectedComment |
string |
- | This comment identifies why some of the expense is rejected on this report. Required if the report has rejected expense(s) |
Error
Name | Type | Format | Description |
---|---|---|---|
customResponseData |
object |
- | The custom parameters related to error. |
errorId |
string |
- | The unique identifier of the error associated with the response. |
errorMessage |
string |
- | Required The detailed error message. |
httpStatus |
string |
- | Required The http response code and phrase for the response. |
path |
string |
- | Required The URI of the attempted request. |
timestamp |
string |
date-time |
Required The time when the error was captured. |
validationErrors |
ValidationError |
- | The validation error messages. |
ValidationError
Name | Type | Format | Description |
---|---|---|---|
id |
string |
- | The ID of the validation error. |
message |
string |
- | The detailed message of the validation error. |
source |
string |
- | The type of validation which failed. |