Comments v4

The Comments v4 API POSTs, GETs, PUTs, and DELETEs comments associated with an expense or a report.

Comments are typically added to an expense or a report to add additional information about an expense or a report. For example, a comment may highlight spending that is out of policy or a comment may be added to justify a particular expenditure.

Prior Versions

  • Reports v2 documentation is available here.

Limitations

Access to this documentation does not provide access to the API.

Products and Editions

  • Concur Expense Professional Edition
  • Concur Expense Standard Edition

Dependencies

SAP Concur clients must purchase Concur Expense in order to use this API. User based API requires the Identity v4 API . 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
  • expense.report.readwrite

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

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 '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 Report Header Comments Using System User

Retrieves the comments on the specific report header using a system user.

Scopes

  • expense.report.read
  • expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/comments

Parameters

Name Type Format Description
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

Payload

Example

Request

curl --location --request GET 'https://us.api.concursolutions.com/expensereports/v4/reports/764428DD6A664AF0BFCB/comments?includeAllComments=true' \
--header 'Authorization: Bearer {access_token}' \
--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"
  }
]

Post Report Header Comment

Creates a new comment for the specified report.

Scopes

expense.report.readwrite

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.

Headers

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request 'POST' \
'https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/93B9D238A6864C019258/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This is a new comment."
}'

Response

201 Created

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/93B9D238A6864C019258/comments"
}

Post Report Header Comment Using System User

Creates a new comment for the specified report using a system user.

Scopes

expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/comments

Parameters

Name Type Format Description
reportId string - Required The unique identifier of the report that is being read.

Headers

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request 'POST' \
'https://us.api.concursolutions.com/expensereports/v4/reports/93B9D238A6864C019258/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This is a new comment."
}'

Response

201 Created

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/reports/93B9D238A6864C019258/comments"
}

Update Report Header Comments

Updates the latest comment for the specified report.

Scopes

expense.report.readwrite

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.

Headers

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request 'PUT' \
'https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/93B9D238A6864C019258/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This report is for stationery expenses."
}'

Response

200 OK

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/93B9D238A6864C019258/comments"
}

Update Report Header Comments Using System User

Updates the latest comment for the specified report using a system user.

Scopes

expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/comments

Parameters

Name Type Format Description
reportId string - Required The unique identifier of the report that is being read.

Headers

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request 'PUT' \
'https://us.api.concursolutions.com/expensereports/v4/reports/93B9D238A6864C019258/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This report is for stationery expenses."
}'

Response

200 OK

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/reports/93B9D238A6864C019258/comments"
}

Delete Report Header Comments

Deletes the latest comment for the specified report.

Scopes

expense.report.readwrite

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.

Headers

Response

Status Codes

Example

Request

curl --location --request 'DELETE' \
'https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/93B9D238A6864C019258/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'

Response

204 No Content

Delete Report Header Comments Using System User

Deletes the latest comment for the specified report using a system user.

Scopes

expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/comments

Parameters

Name Type Format Description
reportId string - Required The unique identifier of the report that is being read.

Headers

Response

Status Codes

Example

Request

curl --location --request 'DELETE' \
'https://us.api.concursolutions.com/expensereports/v4/reports/93B9D238A6864C019258/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'

Response

204 No Content

Retrieve Expense Comments

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

Scopes

  • expense.report.read
  • expense.report.readwrite

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

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 'Content-Type: application/json'

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"
    }
]

Retrieve Expense Comments Using System User

Retrieves the comments on the specific expense within an expense report using a system user.

Scopes

  • expense.report.read
  • expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/expenses/{expenseId}/comments

Parameters

Name Type Format Description
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

Payload

Example

Request

curl --location --request GET 'https://us.api.concursolutions.com/expensereports/v4/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/comments' \
--header 'Authorization: Bearer {access_token}' \
--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"
    }
]

Post Expense Comments

Creates a new comment for the specified expense.

Scopes

expense.report.readwrite

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

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request POST 'https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/E364C14BAEEA4BE5922C/expenses/36CBAA8D4ADE6C46BB587C05293405DC/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This expense is for a business meal."
}'

Response

201 Created

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/E364C14BAEEA4BE5922C/expenses/36CBAA8D4ADE6C46BB587C05293405DC/comments"
}

Post Expense Comments Using System User

Creates a new comment for the specified expense using a system user.

Scopes

expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/expenses/{expenseId}/comments

Parameters

Name Type Format Description
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

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request POST 'https://us.api.concursolutions.com/expensereports/v4/reports/E364C14BAEEA4BE5922C/expenses/36CBAA8D4ADE6C46BB587C05293405DC/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This expense is for a business meal."
}'

Response

201 Created

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/reports/E364C14BAEEA4BE5922C/expenses/36CBAA8D4ADE6C46BB587C05293405DC/comments"
}

Update Expense Comments

Updates the latest comment for the specified expense.

Scopes

expense.report.readwrite

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

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request PUT 'https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/E364C14BAEEA4BE5922C/expenses/36CBAA8D4ADE6C46BB587C05293405DC/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This expense is for a leisure meal."
}'

Response

200 OK

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/E364C14BAEEA4BE5922C/expenses/36CBAA8D4ADE6C46BB587C05293405DC/comments"
}

Update Expense Comments Using System User

Updates the latest comment for the specified expense using a system user.

Scopes

expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/expenses/{expenseId}/comments

Parameters

Name Type Format Description
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

Payload

Response

Status Codes

Payload

Example

Request

curl --location --request PUT 'https://us.api.concursolutions.com/expensereports/v4/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
--data-raw '{
  "comment": "This expense is for a leisure meal."
}'

Response

200 OK

{
  "uri": "https://us.api.concursolutions.com/expensereports/v4/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/comments"
}

Delete Expense Comments

Deletes the latest comment for the specified expense.

Scopes

expense.report.readwrite

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

Example

Request

curl --location --request 'DELETE' \
'https://us.api.concursolutions.com/expensereports/v4/users/750524a2-907b-4dde-9fec-d038ab043f53/context/TRAVELER/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/comments \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'

Response

204 No Content

Delete Expense Comments With System User

Deletes the latest comment for the specified expense using a system user.

Scopes

expense.report.readwrite

Request

URI Template

https://{datacenterURI}/expensereports/v4/reports/{reportId}/expenses/{expenseId}/comments

Parameters

Name Type Format Description
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

Example

Request

curl --location --request 'DELETE' \
'https://us.api.concursolutions.com/expensereports/v4/reports/93B9D238A6864C019258/expenses/84FCBB92BD4E5342B849DAC29FD163A1/comments' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'

Response

204 No Content

Schema

Report Header Comments Response

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.

Comment

Name Type Format Description
comment string - The comments input on the report/expense by all users.

Comment Save Response

Name Type Format Description
uri string - The URI of the comment.

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