Tally Platform API
member-phone
Update Member Phone
1 min
code examples curl location globoff request put 'https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/phones/{memberphoneid}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "phonenumber" "1 414 111 1111" }'require "uri" require "json" require "net/http" url = uri("https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/phones/{memberphoneid}") https = net http new(url host, url port) https use ssl = true request = net http put new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "phonenumber" "1 414 111 1111" }) response = https request(request) puts response read body import requests import json url = "https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/phones/{memberphoneid}" payload = json dumps({ "phonenumber" "1 414 111 1111" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", url, headers=headers, data=payload) print(response text) okhttpclient client = new okhttpclient() newbuilder() build(); mediatype mediatype = mediatype parse("application/json"); requestbody body = requestbody create(mediatype, "{\n \\"phonenumber\\" \\"1 414 111 1111\\"\n}"); request request = new request builder() url("https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/phones/{memberphoneid}") method("put", body) addheader("accept", "application/json") addheader("content type", "application/json") build(); response response = client newcall(request) execute(); responses // success // bad request { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// unauthorized // forbidden // internal error