Skip to content

Latest commit

 

History

History
340 lines (226 loc) · 6.3 KB

README.md

File metadata and controls

340 lines (226 loc) · 6.3 KB

Pardot API Client

Circle CI

This is a node client wrapper for v3 of the Pardot API.

Table of Contents

Installation

npm install pardot

Use

In order to authenticate to the Pardot API you need to supply email password and userKey. The userKey can be found in your settings under API User Key.

var pardot = require('pardot');
pardot({
    email: '[email protected]',
    password: 'easy',
    userKey: 'abc123'
}).then(function(client) {

    // We've successfully authenticated.
    // Perform some action
    client.prospects.upsertByEmail('[email protected]', {
        first_name: 'Joe',
        last_name: 'Schmoe'
    });

}).fail(function(err) {
    // Failed to authenticate
})

All methods return a Q promise.

Entities

Campaigns

http://developer.pardot.com/kb/api-version-3/campaigns/

Accessed via client.campaigns.

query: function(params);
read: function(id, params);
update: function(id, params)
create: function(params)

Custom Fields

http://developer.pardot.com/kb/api-version-3/custom-fields/

Accessed via client.customFields.

query: function(params);
read: function(id);
update: function(id, params);
create: function(params);
delete: function(id);

Custom Redirects

http://developer.pardot.com/kb/api-version-3/custom-redirects/

Accessed via client.customRedirects.

query: function(params);
read: function(id);

Dynamic Content

http://developer.pardot.com/kb/api-version-3/dynamic-content/

Accessed via client.dynamicContent.

query: function(params);
read: function(id);

Email

http://developer.pardot.com/kb/api-version-3/emails/

Accessed via client.email.

read: function(id);
send: function(params);

Email Templates

http://developer.pardot.com/kb/api-version-3/email-templates/

Accessed via client.emailTemplates.

read: function(id);
listOneToOne: function();

Forms

http://developer.pardot.com/kb/api-version-3/forms/

Accessed via client.forms.

query: function(params);
read: function(id);

Lifecycle Histories

http://developer.pardot.com/kb/api-version-3/lifecycle-histories/

Accessed via client.lifecycleHistories.

query: function(params);
read: function(id);

Lifecycle Stages

http://developer.pardot.com/kb/api-version-3/lifecycle-stages/

Accessed via client.lifecycleStages.

query: function(params);
read: function(id);

Lists

http://developer.pardot.com/kb/api-version-3/lists/

Accessed via client.lists.

query: function(params);
read: function(id);
update: function(id, params);
create: function(params);
delete: function(id);

List Memberships

http://developer.pardot.com/kb/api-version-3/list-memberships/

Accessed via client.listMemberships.

query: function(params)
readById: function(id)
readByListIdAndProspectId: function(listId, prospectId)
create: function(listId, prospectId)
updateById: function(id, params)
updateByListIdAndProspectId: function(listId, prospectId, params)
deleteById: function(id)
deleteByListIdAndProspectId: function(listId, prospectId)

Opportunities

http://developer.pardot.com/kb/api-version-3/opportunities/

Accessed via client.opportunities.

query: function(params);
createByProspectEmail: function(prospectEmail, params);
createByProspectId: function(prospectId, params);
read: function(id);
delete: function(id);
undelete: function(id);

Prospects

http://developer.pardot.com/kb/api-version-3/prospects/

Accessed via client.prospects.

assignByEmail: function(email, params);
assignById: function(id, params);
unassignByEmail: function(email);
unassignById: function(id);
query: function(params);
create: function(email, params);
readById: function(id);
readByEmail: function(email);
updateById: function(id, params);
updateByEmail: function(email, params);
upsertByEmail: function(email, params);
upsertById: function(id, params);
deleteById: function(id);
deleteByEmail: function(email);

Prospect Accounts

http://developer.pardot.com/kb/api-version-3/prospect-accounts/

Accessed via client.opportunities.

query: function(params);
create: function(params);
describe: function();
read: function(id);
update: function(id, params);

Tags

http://developer.pardot.com/kb/api-version-3/tags/

Accessed via client.tags.

query: function(params);
read: function(id);

Tag Objects

http://developer.pardot.com/kb/api-version-3/tag-objects/

Accessed via client.tagObjects.

query: function(params);
read: function(id);
removed: function(id);

Users

http://developer.pardot.com/kb/api-version-3/users/

Accessed via client.users.

query: function(params);
readByEmail: function(email);
readById: function(id);

Visitors

http://developer.pardot.com/kb/api-version-3/visitors/

Accessed via client.visitors.

query: function(params);
assign: function(id, params);
read: function(id);

Visitor Activities

http://developer.pardot.com/kb/api-version-3/visitor-activities/

Accessed via client.visitorActivities.

query: function(params);
read: function(id);

Visits

http://developer.pardot.com/kb/api-version-3/visits/

Accessed via client.visits.

query: function(params);
read: function(id);