We have recently added a custom integration with the New Zealand Government's business API, primarily to enable the searching of New Zealand Business Numbers (NZBNs) from within our forms.
This is achieved via a new component found in the Common Fields menu in our form builder, simply called NZBN. The NZBN field also allows you to search for and gain access to other details about companies registered in New Zealand.
Unlike other composite fields, the NZBN search does not show the user of the form the details associated with the searched company and only collects them as part of the field's JSON object. This allows the form designer to pick and choose which of the details are relevant for their form, and code separate fields to grab that data so it can be added to the template.
Basic details collected are as follows for an NZBN component with the field name nzbnSearch:
- Name of Company (nzbnSearch.EntityName)
- Search text (nzbnSearch.SearchText)
- Whether the company is registered or not (nzbnSearch.entityStatusDescription)
- The type of entity the company was registered as (nzbnSearch.entityTypeDescription)
- NZBN (nzbnSearch.nzbn)
The Form designer also has access to an entity details JSON string which contains data on some other important areas of the business, though the data may not exist for many of these fields, or for every company that is able to be searched through this component.
To access these details it is recommended that the Form Designer use script to pull out an example of the nzbnSearch.entity data using the JSON.parse function in a test form, to familiarise themselves with the data structure.
Comments
0 comments
Article is closed for comments.