We are excited to announce the general availability of Autodesk Build Forms API. Using the newly released API, you can now create forms (both pdf and non-pdf forms) and update values of non-pdf forms.
The following three(3) endpoints are added:
- POST forms - creates pdf and non-pdf forms
- PATCH forms/:formId - updates attributes of form. Works with non-pdf forms
- PUT values:batch-update - updates custom and tabular values of a non-pdf form
When creating a form, the API allows you to optionally specify date and time indicating when form was created (userCreatedAt). This is used to track a creation date that is different from the time when the Forms server receives the create request. Such a case might occur when, for example, the user is working offline. A user may create a form in the Build mobile app while they don't have internet connection and the form is stored locally until it can be sent to the server at later time. Another use case might be when integrating with another system; when importing a form created originally in another system, they could set this to the time that the record was created in their system.
Assignee field of form can be set only when the template was configured as "Multiple contributors in Sequence". When creating or updating the form, you can assign to user/role/company of the contributor list. The id of user is Autodesk ID, while id for role/company is HQ ID.*1
PATCH forms has an field called submitterSignature. This is related to the new inReview status (released in March 28). It is a signature of the reviewer who submit the form. The corresponding field in response is lastSumitterSignature.
To update customValues, you specify the pair of field id and corresponding value attribute. e.g.,
- textVal is for value of text data type
- choiceVal is for dropdown with a single-select response*2
- arrayVal is for multiple-select response*2
- toggleVal for boolean
- Signatures can have both name and svgVal which is a base64 encoded SVG
tabularValues is tricky. In response of GET Form, the table rows are grouped separately in worklogEntries, materialsEntries, and equipmentEntries. To update the values, you would have to provide flattened rows with row ids and its table name. In each row, you input values in columns. In each column, their values in type. API will add/update the corresponding row and put them to the corresponding group.
API follows the permissions that has been configured with template. e.g. if a user has no manage permission, the API cannot create form on behalf of the API user. If the form is set as "Multiple contributors in Sequence", you cannot update values after the form has been assigned to somebody else.
Code Samples on GitHub
You can also find a related blog post about Forms read API here:
First Autodesk Construction Cloud (ACC) specific API - Forms API
If you have any questions and feedbacks, please contact us through our APS support channel.
*1) Admin API to get project members in ACC unified products is not available, yet. As a workaround, you may use Data Connector API. You can find more information here.
*2) currently there is a known issue of missing a method to get the possible values for choiceVal and arrayVal filed types. (FORMS-11458)