This is some sample code which will help you get started using Nutshell's API in your PHP application. This repository contains:
- a lightweight JSON-RPC + CURL wrapper to ease making API calls and manage authentication and endpoint discovery
- several examples which use that class to perform certain tasks in Nutshell
Running the Examples
Once you've cloned the repository, and assuming PHP is in your path:
- set your Nutshell username and API key at the top of each PHP file in the
Using the API
NutshellApi class (in
NutshellApi.php) provides a lightweight JSON-RPC + CURL wrapper for the API which you can use for development. The class handles authentication and endpoint discovery. It should be instantiated once with a username and API key and, once instantiated, it should be reused for subsequent API calls.
See the API method list for a list of valid API methods.
Read the comments in
NutshellApi.php for additional information about the class, and open the example files to see how the
NutshellApi class is used.
NutshellApi class provides synchronous (blocking) API calls. It is possible to write an API class which provides asynchronous calls using the
id field specified in JSON-RPC.
This project is covered by the MIT software license.
Thanks to the community for nudging us to make this code compatible with Composer. While it's not meant to be a fully-supported SDK, you can use composer to quickly add this project to your own.
- On API keys and permissions: Authentication
create.php: Entities and Relationships
edit.php: Retrieving and Editing Entities
- API method list
- All API Docs
Nutshell is building modern CRM software around the needs of medium-sized companies. We’re working hard to deliver the future of business software: enterprise-level features with the ease-of-use found in popular web applications.
At Nutshell, mobile is in our DNA. We believe in designing software to be cross-platform from day one, with robust APIs and native user interfaces. Our iPhone and Android applications are built using this API.