Skip to main content

NYL Postman API Testing Setup & Tests

AgentTermination Request Test

*  These tests require an authorization token.  Please refer to the general Postman API instructions if needed.

  1. It is referred to test with an account that is set up like NYL from the hub (Ask Peter, Michael or Royce for assistance) 

  2. Run the NYL Interceptor in Visual Studio and Utopia (Atlantis will replace Utopia eventually) 

  3. Add 2 profile items called NYLID and Marketer ID and add it to a profile 

  4. The folder structure needs to be set up with a drawer of agents from a certain region, then a folder with the agent's name, and two subfolders of Clients and Prospects 
     

  5. Set up or edit a user and add the new profile and add in a number to both Marketer and NYL ID's (my example is 98765)

  6. You will need the following database ID's

    • Account ID:  Find it in User Sessions URL
    • Profile Items ID's for Marketer ID: found in the URL of the profile item itself
    • NYLID: found in the URL of the profile item itself 
  7. When an agent terminates from their system, they will emails us a marketer ID and email address. If they exist, it will locate Marketer ID, then we set purge governance 6 months from now on the agent's folder itself and applies to that item only.

  8. In Visual Studio, open the local.settings.json and change the marketer ID and NYL ID to the ID's for your profile items. 

  1. Also change the environment URL if needed.  I tested in local so I changed it to my local environment: 
        "EnvironmentURL": "https://localhost:44334/", 

        "MarketerId": 397, 

        "NYLId": 395 

  1. Go to Postman API, and if needed, import the NYL Collection.json (Craig and Peter have copies or it can be found in a test plan ---Link coming soon)

  2. Go to the Agent Termination folder, and test in the appropriate environment. 

  3. In the you can tester with Marketer ID and NYL ID.  For now, we will test with NYL ID. The NYL ID number you enter is not the DB ID obtained in step #6, it is the value you entered in the profile item itself in step # 5.

  4. Send the request 

  5. Make sure status 200 is good is returned.  

  6. Make sure the response says something like this:

    image.png


  7. Return to Rubex and verify that a 6 month purge governance exists on the folder of the agent's name and applies to this item only. 

  8. Make sure that the subfolders and files are not inheriting the profile value 

Undo - AgentTermination Request Test

  1. Copy the body from the AgentTermination request and paste into the Undo -  AgentTermination Request  

  2. Send the request. 

  3. Open Rubex, and check the governance on the agent's name folder that you previously ran a termination request again. 

  4. The 6 Month Purge Governance should be deleted.