Skip to content

Commit 6f8b574

Browse files
waleedlatif1claude
andcommitted
fix(sap-concur): correct Cash Advance v4.1 paths, add SCIM filter param
- Update Cash Advance create/get/issue tools from /cashadvance/v4/ to /cashadvance/v4.1/ to match the live API - Add filter query param to list_users (SCIM v4.1 supports filtering by userName, employeeNumber, externalId) - Regenerate docs MDX Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent b74fc86 commit 6f8b574

7 files changed

Lines changed: 30 additions & 20 deletions

File tree

apps/docs/content/docs/en/tools/sap_concur.mdx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Approve an expense report as a manager (PATCH /expensereports/v4/reports/\{repor
6767

6868
### `sap_concur_associate_attendees`
6969

70-
Associate attendees with an expense (POST /expensereports/v4/users/\{userId\}/context/TRAVELER/reports/\{reportId\}/expenses/\{expenseId\}/attendees).
70+
Associate attendees with an expense (POST /expensereports/v4/users/\{userId\}/context/\{contextType\}/reports/\{reportId\}/expenses/\{expenseId\}/attendees).
7171

7272
#### Input
7373

@@ -96,7 +96,7 @@ Associate attendees with an expense (POST /expensereports/v4/users/\{userId\}/co
9696

9797
### `sap_concur_create_cash_advance`
9898

99-
Create a cash advance (POST /cashadvance/v4/cashadvances).
99+
Create a cash advance (POST /cashadvance/v4.1/cashadvances).
100100

101101
#### Input
102102

@@ -686,7 +686,7 @@ Get a budget item header by ID (GET /budget/v4/budgetItemHeader/\{id\}).
686686

687687
### `sap_concur_get_cash_advance`
688688

689-
Get a cash advance (GET /cashadvance/v4/cashadvances/\{cashadvanceId\}).
689+
Get a cash advance (GET /cashadvance/v4.1/cashadvances/\{cashAdvanceId\}).
690690

691691
#### Input
692692

@@ -988,7 +988,7 @@ Get expense itemizations (GET /expensereports/v4/users/\{userId\}/context/\{cont
988988
| `password` | string | No | Password \(only for password grant\) |
989989
| `companyUuid` | string | No | Company UUID for multi-company access tokens |
990990
| `userId` | string | Yes | Concur user UUID |
991-
| `contextType` | string | Yes | Access context \(TRAVELER per the v4 spec\) |
991+
| `contextType` | string | Yes | Access context: TRAVELER, MANAGER, or PROXY |
992992
| `reportId` | string | Yes | Expense report ID |
993993
| `expenseId` | string | Yes | Expense ID |
994994

@@ -1426,7 +1426,7 @@ Get a single user by UUID (GET /profile/identity/v4.1/Users/\{id\}).
14261426

14271427
### `sap_concur_issue_cash_advance`
14281428

1429-
Issue a cash advance (POST /cashadvance/v4/cashadvances/\{cashadvanceId\}/issue).
1429+
Issue a cash advance (POST /cashadvance/v4.1/cashadvances/\{cashAdvanceId\}/issue).
14301430

14311431
#### Input
14321432

@@ -1651,7 +1651,7 @@ List expenses on a report (GET /expensereports/v4/users/\{userId\}/context/\{con
16511651
| `password` | string | No | Password \(only for password grant\) |
16521652
| `companyUuid` | string | No | Company UUID for multi-company access tokens |
16531653
| `userId` | string | Yes | Concur user UUID |
1654-
| `contextType` | string | Yes | Access context \(TRAVELER per the v4 spec\) |
1654+
| `contextType` | string | Yes | Access context: TRAVELER, MANAGER, or PROXY |
16551655
| `reportId` | string | Yes | Expense report ID |
16561656

16571657
#### Output
@@ -2081,10 +2081,10 @@ List travel profile summaries (GET /api/travelprofile/v2.0/summary). LastModifie
20812081
| `username` | string | No | Username \(only for password grant\) |
20822082
| `password` | string | No | Password \(only for password grant\) |
20832083
| `companyUuid` | string | No | Company UUID for multi-company access tokens |
2084-
| `lastModifiedDate` | string | Yes | Required ISO 8601 date \(YYYY-MM-DD or full timestamp\) |
2084+
| `lastModifiedDate` | string | Yes | Required UTC datetime in YYYY-MM-DDThh:mm:ss format |
20852085
| `page` | number | No | 1-based page number |
20862086
| `itemsPerPage` | number | No | Items per page \(max 200\) |
2087-
| `active` | string | No | Status filter \(sent as Status query param\): "Active" or "Inactive". Omit for all. |
2087+
| `active` | string | No | Active filter \(sent as Active query param\): "1" \(active\) or "0" \(inactive\). Omit for all. |
20882088
| `travelConfigs` | string | No | Comma-separated travel configuration ids |
20892089

20902090
#### Output
@@ -2238,6 +2238,7 @@ List Concur user identities (GET /profile/identity/v4.1/Users).
22382238
| `companyUuid` | string | No | Company UUID for multi-company access tokens |
22392239
| `count` | number | No | Max number of users to return \(default 100, max 1000\) |
22402240
| `cursor` | string | No | SCIM v4.1 pagination cursor returned by a prior call |
2241+
| `filter` | string | No | SCIM filter expression. Supported attributes: userName, employeeNumber, externalId. |
22412242
| `attributes` | string | No | Comma-separated list of attributes to include in the response |
22422243
| `excludedAttributes` | string | No | Comma-separated list of attributes to exclude from the response |
22432244

@@ -2318,7 +2319,7 @@ Recall a submitted expense report (PATCH /expensereports/v4/users/\{userId\}/con
23182319

23192320
### `sap_concur_remove_all_attendees`
23202321

2321-
Remove all attendees from an expense (DELETE /expensereports/v4/users/\{userId\}/context/TRAVELER/reports/\{reportId\}/expenses/\{expenseId\}/attendees).
2322+
Remove all attendees from an expense (DELETE /expensereports/v4/users/\{userId\}/context/\{contextType\}/reports/\{reportId\}/expenses/\{expenseId\}/attendees).
23222323

23232324
#### Input
23242325

apps/sim/app/(landing)/integrations/data/integrations.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11570,11 +11570,11 @@
1157011570
},
1157111571
{
1157211572
"name": "Associate Attendees",
11573-
"description": "Associate attendees with an expense (POST /expensereports/v4/users/{userId}/context/TRAVELER/reports/{reportId}/expenses/{expenseId}/attendees)."
11573+
"description": "Associate attendees with an expense (POST /expensereports/v4/users/{userId}/context/{contextType}/reports/{reportId}/expenses/{expenseId}/attendees)."
1157411574
},
1157511575
{
1157611576
"name": "Remove All Attendees",
11577-
"description": "Remove all attendees from an expense (DELETE /expensereports/v4/users/{userId}/context/TRAVELER/reports/{reportId}/expenses/{expenseId}/attendees)."
11577+
"description": "Remove all attendees from an expense (DELETE /expensereports/v4/users/{userId}/context/{contextType}/reports/{reportId}/expenses/{expenseId}/attendees)."
1157811578
},
1157911579
{
1158011580
"name": "List Report Comments",
@@ -11666,15 +11666,15 @@
1166611666
},
1166711667
{
1166811668
"name": "Create Cash Advance",
11669-
"description": "Create a cash advance (POST /cashadvance/v4/cashadvances)."
11669+
"description": "Create a cash advance (POST /cashadvance/v4.1/cashadvances)."
1167011670
},
1167111671
{
1167211672
"name": "Get Cash Advance",
11673-
"description": "Get a cash advance (GET /cashadvance/v4/cashadvances/{cashadvanceId})."
11673+
"description": "Get a cash advance (GET /cashadvance/v4.1/cashadvances/{cashAdvanceId})."
1167411674
},
1167511675
{
1167611676
"name": "Issue Cash Advance",
11677-
"description": "Issue a cash advance (POST /cashadvance/v4/cashadvances/{cashadvanceId}/issue)."
11677+
"description": "Issue a cash advance (POST /cashadvance/v4.1/cashadvances/{cashAdvanceId}/issue)."
1167811678
},
1167911679
{
1168011680
"name": "List Itineraries (Trips)",

apps/sim/tools/sap_concur/create_cash_advance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { ToolConfig } from '@/tools/types'
99
export const createCashAdvanceTool: ToolConfig<CreateCashAdvanceParams, SapConcurProxyResponse> = {
1010
id: 'sap_concur_create_cash_advance',
1111
name: 'SAP Concur Create Cash Advance',
12-
description: 'Create a cash advance (POST /cashadvance/v4/cashadvances).',
12+
description: 'Create a cash advance (POST /cashadvance/v4.1/cashadvances).',
1313
version: '1.0.0',
1414
params: {
1515
datacenter: {
@@ -67,7 +67,7 @@ export const createCashAdvanceTool: ToolConfig<CreateCashAdvanceParams, SapConcu
6767
headers: () => ({ 'Content-Type': 'application/json' }),
6868
body: (params) => ({
6969
...baseProxyBody(params),
70-
path: `/cashadvance/v4/cashadvances`,
70+
path: `/cashadvance/v4.1/cashadvances`,
7171
method: 'POST',
7272
body: params.body,
7373
}),

apps/sim/tools/sap_concur/get_cash_advance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { ToolConfig } from '@/tools/types'
1010
export const getCashAdvanceTool: ToolConfig<GetCashAdvanceParams, SapConcurProxyResponse> = {
1111
id: 'sap_concur_get_cash_advance',
1212
name: 'SAP Concur Get Cash Advance',
13-
description: 'Get a cash advance (GET /cashadvance/v4/cashadvances/{cashadvanceId}).',
13+
description: 'Get a cash advance (GET /cashadvance/v4.1/cashadvances/{cashAdvanceId}).',
1414
version: '1.0.0',
1515
params: {
1616
datacenter: {
@@ -70,7 +70,7 @@ export const getCashAdvanceTool: ToolConfig<GetCashAdvanceParams, SapConcurProxy
7070
const cashAdvanceId = trimRequired(params.cashAdvanceId, 'cashAdvanceId')
7171
return {
7272
...baseProxyBody(params),
73-
path: `/cashadvance/v4/cashadvances/${encodeURIComponent(cashAdvanceId)}`,
73+
path: `/cashadvance/v4.1/cashadvances/${encodeURIComponent(cashAdvanceId)}`,
7474
method: 'GET',
7575
}
7676
},

apps/sim/tools/sap_concur/issue_cash_advance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { ToolConfig } from '@/tools/types'
1010
export const issueCashAdvanceTool: ToolConfig<IssueCashAdvanceParams, SapConcurProxyResponse> = {
1111
id: 'sap_concur_issue_cash_advance',
1212
name: 'SAP Concur Issue Cash Advance',
13-
description: 'Issue a cash advance (POST /cashadvance/v4/cashadvances/{cashadvanceId}/issue).',
13+
description: 'Issue a cash advance (POST /cashadvance/v4.1/cashadvances/{cashAdvanceId}/issue).',
1414
version: '1.0.0',
1515
params: {
1616
datacenter: {
@@ -76,7 +76,7 @@ export const issueCashAdvanceTool: ToolConfig<IssueCashAdvanceParams, SapConcurP
7676
const cashAdvanceId = trimRequired(params.cashAdvanceId, 'cashAdvanceId')
7777
return {
7878
...baseProxyBody(params),
79-
path: `/cashadvance/v4/cashadvances/${encodeURIComponent(cashAdvanceId)}/issue`,
79+
path: `/cashadvance/v4.1/cashadvances/${encodeURIComponent(cashAdvanceId)}/issue`,
8080
method: 'POST',
8181
body: params.body ?? {},
8282
}

apps/sim/tools/sap_concur/list_users.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ export const listUsersTool: ToolConfig<ListUsersParams, SapConcurProxyResponse>
6868
visibility: 'user-or-llm',
6969
description: 'SCIM v4.1 pagination cursor returned by a prior call',
7070
},
71+
filter: {
72+
type: 'string',
73+
required: false,
74+
visibility: 'user-or-llm',
75+
description:
76+
'SCIM filter expression. Supported attributes: userName, employeeNumber, externalId.',
77+
},
7178
attributes: {
7279
type: 'string',
7380
required: false,
@@ -92,6 +99,7 @@ export const listUsersTool: ToolConfig<ListUsersParams, SapConcurProxyResponse>
9299
query: buildListQuery({
93100
count: params.count,
94101
cursor: params.cursor,
102+
filter: params.filter,
95103
attributes: params.attributes,
96104
excludedAttributes: params.excludedAttributes,
97105
}),

apps/sim/tools/sap_concur/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ export interface GetItineraryParams extends SapConcurBaseParams {
327327
export interface ListUsersParams extends SapConcurBaseParams {
328328
count?: number
329329
cursor?: string
330+
filter?: string
330331
attributes?: string
331332
excludedAttributes?: string
332333
}

0 commit comments

Comments
 (0)