Comments v4

The Comments v4 API is used to read the comments entered on the expense report header, or expenses of an existing expense report. This API is used to detail information about spending that occurs out of policy, which is justified by the report owner, or inaccuracies pointed out by the approvers of the expense report.

Prior Versions

  • Reports v2 documentation is available here.

Limitations

This API is only available to partners who have been granted access by SAP Concur. Access to this documentation does not provide access to the API.

Products and Editions

  • Concur Expense Professional Edition
  • Concur Expense Standard Edition

Scope Usage

Required Scopes:

Name Description Endpoint
expense.report.read Get information about expense reports. GET
user.read Get User Information, necessary for userID. GET

Optional Scope:

Name Description Endpoint
expense.report.readwrite Read and write expense report headers. PATCH
expense.report.workflowstatus.write Approve or Send Back the Report in the workflow PATCH

Dependencies

SAP Concur clients must purchase Concur Expense in order to use this API. This API 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

This API supports both company level and user level access tokens.

Retrieve Report Header Comments

Retrieves the comments on the specific report header.

Scopes

expense.report.read - Refer to Scope Usage for full details.

Request

URI Template

https://{datacenterURI}/expensereports/v4/users/{userID}/context/{contextType}/reports/{reportId}/comments

Parameters

Name Type Format Description
userID string - Required The unique identifier of the SAP Concur user. Use Identity v4 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, PROXY
reportId string - Required The unique identifier of the report that is being read.
includeAllComments boolean true or false Return all the comments that are present on the report at all levels. Default value: false

Headers

Response

Status Codes

Headers

Payload

Example

Request

curl --location --request GET 'https://us.api.concursolutions.com/expensereports/v4/users/32C2FCC3-B2E8-4907-9672-5B3F49B1C643/context/TRAVELER/reports/764428DD6A664AF0BFCB/comments?includeAllComments=true' \
--header 'Authorization: Bearer {access_token}' \
--header 'Concur-CorrelationId: Expense-Report-test' \
--header 'Content-Type: application/json'

Response

200 OK

[
  {
    "comment": "This is an expense report for office supplies",
    "author": {
      "firstName": "Concur",
      "lastName": "Administrator",
      "middleInitial": ""
    },
    "createdForEmployee": {
      "firstName": "Tester",
      "lastName": "Insert",
      "middleInitial": "A"
    },
    "createdForEmployeeId": "32c2fcc3-b2e8-4907-9672-5b3f49b1c643",
    "creationDate": "2021-03-17T22:29:50.090Z",
    "expenseId": null
    "isAuditorComment": false,
    "isLatest": true,
    "stepInstanceId": "54279E6A6D940741A9CEEDEE2240C5D3"
  }
]

Retrieve Expense Comments

Retrieves the comments on the specific expense within an expense report.

Scopes

expense.report.read - Refer to Scope Usage for full details.

Request

URI Template

https://{datacenterURI}/expensereports/v4/users/{userID}/context/{contextType}/reports/{reportId}/expenses/{expenseId}/comments

Parameters

Name Type Format Description
userID string - Required The unique identifier of the SAP Concur user. Use Identity v4 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, PROXY
reportId string - Required The unique identifier of the report to which this expense entry belongs.
expenseId string - Required The unique identifier of the expense entry to which the comments belong.

Headers

Response

Status Codes

Headers

Payload

Example

Request

curl --location --request GET 'https://us.api.concursolutions.com/expensereports/v4/users/32C2FCC3-B2E8-4907-9672-5B3F49B1C643/context/TRAVELER/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Concur-CorrelationId: Expense-Report-test' \
--header 'Content-Type: application/json'

Expense Comments Response

200 OK

[
    {
        "comment": "This expense is allowed due to the pandemic",
        "author": {
            "firstName": "Concur",
            "lastName": "Administrator",
            "middleInitial": ""
        },
        "createdForEmployee": {
            "firstName": "Tester",
            "lastName": "Insert",
            "middleInitial": "A"
        },
        "createdForEmployeeId": "32c2fcc3-b2e8-4907-9672-5b3f49b1c643",
        "creationDate": "2021-03-17T23:05:40.340Z",
        "expenseId": "84FCBB92BD4E5342B849DAC29FD163A1",
        "isAuditorComment": false,
        "isLatest": true,
        "stepInstanceId": "54279E6A6D940741A9CEEDEE2240C5D3"
    }
]

Schema

Report Header Comments

Name Type Format Description
commentDetails array commentDetails A key linking to another schema for the format.

Expense Comments

Name Type Format Description
commentDetails array commentDetails A key linking to another schema for the format.

commentDetails

Name Type Format Description
author Employee - Required The comment author’s name.
comment string - Required The comments input on the report by all users.
createdForEmployee Employee - Required The name of the employee the comment was created on behalf of. This would differ from the comment author only in the case of delegates creating the comment.
createdForEmployeeId string - Required The unique identifier of the employee the comment was created on behalf of. This would differ from the comment author only in the case of delegates creating the comment.
creationDate string YYYY-MM-DDTHH:mm:ssZ.SSS'Z' Required The UTC datetime when the comment was created on the report or expense.
expenseId string - Required The unique identifier of the expense.
isAuditorComment boolean true/false Required If true, this attribute represents whether this comment has been authored by an auditor.
isLatest boolean true/false Required If true, this attribute represents the latest comment by the user.
stepInstanceId string - The unique identifier of the step instance.

Employee

Name Type Format Description
firstName string - First name of the employee.
lastName string - Last name of the employee.
middleInitial string - Middle initial of the employee.

Error Message

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.

Validation Error

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.

On this page