Developer Guide
Updating Records

    Updating records in Magentrix is a HTTP POST operation. The data in the post operation must resemble the Entity being populated in terms of the field's appearance. The HTTP POST must use the following end-point:  

    https://<instance>.magentrixcloud.com/rest/2.0/edit?e={objectname}

    There are three parameters that need to be provided to the HTTP POST.
     
    e: This is the name of the entity being updated. For example, “Account”.
    data: This is the JSON representation of the record for the specified entity being updated. Note that the “Id” property is required for an update.
    fieldToNull: a list of comma-separated field names that you want to set to null. 
     
    Magentrix only updates the field values you provide; other fields are kept as their previous state. If you need to clear out values of certain fields (set them to NULL), you need to use "fieldsToNull" parameter.
     

    Here's an example of a request for updating an Account record:

    https://<instance>.magentrix.com/rest/2.0/edit?e=Account
       -H "Authorization: {token}"
       -H "Content-Type: application/json"


    Here's an example of the request body for updating an Account record:

    data=
    { 
        "Id":"00200000000001F0001",
        "Name":"Test from JSON", 
        "BillingStreet":"The Landmark @ One Market"
    }
    


    Here's an example of the response body for updating fields in an Account record:

    ​{
       "Id":"00200000000001F0001",
       "Errors":[],
       "HasError":false
    }