Issues in user removal from policy via API

Options
Ashishxdsfdffg
Ashishxdsfdffg Expensify Customer Posts: 1

We are using Expensify API integration to remove users from a policy and it seems to somewhat work in that we get an appropriate user diff response and the users disappear from the policy in the website. But when we make an API call to get all employees under a policy, we still see the removed users.

These are the API calls we make -

To remove users from policy - as per  https://integrations.expensify.com/Integration-Server/doc/employeeUpdater.html#api-principles we send employee details with isTerminated flag true

data={
        "Employees":[
            { 
                "employeeID": "requestadmin@testrippling12.com", 
                "employeeEmail": "requestadmin@testrippling12.com",
                "policyID": "1234567ABCDEF", 
                "isTerminated": true
            }
]}

This does seem to remove the user from the policy on the website but when we try to get all employees in a policy by below API call, we can still see the removed user


API call payload format to get all users in a policy -

requestJobDescription={
    "type": "get",
    "credentials": ...,
    "inputSettings": {
        "type": "policy",
        "fields": ["employees"],
        "policyIDList": ["1234567ABCDEF"]
    }"

Is there some other way to just get the active employees? Is this the intended behavior of this API? To return all employees active/terminated?