Spend User Provisioning

Spend User Provisioning allows callers to provision a user in the SAP Concur spend domain. This is an asynchronous downstream process from the User Provisioning v4 service. Currently spend user data can be created, modified, and replaced with the POST, PATCH, and PUT provisioning operations.

Create Spend User Resource - POST

Allows callers to CREATE a user and associated data in the SAP Concur spend domain.

By creating one or more provisioning request containing spend relevant data using the /Bulk endpoint to create new spend user resources. This section discusses the spend extensions and how to use them in tandem with the core extensions to provision a user with spend data. In order to create a user within the SAP Concur interface, the provision request must contain the information required to also provision the core user.

POST is used as the provision operation for creating a new resource.

NOTE: The Spend User extension is the required foundation on which the other spend extensions depend. Without a successful Spend User save, or the existence of a Spend User, the other spend extensions cannot be leveraged for any further operation.

Scopes

  • spend.user.general.writeonly - Refer to Scope Usage for full details.

URI

POST https://us.api.concursolutions.com/profile/v4/Bulk/

Parameters

None

Payload

Examples

Bulk Request

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:BulkRequest"
    ],
    "failOnErrors": 1,
    "Operations": [
        {
            "method": "POST",
            "path": "/Users",
            "bulkId": "bulk-operation-1",
            "data": {
                "userName": "Chris.doe198@sap.com",
                "active": true,
                "name": {
                    "formatted": "Chris Doe",
                    "legalName": "Chris Doe",
                    "familyName": "Doe",
                    "givenName": "Chris"
                },
                "emails": [
                    {
                        "value": "Chris.doe198@sap.com",
                        "type": "Work"
                    }
                ],
                "entitlements": [
                    "Expense"
                ],
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                    "employeeNumber": "3749",
                    "companyId": "xxxxxxxx-xxx-xxx-xxx-9300b1c317xxx"
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:User": {
                    "reimbursementCurrency": "USD",
                    "reimbursementType": "CONCUR_PAY",
                    "ledgerCode": "DEFAULT",
                    "country": "US",
                    "stateProvince": "WA",
                    "locale": "en-US",
                    "customData": [
                        {
                            "id": "custom1",
                            "value": "testing"
                        },
                        {
                            "id": "custom2",
                            "value": "tested"
                        },
                        {
                            "id": "orgUnit1",
                            "value": "testDepartment"
                        },
                        {
                            "id": "orgUnit2",
                            "value": "testSquadAlpha"
                        }
                    ]
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver": {
                    "request": [
                        {
                            "approver": {
                                "employeeNumber": "requestApprover"
                            },
                            "primary": true
                        }
                    ],
                    "report": [
                        {
                            "approver": {
                                "employeeNumber": "reportApprover"
                            },
                            "primary": false
                        }
                    ]
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:Delegate": {
                    "expense": [
                        {
                            "canApprove": true,
                            "canPrepare": true,
                            "canPrepareForApproval": true,
                            "canReceiveApprovalEmail": true,
                            "canReceiveEmail": true,
                            "canSubmit": true,
                            "canSubmitTravelRequest": true,
                            "canUseBi": true,
                            "canViewReceipt": true,
                            "delegate": {
                                "employeeNumber": "expenseDelegate"
                            },
                            "temporaryDelegatation": {
                                "temporaryDelegationFromDate": "2020-02-19T03:15:00.000Z",
                                "temporaryDelegationToDate": "2020-02-19T03:59:00.000Z"
                            }
                        }
                    ]
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:Role": {
                    "roles": [
                        {
                            "roleName": "EXP_USER",
                            "roleGroups": ["R&D-Dev-Exp", "R&D-QA-Exp"]
                        }
                    ]
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:WorkflowPreference": {
                    "emailStatusChangeOnCashAdvance": true,
                    "emailAwaitApprovalOnCashAdvance": true,
                    "emailStatusChangeOnReport": true,
                    "emailAwaitApprovalOnReport": true,
                    "promptForApproverOnReportSubmit": true,
                    "emailStatusChangeOnTravelRequest": true,
                    "emailAwaitApprovalOnTravelRequest": true,
                    "promptForApproverOnTravelRequestSubmit": true,
                    "emailStatusChangeOnPayment": true,
                    "emailAwaitApprovalOnPayment": true,
                    "promptForApproverOnPaymentSubmit": true
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:UserPreference": {
                    "allowCreditCardTransArrivalEmails": true,
                    "allowReceiptImageAvailEmails": true,
                    "promptForCardTransactionsOnReport": true,
                    "autoAddTripCardTransOnReport": true,
                    "promptForReportPrintFormat": true,
                    "defaultReportPrintFormat": "DETAILED",
                    "showTotalOnReport": true,
                    "showExpenseOnReport": "ALL",
                    "showInstructHelpPanel": true,
                    "showImagingIntro": true,
                    "expenseAuditRequired": "REQUIRED",
                    "useQuickItinAsDefault": true
                },
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:Payroll": {
                    "adp": {
                        "companyCode": "companyCode",
                        "deductionCode": "HLTH",
                        "employeeFileNumber": "1234"
                    }
                }
            }
        }
    ]
}

Replace Spend User Resources - PUT

Allows callers to REPLACE a user and associated information in the SAP Concur spend domain.

By creating one or more provision requests using the /Bulk endpoint to replace existing spend user resources.

PUT is used as the provision operation for replacing an existing resource.

NOTE: We do not support an empty Spend User extension. However, if a PUT request is provided for an existing spend user with all blank fields, we will empty all other extensions and set the required fields back to the default values.

Scopes

  • spend.user.general.writeonly - Refer to Scope Usage for full details.

URI

POST https://us.api.concursolutions.com/profile/v4/Bulk/

Parameters

None

Payload

Examples

Bulk Request

NOTE: The UUID within the ID attribute and path must be included within the data of the request.

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:BulkRequest"
    ],
    "failOnErrors": 1,
    "Operations": [
        {
            "method": "PUT",
            "path": "/Users/aaaaaaaa-bbbb-cccc-aaaa-bbbbbbbbbbb1",
            "bulkId": "Seattle",
            "data": {
                "id": "aaaaaaaa-bbbb-cccc-aaaa-bbbbbbbbbbb1",
                "userName": "john.doe21224@sap.com",
                "active": false,
                "name": {
                    "formatted": "Mr. John Doe",
                    "legalName": "Mr. John Doe",
                    "middleName": "Joe",
                    "middleInitial": "J",
                    "familyName": "Doe",
                    "givenName": "John",
                    "honorificPrefix": "Prof Dr Mr",
                    "honorificSuffix": "VI",
                    "hasNoMiddleName": true
                },
                "emails": [
                    {
                        "value": "john.doe193@sap.com",
                        "type": "work"
                    }
                ],
                "entitlements": [
                    "Expense"
                ],
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                    "employeeNumber": "3749",
                    "companyId": "xxxxxxxx-xxx-xxx-xxx-9300b1c317xxx"
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:User": {
                    "reimbursementCurrency": "USD",
                    "reimbursementType": "CONCUR_PAY",
                    "ledgerCode": "DEFAULT",
                    "country": "US",
                    "budgetCountryCode": "US",
                    "stateProvince": "WA",
                    "locale": "en-US",
                    "customData": [
                        {
                            "id": "custom1",
                            "value": "testing"
                        },
                        {
                            "id": "orgUnit2",
                            "value": "testSquadAlpha"
                        }
                    ]
                },
                "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver": {
                    "request": [
                        {
                            "approver": {
                                "employeeNumber": "requestApprover"
                            },
                            "primary": true
                        }
                    ],
                },
            }
        }
    ]
}

Modify Spend User Resource - PATCH

Allows callers to MODIFY a user and associated data in the SAP Concur spend domain.

By creating one or more provision requests using the /Bulk endpoint to modify existing spend user resources, or using the /Users endpoint for modifying a single spend user resource.

PATCH is used as the provision operation or http method for modifying a new or existing resource.

NOTE: The Spend User extension is the required foundation on which the other spend extensions depend. Without a successful Spend User save, or the existence of a Spend User, the other spend extensions cannot be leveraged for any further operation.

Scopes

  • spend.user.general.writeonly - Refer to Scope Usage for full details.

URI

POST https://us.api.concursolutions.com/profile/v4/Bulk/

Parameters

None

Headers

Name Type Format Description
concur-correlationid string RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace A SAP Concur specific custom header used for technical support
Content-Type string RFC 7231 Content-Type Specify the nature of the data in the body of an entity, by giving type and subtype identifiers, and by providing auxiliary information that may be required for certain types (https://www.w3.org/Protocols/rfc1341/4_Content-Type.html) </br> Ex: application/json, application/scim+json

Payload

Examples

NOTE: The UUID must be provided in the path of the request.

Request

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:BulkRequest",
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "failOnErrors": 1,
    "Operations": [
        {
            "method": "PATCH",
            "path": "/Users/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "data": {
                "Operations": [
                    {
                        "op": "replace",
                        "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:User:country",
                        "value": "US"
                    },
                    {
                        "op": "add",
                        "value": {
                            "urn:ietf:params:scim:schemas:extension:spend:2.0:User": {
                                "locale": "es-419",
                                "reimbursementType": "CONCUR_PAY",
                                "customData": [
                                    {
                                        "id": "custom1",
                                        "value": "patchChangeCustom1"
                                    },
                                    {
                                        "id": "custom8",
                                        "value": "newCustomObject"
                                    }
                                ]
                            }
                        }
                    },
                    {
                        "op": "add",
                        "value": {
                            "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver": {
                                "budget": [
                                    {
                                        "approver": {
                                            "value": "aaaaaaaa-bbbb-cccc-aaaa-bbbbbbbbbbb3",
                                            "employeeNumber": "100001"
                                        },
                                        "primary": true
                                    }
                                ]
                            }
                        }
                    }
                ]
            }
        }
    ]
}

Patch Request

URI

PATCH https://us.api.concursolutions.com/profile/v4/Users/<Concur UUID>

Parameters

Name Type Format Description
id string UUID The SAP Concur user UUID of the user to be updated.

Payload

Examples

The following lists a few PATCH examples with the Approver extension.

Request: Add Approver

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "add",
            "value": {
                "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver": {
                    "report": [
                        {
                            "approver": {
                                "value": "dbc5c27f-afc8-4091-bd2b-d5beca9c8481"
                            },
                            "primary": true
                        }
                    ]
                }
            }
        }
    ]
}

Request: Replace Approver

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "value": {
                "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver": {
                    "report": [
                        {
                            "approver": {
                                "value": "5d9b715d-7265-4532-a40d-38271837f538"
                            },
                            "primary": true
                        }
                    ]
                }
            }
        }
    ]
}

Request: Remove a Single Approver

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "remove",
            "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver:report[approver.value eq \"5d9b715d-7265-4532-a40d-38271837f538\"]"
        }
    ]
}

NOTE: Remove operation uses the attribute path for removing a specific identity.

Request: Remove All Approvers

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "remove",
            "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:Approver:"
        }
    ]
}

NOTE: Remove operation uses the attribute path for removing resources.

The following lists a few PATCH examples with the Role extension.

Request: Add Role

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles",
            "value": [
                {
                    "roleName": "SHD_ROLE_ADMIN",
                    "roleGroups": [
                        "R&D-QA-Exp"
                    ]
                }
            ]
        }
    ]
}

Request: Replace Role

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles",
            "value": [
                {
                    "roleName": "SHD_ROLE_ADMIN",
                    "roleGroups": [
                        "R&D-QA-Exp"
                    ]
                }
            ]
        }
    ]
}

Request: Remove a Single Role

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "remove",
            "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles[roleName eq \"SHD_ROLE_ADMIN\"]"
        }
    ]
}

NOTE: Remove operation uses the attribute path for removing a specific identity.

Request: Remove All Roles

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "remove",
            "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:Role:"
        }
    ]
}

NOTE: Remove operation uses the attribute path for removing resources.

On this page