Foundation Data & Integrations
JSON REST API
PUT Request - Replacing content of existing records
3 min
put requests update an existing record to match completely the content of the sent message this differs to the patch requests, which allow the targeted update of a few specific fields example use cases for the two request types synchronise a record from an authoritative source (e g a supplier record from a hr system) to servicely ensuring that the state is exactly as in the source hr system use put update a changed contact number or email address from a crm system to servicely, but keep any information being tracked by servicely that the crm system does not have in place use patch url format single record the format to insert a single record is https //\[instance url]/v1/\[table name] docid\ gpi7eji4 59rvqto ilx2 example https //sandbox servicely ai/v1/incident https //sandbox servicely ai/v1/incident/8291a83ece8811ebb1870242ac14001a example reset user record any field which was not specified in the above request will be reset to an empty value system or managed fields will not be affected ➜ https put https //sandbox servicely ai/v1/user/c0a8011645fb1a608145fb3102b10000 \\ email="eric employee\@servicely ai" \\ firstname="erik" \\ lastname="employee" \\ name="erik employee" \\ email="eric employee\@servicely ai" \\ username="erik employee" http/1 1 200 ok content encoding gzip content length 331 content type application/json { "data" { "active" false, "createdby" "4028818a3b214291013b21504a000000", "createdon" "2020 01 01t14 44 24 853z", "email" "eric employee\@servicely ai", "firstname" "erik", "lastname" "employee", "lockedout" false, "name" "erik employee", "sid" "lboawmmfanx4v", "selectableforassignment" false, "selectableforrequests" false, "tableclass" "user", "updatedby" "4028818a3b214291013b21504a000000", "updatedon" "2021 06 16t11 53 24 309z", "username" "erik employee", "vip" false, "version" 18, "id" "c0a8011645fb1a608145fb3102b10000" } }