Integrating Nfield with your own system(s) can significantly enhance your organization’s market research capabilities, and the Nfield API enables this to be a seamless experience. Here is everything developers need to know about Nfield integration via the Nfield API.
Essential preparation
Before diving into the integration process, let us start with a few basics that underpin successful integration.
- Understand REST API technology:
REST (Representational State Transfer) is an architectural style that uses HTTP requests for communication. The Nfield API is built on this technology, so understanding how REST APIs work is crucial. Check out this introduction to REST APIs to get up to speed. - Learn how your researchers are using Nfield Manager:
Nfield Manager is the interface through which researchers instruct the Nfield platform. To provide the integration capability these people need, you need to get to know how they work with Nfield Manager. Observing and discussing their workflow will provide you with essential insights into the tasks you need to automate and the endpoints you need to connect. - Check out the Nfield API help page:
Region-specific Nfield API help pages provide detailed documentation on endpoints, authentication methods, request formats, and more. Be sure to refer to the correct help page for your region:
Your region | Nfield API help page |
Asia Pacific | https://apiap.nfieldmr.com |
America | https://apiam.nfieldmr.com |
China | https://apicn.nfieldcn.com |
Europe | https://api.nfieldmr.com |
Starting the integration process
Here’s how to initiate your Nfield API integration process by setting up authentication and understanding key endpoints.
- Authentication:
There are two main methods for achieving this with the Nfield API:
Basic Token:
The easier, and more straightforward method is to use a basic token, which authenticates API requests by being included in the HTTP headers. You can also see a practical example in our video of automating quota progress reports with the Nfield API using Microsoft Power Automate.
Bearer Token:
The second method involves using OAuth 2.0 for authentication. This method is more complex but offers enhanced security features. You will need to obtain an access token through an OAuth flow, which will then be required in the header of your API requests. For more information, see What is Bearer Token and How it Works? - Endpoints:
The Nfield API is extensive and covers all the manual actions that can be performed in Nfield Manager. These include creating, updating, and managing surveys, managing respondent data, data collection processes, managing user accounts, and monitoring survey progress. Essentially, any task that can be done manually in Nfield Manager can be automated using the Nfield API. This comprehensive coverage enables full integration and automation of your organization’s market research processes.
For detailed specifications and a full list of available API endpoints, refer to the Nfield Help Page for your region, as shown in table above. - Making API calls:
Use HTTP methods such as GET, POST, PUT, PATCH and DELETE to interact with endpoints. Make sure your requests include the necessary headers – such as the Authorization header – with your access token and Content-Type header for JSON data.
Figure 1: An example in Postman for getting surveys from Europe region.
- Handling Responses:
The API will mostly return responses in JSON format, so you need to make sure your application is able to parse these. (A small percentage of endpoints will return responses as binary files.) Pay attention to the status codes to ensure both errors and successes are managed effectively.
Best practices for integration
Adhering to best practices will help make your integration more efficient and reliable.
- Start small:
Begin with basic API calls to familiarize yourself with endpoints and responses. For example, start by retrieving a list of surveys before moving on to more complex operations like creating or updating surveys. - Error handling:
Implement robust error handling in your integration to manage scenarios like expired tokens, invalid requests, or server errors. This will ensure your integration is resilient and can recover gracefully from any issues. - Testing:
Thoroughly test your integration in a development environment before deploying it to production. Use test surveys and respondents to ensure your API calls are functioning as expected without affecting live data. - Optimized data retrieval:
When downloading survey data, avoid downloading the entire dataset each time. Instead, implement logic to download only the differences (incremental updates) since the last download. This practice reduces the load on both your system and the Nfield API, ensuring efficient data transfer. - Respect API limits:
Avoid making unnecessary frequent API calls to prevent overloading the system. Follow Nfield’s acceptable use policy, which provides guidelines on optimal API usage and rate limiting. Adhering to these guidelines ensures fair usage and system stability for all users.
Documentation and support
To stay updated and efficiently resolve issues, make effective use of available documentation and support resources.
- Regular updates:
Make sure you stay informed about system updates, new features, and changes to the Nfield API. Ask your domain administrator to set up an email auto-forward from Nfield’s update notifications. This will keep you up to date on the latest developments and ensure you do not miss any essential information. - Keep the Nfield API help page to hand:
Regularly refer to the Nfield API help page for updates and clarifications. It is a vital resource for understanding the endpoints, request formats, and best practices. - Utilize support resources:
Take advantage of the various support resources provided by Nfield, such as reach out to technical support and view Academy session recordings. These resources provide valuable assistance and insights from other developers and Nfield experts. Also an Nfield SDK has been created by Nfield users on Github.
Conclusion
Integrating Nfield with your system via the Nfield API can streamline your market research operations and provide valuable data insights.
By preparing adequately, understanding the API’s fundamentals, and following best practices, you can ensure your integration is a success.
Make the most of Nfield’s capabilities by leveraging all available resources, such as Nfield API manuals and your own researchers’ expertise.
Enhance your integration’s efficiency and performance by adopting optimized data retrieval methods and respecting API usage policies.
Stay up to date on system changes to continue getting the absolute best out of Nfield.