2 Replies Latest reply on May 25, 2016 9:45 AM by jima92119

    How do I use the rest api to add a users mobile phone number

    jima92119

      Hello - I'm new to REST and JSON, but so far I've been reasonably successful working with the API to navigate through a list of users and update their current manager.  I've been doing this in powershell and  now I need to update those users in bulk with their company phones.  I am attempting to use the API format for phoneNumbers with values similar to the format below, but I get an error "Missing User Name".  I am using the tool POSTMAN to formulate the body of the message before I go to powershell, but I cannot seem to build it correctly.   Once I get POSTMAN working, I will use the "invoke-restmethod" in powershell, using basic authentication.  That has been successful for me to date, but now I am stuck!  Any advice would be appreciated.

       

      PUT  http://myURI/api/core/v3/people/{personid}

       

      JSON

      {

        "jive" : {

          "username" : "someuser@domain.com",

        },

        "phoneNumbers" : [ {

          "value" : "503.972.6655",

          "jive_label" : "Mobile Phone Number",

          "primary" : true,

           "type" : "mobile"

        } ]

      }