Partially update an existing Company record using PATCH.

This page explains the steps necessary to update and existing Company record using the PATCH method. The PATCH method is used for partially updating existing records in the database.

In order to do a PATCH (partial update of a record), using the WAPIC test page, you must include the following in the Request Header:


The PATCH method also requires the if-Match feature be included in the Request Header. An Example of the request header including the Authorization (username + : + password encoded in base64) is as follows:

Authorization:Basic Q2NvZnR4YXJlOkN2cmlvdXMz


Warning - These steps will update an existing company in the database. Use caution when testing this on a Live Database.

Data can be lost if not done properly.

  1. Perform a GET query using the following: https://localhost:5321/wapic/Companies
  2. Copy the contents of one company record in the JSON object that is returned and paste into the Request Body.
  3. Modify the text of fields that you would like to update.
  4. Note the value of the current ETag property which is located at the end of the company record.
  5. In the Request Header type the following: X-HTTP-Method-Override:PATCH.
  6. Press Enter and type: if-Match:
  7. Add the current Etag value next to if-Match: in the Request Header (ex: if-Match:1)
  8. Change the URL method to POST
  9. In the URL field of the test page, enter the url with the id and classtypeid of the company record you are updating in parens (ex:“https://localhost:5321/wapic/Companies(8400c2000)” )
  10. Enter the Control Username and Control Password.
  11. Click Submit.
  12. The response header should return a 200 OK message and the Response Body should return the JSON data of the record you updated with the ETag valud being incremented by 1.

Contributor: Steve Hendrix, Cyrious Software

Date: 2/12/2014

Version: Control 5.x

You could leave a comment if you were logged in.