We are currently experiencing higher than normal support inquiries and response times. The Community is here to support you as well so please help each other out when you can. Please visit our status page to subscribe to updates.

Employee Updater API, Using PowerShell

derekritchisonderekritchison Posts: 4Expensify Customer

Hey all, I posted this question in a somewhat relevant thread but hadn't received a response, possibly because the thread was a bit old. Anyway, I am working on automating new user creation with my onboarding script, which is written in PowerShell. I've pieced together quite a bit just from reading questions in this community, but I'm now stuck trying to figure out how to properly translate the "send the CSV" portion of the curl. Here's how I'm writing the JSON, but if anyone has any experience with the "data" portion that would be terrific.

$json = [ordered]@{

    "requestJobDescription" = @{

            "type" = "update";

           "credentials" = @{

                    "partnerUserID" = $expensify_id;

                    "partnerUserSecret" = $expensify_secret;

            }

            "inputSettings" = @{

                    "type" = "employees";

                    "policyID" = "$policy_ID";

                    "fileType" = "csv";

            }

        };

    "data" = "C:\expensify.csv";

    } | ConvertTo-Json -Depth 5

Answers

Sign In or Register to comment.