{"_id":"55365baa86514f0d00bc2f96","editedParams":true,"__v":1,"user":"55356ede6040a20d00454508","version":{"_id":"553591cd63cc650d00312925","project":"55357364e02d480d0003c6d3","__v":13,"forked_from":"55357365e02d480d0003c6d6","createdAt":"2015-04-20T23:54:53.134Z","releaseDate":"2015-04-20T23:54:53.134Z","categories":["553591cd63cc650d00312926","553591cd63cc650d00312927","5536e4d39f7f2d0d00b1cd54","5536e55c20d5ca0d0001580a","5536e6bf7fe60f0d000fd1c0","5536f5bba171250d00c00556","553a974369c2630d00a8562e","553a97c60074c80d00621c2a","553a98332af5f20d000fc32a","553a9b9869c2630d00a85642","556e0f23d02e0b190042f13d","563249b1dcc27a1700823650","5639113f049e420d00476b03","59a5dd94aaa11d003334edb4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"category":{"_id":"553591cd63cc650d00312927","pages":["553591ce63cc650d00312928","553594c963cc650d00312931","5535985e63cc650d00312936","55365baa86514f0d00bc2f96","5536daf0a519b10d001f7df8","5536db65c16ee70d007568a8","5536dc26c16ee70d007568ac","5536de1453b6430d0042dfeb","5536e535bbb4a70d00a53529","553ab2a336d0100d004b35b1","554172c94841af0d00b4234f"],"version":"553591cd63cc650d00312925","__v":11,"project":"55357364e02d480d0003c6d3","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-20T23:52:42.707Z","from_sync":false,"order":1,"slug":"formz","title":"Formz"},"editedParams2":true,"project":"55357364e02d480d0003c6d3","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-04-21T14:16:10.058Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"patch","results":{"codes":[]},"settings":"","examples":{"codes":[{"name":"","code":"PATCH https://api.goformz.com/v2/formz/0596f81d-7b85-4ac2-8c10-30580c13b92a","language":"http"}]},"auth":"required","params":[{"_id":"55365baa86514f0d00bc2f97","ref":"","in":"path","required":true,"desc":"Id of the existing form to update","default":"","type":"string","name":"id"},{"_id":"55b95930e536930d00e360b9","ref":"","in":"body","required":true,"desc":"Form Object","default":"","type":"string","name":"body"}],"url":"/formz/:id"},"isReference":false,"order":3,"body":"PATCH allows for partial updates, this means you do not have to submit the entire form in the body of the PATCH request, only the relevant information that has changes.\n\nSample Request Body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"name\\\": \\\"My New Form Name \\\",   // Changes the name of the form\\n  \\\"fields\\\": {\\n    \\\"28b3af03-6ae2-4a1c-9b01-a46c0108d3c5\\\": { //  Referencing field by ID\\n      \\\"text\\\": \\\"some new text\\\"  // Updating the text on the Report Problem field\\n    },\\n    \\\"PO #\\\": { // Referencing by name instead of by ID\\n      \\\"value\\\": \\\"1223333\\\"  // Updating the PO # on the PO # field \\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Clearing Form Field Values\"\n}\n[/block]\nTo clear a value on a field, set it to `null`\n\nSample Clearing Value of a Textbox Field\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Fields\\\": {\\n\\t\\t\\\"Reported Problem\\\": null\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nSample Clearing Value of a Signature Field\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Fields\\\": {\\n\\t\\t\\\"Customer Signature\\\": null\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Assigning Formz\"\n}\n[/block]\nCurrently formz cannot be assigned or re-assigned an update (PATCH).  Formz can only be assigned upon creation (POST).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Changing the Status of a Form\"\n}\n[/block]\nThe status of a form cannot be changed via a PATCH request.  To change the status refer the documentation to <a href=\"http://developers.goformz.com/docs/complete-a-form\" alt=\"Complete a Form\">Complete a Form</a> or <a href=\"http://developers.goformz.com/docs/re-open-a-form\" alt=\"Re-open a Form\">Re-open a Form</a>.\n\n</br><a href=\"https://api.goformz.com/docs/api/explorer/index#!/Formz/Formz_Patch\" target=\"_blank\"><img src=\"https://files.readme.io/9Z82WIZnS7mZmco8oi4u_TryItNow3.png\" style=\"margin-left:15px\" width=\"128\" height=\"42\" ></a>","excerpt":"","slug":"update-an-existing-form","type":"endpoint","title":"Update an Existing Form"}

patchUpdate an Existing Form


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
string
Id of the existing form to update

Body Params

body:
required
string
Form Object

Examples


Documentation

PATCH allows for partial updates, this means you do not have to submit the entire form in the body of the PATCH request, only the relevant information that has changes. Sample Request Body: [block:code] { "codes": [ { "code": "{\n \"name\": \"My New Form Name \", // Changes the name of the form\n \"fields\": {\n \"28b3af03-6ae2-4a1c-9b01-a46c0108d3c5\": { // Referencing field by ID\n \"text\": \"some new text\" // Updating the text on the Report Problem field\n },\n \"PO #\": { // Referencing by name instead of by ID\n \"value\": \"1223333\" // Updating the PO # on the PO # field \n }\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Clearing Form Field Values" } [/block] To clear a value on a field, set it to `null` Sample Clearing Value of a Textbox Field [block:code] { "codes": [ { "code": "{\n\t\"Fields\": {\n\t\t\"Reported Problem\": null\n }\n}", "language": "json" } ] } [/block] Sample Clearing Value of a Signature Field [block:code] { "codes": [ { "code": "{\n\t\"Fields\": {\n\t\t\"Customer Signature\": null\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Assigning Formz" } [/block] Currently formz cannot be assigned or re-assigned an update (PATCH). Formz can only be assigned upon creation (POST). [block:api-header] { "type": "basic", "title": "Changing the Status of a Form" } [/block] The status of a form cannot be changed via a PATCH request. To change the status refer the documentation to <a href="http://developers.goformz.com/docs/complete-a-form" alt="Complete a Form">Complete a Form</a> or <a href="http://developers.goformz.com/docs/re-open-a-form" alt="Re-open a Form">Re-open a Form</a>. </br><a href="https://api.goformz.com/docs/api/explorer/index#!/Formz/Formz_Patch" target="_blank"><img src="https://files.readme.io/9Z82WIZnS7mZmco8oi4u_TryItNow3.png" style="margin-left:15px" width="128" height="42" ></a>