Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
311 changes: 154 additions & 157 deletions src/api-reference/expense/expense-report/v4.expenses.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,163 +6,6 @@ layout: reference

# Expenses v4

## Get Expense Form Fields <a name="get-expense-form-fields"></a>

Returns the configured form fields for the specified expense on a report. Use this endpoint to retrieve the metadata for each field defined on the expense form (labels, control types, data types, access and required flags, etc.).

### Scopes

* `expense.report.read` - Refer to [Scope Usage](#scope-usage) for full details.
* `expense.report.readwrite` - Refer to [Scope Usage](#scope-usage) for full details.

### URI

```shell
https://{datacenterURI}/expensereports/v4/reports/{reportId}/expenses/{expenseId}/formFields
```

### Parameters

| Name | Type | Format | Description |
|---------------|----------|--------|--------------------------------------|
| reportId | `string` | path | The unique identifier of the report. |
| expenseId | `string` | path | The unique identifier of the expense.|
| expenseTypeId | `string` | query | The unique identifier of the expense type.|


### Payloads

* Request: None
* Response: [Expense Form Fields Response Schema](#expense-form-fields-response-schema)


### Headers

* [RFC 7231 Accept-Language](https://tools.ietf.org/html/rfc7231#section-5.3.5)
* [RFC 7231 Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5)
* [RFC 7231 Content-Encoding](https://tools.ietf.org/html/rfc7231#section-3.1.2.2)
* [RFC 7235 Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) - Bearer Token that identifies the caller.
This is the Company or User access token.

### Response

#### Status Codes

* [200 OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)
* [400 Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)
* [401 Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)
* [403 Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)
* [404 Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)
* [500 Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)

### Examples

#### Request

```shell
curl --location --request GET 'https://us.api.concursolutions.com/expensereports/v4/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/formFields' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
```

#### Response

```shell
200 OK

[
{
"parentFieldId": null,
"controlType": "Edit",
"dataType": "String",
"defaultValue": null,
"fieldAccess": "RW",
"fieldId": "ExpName",
"formFieldId": "04845109BC5144D8BEB0CDB6ECB16017",
"fieldName": "Expense Type",
"fieldSequence": 1,
"hasLineSeparator": false,
"isCopyDownSource": false,
"listId": null,
"listLevel": null,
"isExternalList": false,
"maximumLength": 64,
"isRequired": true,
"tooltip": null,
"validationExpression": null,
"validationMessage": null,
"itemizationCopyDownAction": "None",
"requiredForAutoSave": true,
"referenceLink": null,
"targetFieldSettings": null
},
{
"parentFieldId": null,
"controlType": "Edit",
"dataType": "String",
"defaultValue": null,
"fieldAccess": "RW",
"fieldId": "Custom29",
"formFieldId": "526098551C392F4197FBAD828B9575AE",
"fieldName": "Custom 29",
"fieldSequence": 2,
"hasLineSeparator": false,
"isCopyDownSource": false,
"listId": null,
"listLevel": null,
"isExternalList": false,
"maximumLength": 48,
"isRequired": false,
"tooltip": null,
"validationExpression": null,
"validationMessage": null,
"itemizationCopyDownAction": "None",
"requiredForAutoSave": false,
"referenceLink": null,
"targetFieldSettings": [
{
"action": "HIDE",
"operator": "equals",
"value": "TEST",
"searchBy": "value",
"formFieldId": "A9BC29F1C3CAAE4A947D1428AAC170C3"
}
]
},
...
...
...
{
"parentFieldId": null,
"controlType": "Edit",
"dataType": "Date",
"defaultValue": null,
"fieldAccess": "RW",
"fieldId": "BudgetAccrualDate",
"formFieldId": "93B32A706D2C514E806C0187533ACEE2",
"fieldName": "Budget Accrual Date",
"fieldSequence": 63,
"hasLineSeparator": false,
"isCopyDownSource": false,
"listId": null,
"listLevel": null,
"isExternalList": false,
"maximumLength": null,
"isRequired": false,
"tooltip": null,
"validationExpression": null,
"validationMessage": null,
"itemizationCopyDownAction": "None",
"requiredForAutoSave": false,
"referenceLink": null,
"targetFieldSettings": null
}
]
```

## Retrieve Itemizations on a Specific Expense ID <a name="specific-expense-itemizations"></a>

Retrieves the itemizations that belong to a specific expense ID.
The Expenses API can be used to read the expenses that belong to a specific expense report, modify an expense on an
existing expense report and delete an expense on an unsubmitted report. This API can be used to change attributes like
transaction date, transaction amount, location, etc.
Expand Down Expand Up @@ -1069,6 +912,160 @@ curl --location --request 'DELETE' \
204 No Content
```

## Get Expense Form Fields <a name="get-expense-form-fields"></a>

Returns the configured form fields for the specified expense on a report. Use this endpoint to retrieve the metadata for each field defined on the expense form (labels, control types, data types, access and required flags, etc.).

### Scopes

* `expense.report.read` - Refer to [Scope Usage](#scope-usage) for full details.
* `expense.report.readwrite` - Refer to [Scope Usage](#scope-usage) for full details.

### URI

```shell
https://{datacenterURI}/expensereports/v4/reports/{reportId}/expenses/{expenseId}/formFields
```

### Parameters

| Name | Type | Format | Description |
|---------------|----------|--------|--------------------------------------|
| reportId | `string` | path | The unique identifier of the report. |
| expenseId | `string` | path | The unique identifier of the expense.|
| expenseTypeId | `string` | query | The unique identifier of the expense type.|


### Payloads

* Request: None
* Response: [Expense Form Fields Response Schema](#expense-form-fields-response-schema)


### Headers

* [RFC 7231 Accept-Language](https://tools.ietf.org/html/rfc7231#section-5.3.5)
* [RFC 7231 Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5)
* [RFC 7231 Content-Encoding](https://tools.ietf.org/html/rfc7231#section-3.1.2.2)
* [RFC 7235 Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) - Bearer Token that identifies the caller.
This is the Company or User access token.

### Response

#### Status Codes

* [200 OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)
* [400 Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)
* [401 Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)
* [403 Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)
* [404 Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)
* [500 Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)

### Examples

#### Request

```shell
curl --location --request GET 'https://us.api.concursolutions.com/expensereports/v4/reports/764428DD6A664AF0BFCB/expenses/84FCBB92BD4E5342B849DAC29FD163A1/formFields' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json'
```

#### Response

```shell
200 OK

[
{
"parentFieldId": null,
"controlType": "Edit",
"dataType": "String",
"defaultValue": null,
"fieldAccess": "RW",
"fieldId": "ExpName",
"formFieldId": "04845109BC5144D8BEB0CDB6ECB16017",
"fieldName": "Expense Type",
"fieldSequence": 1,
"hasLineSeparator": false,
"isCopyDownSource": false,
"listId": null,
"listLevel": null,
"isExternalList": false,
"maximumLength": 64,
"isRequired": true,
"tooltip": null,
"validationExpression": null,
"validationMessage": null,
"itemizationCopyDownAction": "None",
"requiredForAutoSave": true,
"referenceLink": null,
"targetFieldSettings": null
},
{
"parentFieldId": null,
"controlType": "Edit",
"dataType": "String",
"defaultValue": null,
"fieldAccess": "RW",
"fieldId": "Custom29",
"formFieldId": "526098551C392F4197FBAD828B9575AE",
"fieldName": "Custom 29",
"fieldSequence": 2,
"hasLineSeparator": false,
"isCopyDownSource": false,
"listId": null,
"listLevel": null,
"isExternalList": false,
"maximumLength": 48,
"isRequired": false,
"tooltip": null,
"validationExpression": null,
"validationMessage": null,
"itemizationCopyDownAction": "None",
"requiredForAutoSave": false,
"referenceLink": null,
"targetFieldSettings": [
{
"action": "HIDE",
"operator": "equals",
"value": "TEST",
"searchBy": "value",
"formFieldId": "A9BC29F1C3CAAE4A947D1428AAC170C3"
}
]
},
...
...
...
{
"parentFieldId": null,
"controlType": "Edit",
"dataType": "Date",
"defaultValue": null,
"fieldAccess": "RW",
"fieldId": "BudgetAccrualDate",
"formFieldId": "93B32A706D2C514E806C0187533ACEE2",
"fieldName": "Budget Accrual Date",
"fieldSequence": 63,
"hasLineSeparator": false,
"isCopyDownSource": false,
"listId": null,
"listLevel": null,
"isExternalList": false,
"maximumLength": null,
"isRequired": false,
"tooltip": null,
"validationExpression": null,
"validationMessage": null,
"itemizationCopyDownAction": "None",
"requiredForAutoSave": false,
"referenceLink": null,
"targetFieldSettings": null
}
]
```

## Schema <a name="schema"></a>

### <a name="expense-form-fields-response-schema"></a>Expense Form Fields Response
Expand Down