{"id":15028708,"url":"https://github.com/cyber-duck/pardot-api","last_synced_at":"2025-04-09T20:32:17.024Z","repository":{"id":33847194,"uuid":"153274191","full_name":"Cyber-Duck/Pardot-API","owner":"Cyber-Duck","description":"PHP package to interact with the Pardot API","archived":false,"fork":false,"pushed_at":"2023-09-08T08:28:51.000Z","size":61,"stargazers_count":14,"open_issues_count":2,"forks_count":25,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-23T22:25:08.851Z","etag":null,"topics":["pardot","pardot-api","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cyber-Duck.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-16T11:27:51.000Z","updated_at":"2023-09-08T08:27:15.000Z","dependencies_parsed_at":"2024-09-28T20:21:00.198Z","dependency_job_id":null,"html_url":"https://github.com/Cyber-Duck/Pardot-API","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":0.0714285714285714,"last_synced_commit":"b6c58139d14779e1452bf8632ee61a3af2989f20"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyber-Duck%2FPardot-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyber-Duck%2FPardot-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyber-Duck%2FPardot-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyber-Duck%2FPardot-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyber-Duck","download_url":"https://codeload.github.com/Cyber-Duck/Pardot-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107557,"owners_count":21048954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pardot","pardot-api","php"],"created_at":"2024-09-24T20:08:55.776Z","updated_at":"2025-04-09T20:32:17.000Z","avatar_url":"https://github.com/Cyber-Duck.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pardot-API\nPHP package to interact with the Pardot API\n\n[![Latest Stable Version](https://poser.pugx.org/cyber-duck/pardot-api/v/stable)](https://packagist.org/packages/cyber-duck/pardot-api)\n[![Latest Unstable Version](https://poser.pugx.org/cyber-duck/pardot-api/v/unstable)](https://packagist.org/packages/cyber-duck/pardot-api)\n[![Total Downloads](https://poser.pugx.org/cyber-duck/pardot-api/downloads)](https://packagist.org/packages/cyber-duck/pardot-api)\n[![License](https://poser.pugx.org/cyber-duck/pardot-api/license)](https://packagist.org/packages/cyber-duck/pardot-api)\n\nAuthor: [Andrew Mc Cormack](https://github.com/Andrew-Mc-Cormack)\n\n## Pardot API PHP Library\n\nA library to integrate with the Pardot API through PHP objects\n\nThis library simplifies the process of authentication and querying the Pardot API and provides access to all of the v4 API features. \n\nLatest Version 2.0.0 supports Salesforce SSO authentication.\n\n### Setup\n\nTo initalise the Pardot API object pass your user email, password, client id, client secret and business unit id credentials.\nAny subsequent request to fetch data from the API will automatically perform the authentication actions before trying to fetch data.\n\n```php\nuse CyberDuck\\PardotApi\\PardotApi;\n\n$pardot = new PardotApi(\n    'EMAIL',\n    'PASSWORD',\n    'CLIENT_ID',\n    'CLIENT_SECRET',\n    'BUSINESS_UNIT_ID',\n);\n```\n\n## Querying the API\n\nYou can call the query method on an any pardot object passing the object, operator, and data array (optional)\n\n```php\n$result = $pardot-\u003erequest('campaign', 'read/id/1');\n\n$result = $pardot-\u003erequest('campaign', 'query', ['created_after' =\u003e 'today']);\n```\n\n## Object Methods\n\nThe PardotApi instance has functions which correspond to the object types in Pardot to simplify calls to the API.\nWhen calling one of these functions a query object is returned (-\u003ecampaigns() returns a CampaignsQuery object).\nThese returned objects in turn have functions corresponding to different object actions such as query, create, update, insert, delete etc.\nThe full list of objects available are as follows:\n\n### Account methods\n\n```php\n$pardot-\u003eaccount()-\u003eread(); // retrieves current account information\n```\n\n### Campaign methods\n\n```php\n$pardot-\u003ecampaign()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003ecampaign()-\u003ecreate([...]); // creates an object using passed array data\n$pardot-\u003ecampaign()-\u003eread(1); // queries an object by ID\n$pardot-\u003ecampaign()-\u003eupdate(1, [...]); // updates an object by ID using passed array data \n```\n\n### Custom Fields methods\n\n```php\n$pardot-\u003ecustomField()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003ecustomField()-\u003ecreate([...]); // creates an object using passed array data\n$pardot-\u003ecustomField()-\u003eread(1); // queries an object by ID\n$pardot-\u003ecustomField()-\u003eupdate(1, [...]); // updates an object by ID using passed array data \n$pardot-\u003ecustomField()-\u003edelete(1); // deletes an object by ID\n```\n\n### Custom Redirects methods\n\n```php\n$pardot-\u003ecustomRedirect()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003ecustomRedirect()-\u003eread(1); // queries an object by ID\n```\n\n### Dynamic Content methods\n\n```php\n$pardot-\u003edynamicContent()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003edynamicContent()-\u003eread(1); // queries an object by ID\n```\n\n### Email Clicks methods\n\n```php\n$pardot-\u003eemailClick()-\u003equery([...]); // queries and returns a filtered list\n```\n\n### Email methods\n\n```php\n$pardot-\u003eemail()-\u003eread(1); // queries an object by ID\n$pardot-\u003eemail()-\u003estats(1); // Returns the statistical data for the list email \n$pardot-\u003eemail()-\u003esendToID(1, [...]); // Sends a 1 to 1 email to an ID using an array of email config / data\n$pardot-\u003eemail()-\u003esendToEmail('name@example.com', [...]); // Sends a 1 to 1 email to a email address an array of email config / data\n$pardot-\u003eemail()-\u003esend([...]); // send an email to a list of IDs\n```\n\n### Email Templates methods\n\n```php\n$pardot-\u003eemailTemplate()-\u003elistOneToOne(); // Returns a list of email templates used in 1 to 1 emails\n```\n\n### Forms methods\n\n```php\n$pardot-\u003eform()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003eform()-\u003eread(1); // queries an object by ID\n```\n\n### Lifecycle Histories methods\n\n```php\n$pardot-\u003elifecycleHistory()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003elifecycleHistory()-\u003eread(1); // queries an object by ID\n```\n\n### Lifecycle Stages methods\n\n```php\n$pardot-\u003elifecycleStage()-\u003equery([...]); // queries and returns a filtered list\n```\n\n### List Memberships methods\n\n```php\n// @todo\n```\n\n### Lists methods\n\n```php\n// @todo\n```\n\n### Opportunities methods\n\n```php\n// @todo\n```\n\n### Prospect Accounts methods\n\n```php\n// @todo\n```\n\n### Prospects methods\n\n```php\n// @todo\n```\n\n### Tag Objects methods\n\n```php\n$pardot-\u003etagObject()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003etagObject()-\u003eread(1); // queries an object by ID\n```\n\n### Tags methods\n\n```php\n$pardot-\u003etag()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003etag()-\u003eread(1); // queries an object by ID\n```\n\n### Users methods\n\n```php\n$pardot-\u003euser()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003euser()-\u003eread(1); // queries an object by ID\n$pardot-\u003euser()-\u003ereadByEmail('name@example.com'); // queries an object by email\n```\n\n### Visitor Activities methods\n\n```php\n// @todo\n```\n\n### Visitors methods\n\n```php\n$pardot-\u003evisitor()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003evisitor()-\u003eread(1); // queries an object by ID\n$pardot-\u003evisitor()-\u003eassign(1,2); // Assigns or reassigns the visitor by ID to a prospect ID.\n```\n\n### Visits methods\n\n```php\n$pardot-\u003evisit()-\u003equery([...]); // queries and returns a filtered list\n$pardot-\u003evisit()-\u003eread(1); // queries an object by ID\n```\n\n## Debugging\n\nError messages can be enabled by turning debugging on. Requests to the Pardot API will fail silently by default so as to prevent\nfatal application errors. Extra response checking should be conducted when implementing this library as most methods will return\nnull when there is an issue with the API query.\n\n```php\n$pardot-\u003esetDebug(true);\n```\n\n## Output Type\n\nYou can change the output type to full, simple, mobile, or bulk. Defaults to full.\n\n```php\n$pardot-\u003esetOuput('full');\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyber-duck%2Fpardot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyber-duck%2Fpardot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyber-duck%2Fpardot-api/lists"}