i

Please enable JavaScript to view this site.

PUT and PATCH methods are used to update a resource. The difference between them is that the PUT method impacts all the attributes of the resource and the PATCH method impacts one or more of those attributes.

 

They use the HTTP PUT and PATCH verbs respectively.

The url contains the collection name and id of the resource to be updated.

The new values of the resource attributes are specified in the request body, that is, the configuration declares a "body" clause.

In the PUT method, all the values for all resource attributes must be specified. On the other hand, in the PATCH method, only the values of the attributes that are to be updated must be specified.

There is no response body.

 

Example: Instance update with Id = 94 from the  "Account" form.

 

 PUT /forms/CRM_ACCOUNT/instances/94

 

The request body ("body" clause) contains:

 

 

{

  "cbIsPartner""false",

  "cdInstanceOwner""Guillermo Diaz",

  "CdStatus""Active",

  "cdType""1",

  "dsCompany""Tenaris",

  "dsDescription""",

  "dsHolding""TECHINT",

  "dsIndustry""Manufactures",

  "dsOwner""Guillermo Diaz",

  "dsSource""Referred",

  "flLogo""url",

  "idPartnerCompany""",

  "nuIdentifNumber""30-00000000-5",

  "qtAnnualRev""1500000000",

  "qtEmployee""1000",

  "qtScore""90",

  "lsAddress": [

    {

      "dsAddress""Della Paolera 333",

      "dsCity""buenos aires",

      "dsCountry""argentina",

      "dsState""buenos aires",

      "tpAddress""1"

    }

  ],

  "webSiteLine": [

    {

      "dsWebsite""www.tenaris.com",

      "tpWebsite""1"

    }

  ],

  "phoneLine": [

    {

      "tpPhone""1",

      "nrPhone""01137489236"

    }

  ],

  "eMailLine": [

    {

      "tpEmail""1",

      "dsEmail""info@tenaris.com"

    }

  ]

}

 

 

 PATCH /forms/CRMACCOUNT/instances/94

 

The request body ("body" clause) contains:

 

 

{

  "dsDescription""Steel company",

  "dsHolding""TECHINT Co",

  "dsIndustry""Manufactures"

}

Send us your comment
Share on Twitter Share on Linkedin Send by Email Print