/
var
/
www
/
html
/
sugardemo
/
include
/
api
/
help
/
Upload File
HOME
<!-- /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ --> <h2>Overview</h2> <span class="lead"> Update a record of the specified type. </span> <h2>Request Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td> <record field> </td> <td> <record field type> </td> <td> The name value list of fields to populate. </td> <td> True </td> </tr> </tbody> </table> <h3>Request</h3> <pre class="pre-scrollable"> { "name":"New Account Name", "phone_office":"(555) 888-5555", "website":"www.newsite.com", "meetings": { { "add": ["21e3385e-404f-b470-407e-54044e3d8024"], "delete": ["21e3385e-404f-b470-407e-54044e3d8023"], "create": [ { "name": "Test Meeting" } ] } } </pre> <h3>Link fields</h3> <span class="lead"> It is possible to add or delete record relations to other records and create new related records. </span> <table class="table table-hover"> <thead> <tr> <th>Action</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>add</code> </td> <td> List </td> <td> List of related records ID. See <a onclick="openLongHelp('d929047c54d78ad96401be98aa699ccf');">RelateRecordApi</a> for details. </td> </tr> <tr> <td> <code>delete</code> </td> <td> List </td> <td> List of related records ID. </td> </tr> <tr> <td> <code>create</code> </td> <td> List </td> <td> List of name to value arrays of related records. </td> </tr> </tbody> </table> <h2>Response Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <record field> </td> <td> <record field type> </td> <td> Returns the fields for the updated record. </td> </tr> </tbody> </table> <h3>Response</h3> <pre class="pre-scrollable"> { "id":"f222265a-b755-da89-0bc7-512d09b800b6", "name":"New Account Name", "date_entered":"2013-02-26T19:12:00+00:00", "date_modified":"2013-02-27T22:49:00+00:00", "modified_user_id":"1", "modified_by_name":"Administrator", "created_by":"1", "created_by_name":"Administrator", "description":"", "img":"", "last_activity_date":"2013-02-26T19:12:00+00:00", "deleted":false, "assigned_user_id":"seed_sarah_id", "assigned_user_name":"Sarah Smith", "team_name":[ { "id":1, "name":"Global", "name_2":"", "primary":false }, { "id":"West", "name":"West", "name_2":"", "primary":true } ], "linkedin":"", "facebook":"", "twitter":"", "googleplus":"", "account_type":"Customer", "industry":"Hospitality", "annual_revenue":"", "phone_fax":"", "billing_address_street":"9 IBM Path", "billing_address_street_2":"", "billing_address_street_3":"", "billing_address_street_4":"", "billing_address_city":"San Francisco", "billing_address_state":"CA", "billing_address_postalcode":"43635", "billing_address_country":"USA", "rating":"", "phone_office":"(555) 888-5555", "phone_alternate":"", "website":"www.newsite.com", "ownership":"", "employees":"", "ticker_symbol":"", "shipping_address_street":"9 IBM Path", "shipping_address_street_2":"", "shipping_address_street_3":"", "shipping_address_street_4":"", "shipping_address_city":"San Francisco", "shipping_address_state":"CA", "shipping_address_postalcode":"43635", "shipping_address_country":"USA", "email1":"kid86@example.net", "parent_id":"", "sic_code":"", "parent_name":"", "email_opt_out":false, "invalid_email":false, "email":[ { "email_address":"kid86@example.net", "opt_out":"0", "invalid_email":"0", "primary_address":"1" }, { "email_address":"the.dev@example.name", "opt_out":"0", "invalid_email":"0", "primary_address":"0" } ], "campaign_id":"", "campaign_name":"", "my_favorite":false, "_acl":{ "fields":{ } } } </pre> <h2>Change Log</h2> <table class="table table-hover"> <tr> <th>Version</th> <th>Change</th> </tr> <tr> <td> v10 </td> <td> Added <code>/<module>/:record</code> PUT endpoint. </td> </tr> </table>