News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Using SCIM Api how can I replace the mobile phone number?
Tags: rest api
Sep 17, 2020 at 12:51am   •   2 replies  •  0 likes
Gary Weissenbacher
curl --request PATCH \  --url https://platform.devtest.ringcentral.com/scim/v2/Users/283100004 \  --header 'accept: application/json' \  --header 'authorization: Bearer xxx' \  --header 'content-type: application/json' \  --data '{"Operations":[{"op":"replace","path":"phoneNumbers/1/mobile","value":"+491713334445"}],"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"]}'

Above is my request, but it does not work because the path variable is set wrong.
As you know the phoneNumbers field is an array of objects, identified by the type. If I want to replace it with a different number, what does the patch operation have to look like?
"phoneNumbers": [ { "value": "+491713334445", "type": "mobile" } ]

2 Answers
answered on Sep 17, 2020 at 11:48pm  

Perfect, thank you. I could not find the correct syntax for the "path" value.


 0
answered on Sep 17, 2020 at 1:09pm  

Here is the sample body:

var body = {
      schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
      Operations:[
          {
            op:"replace",
            path: "phoneNumbers[type eq \"mobile\"].value",
            value: "+491713334445"
          }
        ]
      }



 1



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us