Core API methods revealed via web services
Methods revealed via web services.
Date fields in the API are either NULL or strings. Dates are accepted/returned in ATOM/rfc3339 format. Info on ATOM/rfc3339 here: http://en.wikipedia.org/wiki/Atom_(standard)#Date_formats http://tools.ietf.org/html/rfc3339
Public Member Functions | |
add ($num1, $num2) | |
For testing. More... | |
deleteAccount ($accountId, $rev) | |
Delete an account. More... | |
deleteActivity ($activityId, $rev) | |
Delete an activity. More... | |
deleteContact ($contactId, $rev) | |
Delete a contact. More... | |
deleteLead ($leadId, $rev) | |
Delete a lead. More... | |
deleteNote ($noteId, $rev) | |
Deletes the given note. More... | |
deleteProduct ($productId, $rev) | |
Delete a product. More... | |
deleteTask ($taskId, $rev) | |
Delete a task. More... | |
deleteTeam ($teamId, $rev) | |
Delete a team. More... | |
deleteUser ($userId, $rev) | |
Delete a user. More... | |
editAccount ($accountId, $rev, $account) | |
Edit an account. More... | |
editActivity ($activityId, $rev, $activity) | |
Edit an activity. More... | |
editContact ($contactId, $rev, $contact) | |
Edit a contact. More... | |
editLead ($leadId, $rev, $lead) | |
Edit a lead. More... | |
editNote ($noteId, $rev, $note) | |
Edits the given note (note that notes can only be edited for 24 hours by the note author) More... | |
editProduct ($productId, $rev, $product) | |
Edit a product. More... | |
editStep ($stepId, $rev, $step) | |
Update a process step. More... | |
editTask ($taskId, $rev, $task) | |
Edit a task. More... | |
editTeam ($teamId, $rev, $team) | |
Edit a team. More... | |
editUser ($userId, $rev, $user) | |
Edit a user. More... | |
findAccounts ( $query=null, $orderBy='name', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=true) | |
Find accounts matching a specified query. More... | |
findAccountTypes ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Get all active account types (to be applied to an account) More... | |
findActivities ( $query, $orderBy='name', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=true) | |
Find activities matching a specified query. More... | |
findActivityTypes ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Get all active activity types. More... | |
findAudiences ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Audiences. More... | |
findBackups () | |
List available and running backups. More... | |
findCompetitors ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Competitors. More... | |
findContacts ( $query=null, $orderBy='id', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=true) | |
Find contacts associated with a specified account or lead. More... | |
findCustomFields () | |
Gets all of the custom fields available for Leads, Accounts and Contacts, including appropriate meta-information. More... | |
findDelays ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Delays (seen in Step responses in availableDelayIds) More... | |
findIndustries ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Industries (to be applied to an account). More... | |
findLead_Outcomes ( $orderBy='description', $orderDirection='ASC', $limit=50, $page=1) | |
Get all possible outcomes for a closed lead. More... | |
findLeads ( $query, $orderBy='id', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=true) | |
Find leads matching a specified query. More... | |
findMarkets ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Markets. More... | |
findMilestones ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Get all active milestones. More... | |
findNotes ( $query=null, $orderBy='createdTime', $orderDirection='DESC', $limit=50, $page=1, $stubResponses=false) | |
Get all active notes. More... | |
findOrigins ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Origins. More... | |
findProcesses ($query) | |
Finds all processes associated with an entity. More... | |
findProducts ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=true) | |
Get all active products. More... | |
findSettings ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Return all publicly-visible settings. More... | |
findSources ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Sources. More... | |
findStagesets ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Get all active stagesets (this is the Nutshell API term for Pipelines) More... | |
findTags () | |
Get all active tags. More... | |
findTasks ( $query, $orderBy='due_time', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=false) | |
Returns an array containing tasks for the given query. More... | |
findTeams ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Returns stubs for all active Teams. More... | |
findTerritories ( $orderBy='name', $orderDirection='ASC', $limit=50, $page=1) | |
Get all territories. More... | |
findTimeline ( $query, $orderBy='time', $orderDirection='ASC', $limit=50, $page=1, $stubResponses=true) | |
Find timeline events (Activities, Emails and Notes) for an Entity. More... | |
findUsers ( $query=null, $orderBy='last_name', $orderDirection='ASC', $limit=50, $page=1) | |
Find users matching a specified query. More... | |
getAccount ($accountId, $rev=null) | |
Get the specified Account. More... | |
getActivity ($activityId, $rev=null) | |
Get the specified Activity. More... | |
getAnalyticsReport ( $reportType, $period, $filter=null, $options=null) | |
Returns graph data and overview information for various sales analytics reports. More... | |
getContact ($contactId, $rev=null) | |
Get the specified Contact. More... | |
getEmail ($emailId, $rev=null) | |
Get the specified Email. More... | |
getLead ($leadId, $rev=null) | |
Get the specified Lead by ID. More... | |
getNote ($noteId, $rev=null) | |
Get the specified Note. More... | |
getProduct ($productId, $rev=null) | |
Get all information for a Product (including full price list). More... | |
getTask ($taskId, $rev=null) | |
Get the specified Task. More... | |
getTeam ($teamId, $rev=null) | |
Get the specified Team. More... | |
getUpdateTimes () | |
Gets the last-updated times of each of the provisioning bins. More... | |
getUser ($userId=null, $rev=null) | |
Get all info about a User. More... | |
instanceData () | |
Return data related to authenticated Nutshell instance. More... | |
newAccount ($account) | |
Create a new Account. More... | |
newActivity ($activity) | |
Create a new Activity. More... | |
newBackup () | |
Initiate downloadable backup. More... | |
newContact ($contact) | |
Create a new Contact. More... | |
newEmail ($emailString, $createContacts=true) | |
Saves the given e-mail message. More... | |
newLead ($lead) | |
Create a new Lead. More... | |
newNote ($entity, $note) | |
Adds the note to the given entity. More... | |
newProduct ($product) | |
Create a new Product. More... | |
newSource ($name) | |
Given a source name, fetches an existing source or creates a new one if it does not exist. More... | |
newTag ($tag) | |
Create a new Tag. More... | |
newTask ($task) | |
Create a new Task. More... | |
newTeam ($team) | |
Create a new Team. More... | |
newUser ($user) | |
Create a new User. More... | |
searchAccounts ($string, $limit=10) | |
Return a list of Account stubs matching a given search string. More... | |
searchActivityParticipants ($string, $limit=10) | |
Return a list of stubs matching a given search string for all entities that could be participants in an Activity. More... | |
searchByEmail ($emailAddressString) | |
Works just like searchUniversal(), but only searches by email address. More... | |
searchCompetitors ($string, $limit=10) | |
Return a list of Competitor stubs matching a given search string. More... | |
searchContacts ($string, $limit=10) | |
Return a list of Contact stubs matching a given search string. More... | |
searchContactsAndUsers ($string, $limit=10) | |
Return a list of Contact and User stubs matching a given search string. More... | |
searchLeads ($string, $limit=40) | |
Return a list of Lead stubs matching a given search string. More... | |
searchMentionableEntities ( $string, $entityType, $entityId, $knownLocalEntities, $limit=10) | |
Returns an array of mentionable entities matching the $string, but excluding any that the client already knows about, as indicated by $knownLocalResults. More... | |
searchProducts ($string, $limit=10) | |
Return a list of Product stubs matching a given search string. More... | |
searchSources ($string, $limit=10) | |
Return a list of Source stubs matching a given search string. More... | |
searchUniversal ($string) | |
Return a list of Contact, Lead, and Account stubs matching a given search string. More... | |
searchUsersAndTeams ($string, $limit=10) | |
Return a list of User and Team stubs matching a given search string. More... | |
add | ( | $num1, | |
$num2 | |||
) |
deleteAccount | ( | $accountId, | |
$rev | |||
) |
Delete an account.
int | $accountId | account ID to delete |
string | $rev |
deleteActivity | ( | $activityId, | |
$rev | |||
) |
Delete an activity.
int | $activityId | activity ID to delete |
string | $rev |
deleteContact | ( | $contactId, | |
$rev | |||
) |
Delete a contact.
int | $contactId | contact ID to delete |
string | $rev |
deleteLead | ( | $leadId, | |
$rev | |||
) |
deleteNote | ( | $noteId, | |
$rev | |||
) |
Deletes the given note.
int | $noteId | The note ID to delete. |
string | $rev | The note's revision. |
deleteProduct | ( | $productId, | |
$rev | |||
) |
Delete a product.
int | $productId | product ID to delete |
string | $rev |
deleteTask | ( | $taskId, | |
$rev | |||
) |
deleteTeam | ( | $teamId, | |
$rev | |||
) |
deleteUser | ( | $userId, | |
$rev | |||
) |
editAccount | ( | $accountId, | |
$rev, | |||
$account | |||
) |
Edit an account.
Fields which allow multiples (phone, email, URL, etc.) will be completely replaced by whatever data you supply, if you supply any data for the field. (Eg. the new phone array replaces all previously known phone numbers.) If you are updating a multi-value field, you must include all values you wish to keep (not just the new values) for the field.
If a note is specified, it will be added to the existing notes (preexisting notes are not affected).
Tags can be edited as well – the specified array of tags will replace all existing tags, so you should retrieve and include existing tags if you only want to add a new one. Note that the tags must already exist (see newTag() )
You can upload files to the account by adding sparse objects to the "file" property. See https://developers.nutshell.com/#files for more information on uploading and downloading files
int | $accountId | account ID to edit |
string | $rev | |
array | $account | Updated account information |
editActivity | ( | $activityId, | |
$rev, | |||
$activity | |||
) |
Edit an activity.
These fields can be edited with this method:
All fields are optional. Any parameters which are not included in the API request will be left untouched.
Participants specified here will replace all curently existing ones; if you include a 'participants' key, you must include any existing participants you'd like to keep. If you don't include a 'participants' key, the activity's participants will not be modified.
An activity is logged by setting 'status' to 1 and optionally including a logNote. The log note can contain any number of mentions, as described at Note::_render.
Possible values for the status field:
int | $activityId | activity ID to edit |
string | $rev | |
array | $activity | updated activity information |
editContact | ( | $contactId, | |
$rev, | |||
$contact | |||
) |
Edit a contact.
Fields which allow multiples (phone, email, URL, etc.) will be completely replaced by whatever data you supply, if you supply any data for the field. (Eg. the new phone array replaces all previously known phone numbers.) If you are updating a multi-value field, you must include all values you wish to keep (not just the new values) for the field.
If a note is specified, it will be added to the existing notes (preexisting notes are not affected).
Tags can be edited as well – the specified array of tags will replace all existing tags, so you should retrieve and include existing tags if you only want to add a new one. Note that the tags must already exist (see newTag() )
Note that if an e-mail address is modified, added, or removed, then the 'lastContactedDate' and the 'contactedCount' values in the returned contact may be inaccurate.
You can upload files to the contact by adding sparse objects to the "file" property. See https://developers.nutshell.com/#files for more information on uploading and downloading files
int | $contactId | the contact ID to update |
string | $rev | |
array | $contact | the updated contact information |
editLead | ( | $leadId, | |
$rev, | |||
$lead | |||
) |
Edit a lead.
Also used for adding, deleting, and editing related entities.
The assignee specified here will replace the existing one.
Similarly, specifying any related entity (e.g. a product or contact) via the applicable key will replace all existing relationships. Adding a related entity is done by appending the new relationship to the end of the list, and deletion is possible by removing the relationship from the list.
Tags can be edited as well – the specified array of tags will replace all existing tags, so you should retrieve and include existing tags if you only want to add a new one. Note that the tags must already exist (see newTag() )
A note specified here will be added to the preexisting notes. You cannot remove notes.
Possible values for the competitor->status field:
Any values to be updated should be specified in an array like the following (all fields are optional):
Leads can be closed by specifying an outcome and optionally a closing value and closing time. API clients should use the findLead_Outcomes() to retrieve a list of possible outcomes.
To set the lead as pending, pass a true value as isPending.
Multiple outcomes of the same type can be configured company-wide in the Nutshell Setup interface. Outcome types:
To reopen a lead, set the status to 0
To change the stage a lead is in, pass in the ID of the milestone to move the lead to. (NOTE: milestone
is the Nutshell API term for a stage) All milestones can be retrieved with the findMilestones()
method.
To change the pipeline a lead is in, pass in the ID of the stageset to move the lead to. (NOTE: stageset
is the Nutshell API term for a pipeline) All pipelines can be retrieved with the findStagesets()
method.
To specify the lead as hot
, set the priority to 1
You can upload files to the lead by adding sparse objects to the "file" property. See https://developers.nutshell.com/#files for more information on uploading and downloading files
int | $leadId | lead ID to update |
string | $rev | |
array | $lead | new lead information |
editNote | ( | $noteId, | |
$rev, | |||
$note | |||
) |
Edits the given note (note that notes can only be edited for 24 hours by the note author)
int | $noteId | The note ID to delete. |
string | $rev | The note's revision. |
mixed | $note | A simple string, or (for future compatibility), the note array containing the entityType "Notes" and "note" key containing the note's text. The string may contain any number of mentions. See Note::_render for more information. |
editProduct | ( | $productId, | |
$rev, | |||
$product | |||
) |
Edit a product.
The name field is required. Products must have a price set for each market to be available for that market. The parameter "sku" and "unit" are dependent on "type" (product or service respectively).
int | $productId | product ID to update |
string | $rev | |
array | $product | new product information |
editStep | ( | $stepId, | |
$rev, | |||
$step | |||
) |
Update a process step.
All fields (of the step) are optional. Any values which are not included in the API request will be left untouched.
The following fields can be edited with this method:
Possible values for the status field:
Sample input for the step paramater:
int | $stepId | step ID to update |
string | $rev | |
array | $step | updates step information |
editTask | ( | $taskId, | |
$rev, | |||
$task | |||
) |
editTeam | ( | $teamId, | |
$rev, | |||
$team | |||
) |
editUser | ( | $userId, | |
$rev, | |||
$user | |||
) |
Edit a user.
Fields which allow multiples ("emails" and "teams") will be completely replaced by whatever data you supply, if you supply any data for the field. (Eg. the teams array replaces all previously known team memberships.) If you are updating these fields, you must include all values you wish to keep (not just the new values) for the field.
int | $userId | the user ID to update |
string | $rev | |
array | $user | the updated user information |
findAccounts | ( | $query = null , |
|
$orderBy = 'name' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = true |
|||
) |
Find accounts matching a specified query.
Currently implemented query keys:
Example query:
array | $query | query keys and values |
string | $orderBy | |
string | $orderDirection | |
int | $limit | (max 100) |
int | $page | |
bool | $stubResponses | whether to return stub responses instead of full responses (default true) |
findAccountTypes | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Get all active account types (to be applied to an account)
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findActivities | ( | $query, | |
$orderBy = 'name' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = true |
|||
) |
Find activities matching a specified query.
Currently implemented query keys:
Possible values for the "status" key:
Example queries:
array | $query | query keys and values |
string | $orderBy | |
string | $orderDirection | |
int | $limit | (max 100) |
int | $page | |
bool | $stubResponses | whether to return stub responses instead of full responses (default true) |
findActivityTypes | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Get all active activity types.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findAudiences | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Audiences.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findBackups | ( | ) |
findCompetitors | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Competitors.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findContacts | ( | $query = null , |
|
$orderBy = 'id' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = true |
|||
) |
Find contacts associated with a specified account or lead.
Query parameters:
Order by choices:
Example query:
array | $query | query keys and values |
string | $orderBy | |
string | $orderDirection | |
int | $limit | (max 100) |
int | $page | |
bool | $stubResponses | whether to return stub responses instead of full responses (default true) |
findCustomFields | ( | ) |
Gets all of the custom fields available for Leads, Accounts and Contacts, including appropriate meta-information.
findDelays | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
findIndustries | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Industries (to be applied to an account).
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findLead_Outcomes | ( | $orderBy = 'description' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Get all possible outcomes for a closed lead.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findLeads | ( | $query, | |
$orderBy = 'id' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = true |
|||
) |
Find leads matching a specified query.
Example query:
These parameters are ANDed in the query. For parameters which accept multiple values, the values are ORed together.
If you use the 'filter' parameter, the only other parameter allowed is 'status'.
Possible comparison operators for the 'dueTime' and 'modifiedTime' comparison are '<', '>', '=', '<=', '>='
array | $query | query keys and values. |
string | $orderBy | |
string | $orderDirection | |
int | $limit | (max 100 for non-stub responses) |
int | $page | |
bool | $stubResponses | whether to return stub responses instead of full responses (default true) |
findMarkets | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Markets.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findMilestones | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Get all active milestones.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findNotes | ( | $query = null , |
|
$orderBy = 'createdTime' , |
|||
$orderDirection = 'DESC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = false |
|||
) |
Get all active notes.
Currently implemented query keys:
Example queries:
array | $query | query keys and values |
string | $orderBy | default to createdTime |
string | $orderDirection | default to descending |
int | $limit | |
int | $page | |
bool | $stubResponses | whether to return Note stubs instead of full Note objects. Defaults to false. |
findOrigins | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Origins.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findProcesses | ( | $query | ) |
Finds all processes associated with an entity.
Example:
array | $query | The query for the find operation. Requires an 'entity' field with 'entityType' and 'id' properties, and no other options are currently supported. |
findProducts | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = true |
|||
) |
findSettings | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Return all publicly-visible settings.
If currently impersonating a user, the values for settings that have been set for that user will override the global values.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findSources | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Sources.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findStagesets | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Get all active stagesets (this is the Nutshell API term for Pipelines)
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findTags | ( | ) |
Get all active tags.
Tags can be added to leads, accounts, and contacts via their respective edit methods
findTasks | ( | $query, | |
$orderBy = 'due_time' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = false |
|||
) |
Returns an array containing tasks for the given query.
At least one parameter required. These parameters are ANDed in the query.
array | $query | query keys and values. |
string | $orderBy | |
string | $orderDirection | |
int | $limit | (max 100) |
int | $page | |
bool | $stubResponses | whether to return stub responses instead of full responses (default false) |
findTeams | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Returns stubs for all active Teams.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findTerritories | ( | $orderBy = 'name' , |
|
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
Get all territories.
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page |
findTimeline | ( | $query, | |
$orderBy = 'time' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 , |
|||
$stubResponses = true |
|||
) |
Find timeline events (Activities, Emails and Notes) for an Entity.
Example query:
array | $query | query keys and values |
string | $orderBy | |
string | $orderDirection | |
int | $limit | |
int | $page | |
bool | $stubResponses | whether to return stub responses instead of full responses (default true) |
findUsers | ( | $query = null , |
|
$orderBy = 'last_name' , |
|||
$orderDirection = 'ASC' , |
|||
$limit = 50 , |
|||
$page = 1 |
|||
) |
getAccount | ( | $accountId, | |
$rev = null |
|||
) |
getActivity | ( | $activityId, | |
$rev = null |
|||
) |
getAnalyticsReport | ( | $reportType, | |
$period, | |||
$filter = null , |
|||
$options = null |
|||
) |
Returns graph data and overview information for various sales analytics reports.
These are the reports that are visible on the home page of the Reports tab. User impersonation must be enabled for reports to be generated.
Valid reportType strings:
Valid period strings:
The filter is an optional array of entity dictionaries (entityName and entityId). Valid entityNames:
Some reportTypes may have specific options. For all types, a timezone can be specified.
Options:
string | $reportType | |
string | $period | |
array | $filter | (optional) |
array | $options | (optional) |
getContact | ( | $contactId, | |
$rev = null |
|||
) |
getEmail | ( | $emailId, | |
$rev = null |
|||
) |
getLead | ( | $leadId, | |
$rev = null |
|||
) |
Get the specified Lead by ID.
Note that a lead's ID is not always the same as the number shown when viewing the lead on the Nutshell website. Use the findLeads() method with the "number" query parameter to retrieve the lead corresponding to a number on the website.
int | $leadId | lead ID to get |
string | $rev |
getNote | ( | $noteId, | |
$rev = null |
|||
) |
getProduct | ( | $productId, | |
$rev = null |
|||
) |
getTask | ( | $taskId, | |
$rev = null |
|||
) |
getTeam | ( | $teamId, | |
$rev = null |
|||
) |
getUpdateTimes | ( | ) |
Gets the last-updated times of each of the provisioning bins.
Returns array mapping entityNames to date/times. Time stamp is NULL if never changed.
Provisioning bins:
As with all API methods, date/times are returned in ATOM/rfc3339 format.
getUser | ( | $userId = null , |
|
$rev = null |
|||
) |
instanceData | ( | ) |
Return data related to authenticated Nutshell instance.
Utilized by integration partners.
newAccount | ( | $account | ) |
Create a new Account.
All fields are technically optional (it is possible to create a nameless account with no useful information).
account parameter:
The "owner" field of account is optional and may be used to specify the ownership of the new entity. Both the entityType and id fields are required; either Users or Teams can be given ownership. If absent, the default owner is the creator.
array | $account | new account |
newActivity | ( | $activity | ) |
Create a new Activity.
The following fields are optional:
Possible values for the status field:
Example activity:
array | $activity | new activity |
newBackup | ( | ) |
newContact | ( | $contact | ) |
Create a new Contact.
No specific field is required, but you must include a name, phone number, or email address - Nutshell won't create a totally empty contact.
contact parameter:
The "name" field may be a string (as shown above), or it may be a more complex object to provide more detailed information:
The "owner" field of contact is optional and may be used to specify the ownership of the new entity. Both the entityType and id fields are required; either Users or Teams can be given ownership. If absent, the default owner is the creator.
array | $contact |
newEmail | ( | $emailString, | |
$createContacts = true |
|||
) |
Saves the given e-mail message.
Automatically creates contacts or pending users, unless createContacts is false.
string | $emailString | E-mail in RFC 822 format |
bool | $createContacts | If false, don't create contacts or pending users. |
newLead | ( | $lead | ) |
Create a new Lead.
All fields are technically optional (it is possible to create a nameless lead with no useful information). Even if you create an "empty" lead, the default sales process will be attached to it.
Leads are created as Open status unless isPending is set to true.
Leads with a priority of 1 will be considered hot
leads; default is 0, i.e. not hot
Possible values for the competitor->status field:
Sample new lead:
To specify the stage a lead will be in, pass in the ID of a milestone. (NOTE: milestone
is the Nutshell API term for a stage) All milestones can be retrieved with the findMilestones()
method.
To specify the pipeline a lead will be in, pass in the ID a the stageset. (NOTE: stageset
is the Nutshell API term for a pipeline) All pipelines can be retrieved with the findStagesets()
method.
array | $lead | new lead information |
newNote | ( | $entity, | |
$note | |||
) |
Adds the note to the given entity.
array | $entity | The entity array containing the entityType and id of the entity that is receiving the note. It will also accept the entity itself. Example: "entity": {
"entityType": "Leads",
"id": 42
}
|
mixed | $note | A simple string, or (for future compatibility), the note array containing the entityType "Notes" and "note" key containing the note's text. The string may contain any number of mentions. See Note::_render for more information. |
newProduct | ( | $product | ) |
Create a new Product.
The name field is required. Products must have a price set for each market to be available for that market. The parameter "sku" and "unit" are dependent on "type" (product or service respectively).
array | $product | Product example: "product": {
"name": "Mac Mini",
"type": 0, // 0 = product, 1 = service
"sku": "MM0123",
"prices": [ // only one price per market
{"marketId": 1, "amount": 299},
{"marketId": 2, "amount": 349}
]
}
Service example: "product": {
"name": "Consulting",
"type": 1, // 0 = product, 1 = service
"unit": "hour",
"prices": [ // only one price per market
{"marketId": 1, "amount": 100},
{"marketId": 2, "amount": 130}
]
}
|
newSource | ( | $name | ) |
Given a source name, fetches an existing source or creates a new one if it does not exist.
string | $name | The name of the source to be added. |
newTag | ( | $tag | ) |
newTask | ( | $task | ) |
Create a new Task.
The title field is required. Use the entity attribute to attach the task to a specific company or person.
array | $task | Task example: "task": {
"title": "Send product sheet",
"description": "Notes for this task",
"dueTime": "2013-01-11T15:23:19-05:00",
"assignee": {
"entityType": "Users",
"id": 12
},
"entity": {
"entityType": "Accounts",
"id": 1
}
}
|
newTeam | ( | $team | ) |
newUser | ( | $user | ) |
Create a new User.
user parameter:
Team parameter keys:
The optional "sendInvite" parameter will trigger a welcome email to the user's first email address. Defaults to false.
array | $user |
searchAccounts | ( | $string, | |
$limit = 10 |
|||
) |
searchActivityParticipants | ( | $string, | |
$limit = 10 |
|||
) |
Return a list of stubs matching a given search string for all entities that could be participants in an Activity.
The results are not organized by type; use the 'entityType' field of each stub returned if you need to sort by type.
string | $string | Query |
int | $limit | (optional) max number of results; defaults to 10 |
searchByEmail | ( | $emailAddressString | ) |
Works just like searchUniversal(), but only searches by email address.
Will return up to 5 account or contact stubs with the specified email address. Results are organized by entity type.
string | $emailAddressString | Query |
searchCompetitors | ( | $string, | |
$limit = 10 |
|||
) |
Return a list of Competitor stubs matching a given search string.
string | $string | Query |
int | $limit |
searchContacts | ( | $string, | |
$limit = 10 |
|||
) |
searchContactsAndUsers | ( | $string, | |
$limit = 10 |
|||
) |
searchLeads | ( | $string, | |
$limit = 40 |
|||
) |
searchMentionableEntities | ( | $string, | |
$entityType, | |||
$entityId, | |||
$knownLocalEntities, | |||
$limit = 10 |
|||
) |
Returns an array of mentionable entities matching the $string, but excluding any that the client already knows about, as indicated by $knownLocalResults.
string | $string | The query string to search for |
string | $entityType | The type of the contextual entity |
int | $entityId | The id of the contextual entity |
array | $knownLocalEntities | An array of objects containing at least the entityType-id pair that represents any locally cached results that should not be returned. DISCLAIMER: Currently not respected. |
int | $limit |
searchProducts | ( | $string, | |
$limit = 10 |
|||
) |
searchSources | ( | $string, | |
$limit = 10 |
|||
) |
searchUniversal | ( | $string | ) |