Are you receiving SNAP/EBT or WIC benefits? The Expensify.org/SNAP-WIC-VAX campaign is live and accepting new members. Learn more about receiving $50 for submitting a SNAP/WIC receipt and $50 for getting your COVID-19 vaccine here and join today!

How Do I add new users through the API?

ikaplan
ikaplan Expensify Customer Posts: 2 Expensify Newcomer

I am looking at https://integrations.expensify.com/Integration-Server/doc/employeeUpdater/#request-format


But I'm not understanding how the employee payload works with the requestJobDescription parameter. Is the type always going to be 'update' for both new and existing users?

Where does the following example fit in within the requestJobDescription?

{
    "Employees": [
        {
            "employeeEmail": "[email protected]",
            "managerEmail": "[email protected]",
            "policyID": "0123456789ABCDEF",
            "employeeID": "12345",
            "firstName": "John",
            "lastName": "Doe",
            "customField2": "ABC123",
            "approvalLimit": 12300,
            "overLimitApprover": "[email protected]",
            "isTerminated": false
        },
        {
            "employeeEmail": "[email protected]",
            "managerEmail": "[email protected]",
            "policyID": "0123456789ABCDEF",
            "employeeID": "34567",
            "firstName": "Michael",
            "lastName": "Scott",
            "customField2": "BCD345",
            "isTerminated": false
        }
    ]
}


  • Directly in the request (parameter data)
{
    "type": "update",
    "dry-run" : false,
    "credentials": {
        "partnerUserID": "aa_api_domain_com",
        "partnerUserSecret": "xxx"
    },
    "dataSource" : "request",
    "inputSettings": {
        "type": "employees",
        "entity": "generic"
    },
    "onFinish":[
        {"actionName": "email", "recipients":"[email protected],[email protected]"}
    ]
}

Answers