{"id":18954472,"url":"https://github.com/crim/pardot-java-client","last_synced_at":"2025-04-16T08:30:19.811Z","repository":{"id":23918493,"uuid":"99991340","full_name":"Crim/pardot-java-client","owner":"Crim","description":"A Java Client for the Pardot API","archived":false,"fork":false,"pushed_at":"2024-07-27T11:31:02.000Z","size":703,"stargazers_count":22,"open_issues_count":11,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T05:22:29.631Z","etag":null,"topics":["api-client","marketing-api","marketing-automation","pardot","pardot-api","pardot-java-client"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Crim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"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":"2017-08-11T04:24:37.000Z","updated_at":"2024-11-01T15:26:18.000Z","dependencies_parsed_at":"2024-07-27T12:43:00.524Z","dependency_job_id":"eecc5267-56c1-4178-afda-9a751fc4ebae","html_url":"https://github.com/Crim/pardot-java-client","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crim%2Fpardot-java-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crim%2Fpardot-java-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crim%2Fpardot-java-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crim%2Fpardot-java-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crim","download_url":"https://codeload.github.com/Crim/pardot-java-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249220745,"owners_count":21232421,"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":["api-client","marketing-api","marketing-automation","pardot","pardot-api","pardot-java-client"],"created_at":"2024-11-08T13:45:05.888Z","updated_at":"2025-04-16T08:30:19.756Z","avatar_url":"https://github.com/Crim.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pardot Java API Client\n\n## What is it? \n\nThis library is a fluent style API client for Pardot's API (version 3 and 4).\n\n## Important Breaking Change to Pardot API\n\nFrom February 1, 2021 Pardot is removing the ability to authenticate to the Pardot API using your Pardot username, password, and userkey ([Salesforce EOL Notice](https://help.salesforce.com/articleView?id=000353746\u0026type=1\u0026mode=1\u0026language=en_US\u0026utm_source=techcomms\u0026utm_medium=email\u0026utm_campaign=eol)).\nThis means that versions of this library **prior to 3.0.0** will cease to be able to authenticate to the Pardot Api.\n\nEveryone is encouraged to update the library to version **3.0.0 or newer** and switch to using Salesforce SSO authentication prior to February 1, 2021. \nTo support Salesforce SSO authentication required backwards compatibility breaking changes to be made to this library, so please read the [2.x.x to 3.0.0 Migration Guide](3_0_0_migration_notes.MD) \nwhich details the changes required to upgrade.\n\n**Note** While most of Pardot's API is supported by this library, if there is a feature/end point that you\nneed that is not yet implemented, please read the **[How to Contribute](#how-to-contribute)** section, or **[Create an issue](https://github.com/Crim/pardot-java-client/issues)** \nrequesting it. \n\n**Note** Use this library at your own risk!  Currently there are no known issues, but as an **unofficial** library,\n there are no guarantees.  \n \n## How to use this library\n\nThis client library is released on Maven Central.  Add a new dependency to your project's POM file:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.darksci\u003c/groupId\u003e\n    \u003cartifactId\u003epardot-api-client\u003c/artifactId\u003e\n    \u003cversion\u003e4.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nExample Code using Salesforce SSO Authentication:\n```java\n/*\n * Create a new configuration object with your Salesforce SSO credentials.\n *\n * This configuration also allows you to define some optional details on your connection,\n * such as using an outbound proxy (authenticated or not).\n */\nfinal ConfigurationBuilder configuration = Configuration.newBuilder()\n    // This configures the client using the 'password' authentication flow.    \n    .withSsoLogin(\n        \"YourSalesforceUsername\",\n        \"YourSalesforcePassword\",\n        \"YourConnectedAppClientId\",\n        \"YourConnectedAppClientSecret\",\n        \"YourPardotBusinessUnitId\"\n    );\n\n/*\n * Alternatively, if you want to use the authorization_code authentication flow,\n * you can configure the client using a previously acquired refresh_token:\n */\nConfiguration.newBuilder()\n    // This configures the client using the 'authorization_code' authentication flow.    \n    .withSsoRefreshTokenLogin(\n        \"PreviousAcquiredRefreshTokenHere\",\n        \"YourConnectedAppClientId\",\n        \"YourConnectedAppClientSecret\",\n        \"YourPardotBusinessUnitId\"\n    );  \n\n/*\n * Optionally you can explicitly select which API version to use. If none is explicitly selected\n * the library will default to version 3, but the library will automatically upgrade to version\n * 4 if required to do so.\n */\nconfiguration.withApiVersion3();\n\n/* Or */\nconfiguration.withApiVersion4();\n\n/*\n * Create an instance of PardotClient, passing your configuration.\n */\nfinal PardotClient client = new PardotClient(configuration);\n\n/*\n * The client will automatically authenticate when you make your first request, no need to\n * explicitly login.\n *\n * Lets create a simple Account request, and execute it.\n */\nfinal AccountReadRequest accountReadRequest = new AccountReadRequest();\nfinal Account account = client.accountRead(accountReadRequest);\n\n/*\n * Or lets do a more complex Campaign search.\n */\nfinal CampaignQueryRequest campaignQueryRequest = new CampaignQueryRequest()\n    .withUpdatedAfter(DateParameter.last7Days())\n    .withIdLessThan(1234L)\n    .withSortById()\n    .withSortOrderDescending();\nfinal CampaignQueryResponse.Result campaignQueryResponse = client.campaignQuery(campaignQueryRequest);\n\n/*\n * And when you're done, call close on PardotClient.\n */\nclient.close();\n```\n\nOr Using the Try-With-Resources Pattern:\n```java\n/*\n * Since PardotClient implements Autoclosable, you can also use the try-with-resources pattern.\n */\ntry (final PardotClient client = new PardotClient(configuration)) {\n    // Use client instance as needed\n    client.accountRead(new AccountReadRequest());\n\n    // client.close() is automatically called at the end of the try {} block.\n}\n```\n\n## What Features are implemented?\n\n### Authentication\nOfficial Documentation: [Authentication](https://developer.pardot.com/kb/authentication/)\n\n- Authenticating with Pardot's API using your Salesforce SSO Username, Password, and Connected Application details. [See Example](src/main/java/com/darksci/pardot/api/Example.java#L37).\n- Authenticating with Pardot's API using a Salesforce SSO refresh_token and Connected Application details. [See Example](src/main/java/com/darksci/pardot/api/Example.java#L103).\n- Authenticating with Pardot's API using Salesforce SSO against Test / Sandbox orgs. [See Example](src/main/java/com/darksci/pardot/api/Example.java#L155).\n- Legacy authentication using your Pardot Username, Password, and User Token. [See Example](src/main/java/com/darksci/pardot/api/Example.java#L196). \n\n### Accounts\nOfficial Documentation: [Accounts](http://developer.pardot.com/kb/api-version-3/accounts/)\n\n- Read\n\n### Campaigns\nOfficial Documentation: [Campaigns](http://developer.pardot.com/kb/api-version-3/campaigns/)\n\n- Create\n- Query\n- Read\n- Update\n\n### Custom Fields\nOfficial Documentation: [Custom Fields](http://developer.pardot.com/kb/api-version-3/custom-fields/)\n\n- Create\n- Query\n- Read\n- Update\n\n### Custom Redirects\nOfficial Documentation: [Custom Redirects](http://developer.pardot.com/kb/api-version-3/custom-redirects/)\n\n- Query\n- Read\n\n### Dynamic Content\nOfficial Documentation: [Dynamic Content](http://developer.pardot.com/kb/api-version-3/dynamic-content/)\n\n- Query\n- Read\n\n### Emails\nOfficial Documentation: [Emails](http://developer.pardot.com/kb/api-version-3/emails/)\n\n- Read\n- Sending List Emails\n- Sending One to One Emails\n- Stats\n\n### Email Clicks\nOfficial Documentation: [Email Clicks](http://developer.pardot.com/kb/api-version-3/batch-email-clicks/)\n\n- Query\n\n### Email Templates\nOfficial Documentation: [Email Templates](http://developer.pardot.com/kb/api-version-3/email-templates/)\n\n- List One to One templates\n- Read\n\n### Forms\nOfficial Documentation: [Forms](http://developer.pardot.com/kb/api-version-3/forms/)\n\n- Create\n- Delete\n- Query\n- Read\n- Update\n\n### Lists\nOfficial Documentation: [Lists](http://developer.pardot.com/kb/api-version-3/lists/)\n\n- Create\n- Query\n- Read\n- Update\n\n### List Memberships\nOfficial Documentation: [ListMemberships](http://developer.pardot.com/kb/api-version-3/list-memberships/)\n\n- Create\n- Query\n- Read\n- Update\n\n### Opportunities\nOfficial Documentation: [Opportunities](http://developer.pardot.com/kb/api-version-3/opportunities/)\n\n- Create\n- Delete\n- Query\n- Read\n- Undelete\n- Update\n\n### Prospects\nOfficial Documentation: [Prospects](http://developer.pardot.com/kb/api-version-3/prospects/)\n\n- Assign\n- Create - Does not support multiple values for record-multiple fields.\n- Delete\n- Query\n- Read\n- Unassign\n- Update - Does not support multiple values for record-multiple fields.\n- Upsert - Does not support multiple values for record-multiple fields.\n\n### Tags\nOfficial Documentation: [Tags](http://developer.pardot.com/kb/api-version-3/tags/)\n\n- Query\n- Read\n\n### TagObjects\nOfficial Documentation: [TagObjects](http://developer.pardot.com/kb/api-version-3/tag-objects/)\n\n- Query\n- Read\n\n### Users\nOfficial Documentation: [Users](http://developer.pardot.com/kb/api-version-3/users/)\n\n- Abilities of current API User\n- Query\n- Read\n\n### Visitors\nOfficial Documentation: [Visitors](http://developer.pardot.com/kb/api-version-3/visitors/)\n\n- Assign\n- Query\n- Read\n\n### Visitor Activities\nOfficial Documentation: [VisitorActivities](http://developer.pardot.com/kb/api-version-3/visitor-activities/)\n\n- Query\n- Read\n\n### Visits\nOfficial Documentation: [Visits](https://developer.pardot.com/kb/api-version-3/visits/)\n\n- Query\n- Read\n\n## How to Contribute \n\nWant to help implement the missing API end points?  Fork the repository, write some code, and \nsubmit a PR to the project!\n\nImplementing new API requests really only requires implementing the two following interfaces, along with\nminimal glue code.\n\n### [Request](/blob/master/src/main/java/com/darksci/pardot/api/request/Request.java)\nThe Request interface can typically be implemented by extending either [BaseRequest](/blob/master/src/main/java/com/darksci/pardot/api/request/BaseRequest.java) or [BaseQueryRequest](/blob/master/src/main/java/com/darksci/pardot/api/request/BaseQueryRequest.java).\nThis defines the end point that the request will hit, along with what parameters will be\npassed along with it.\n\n### [ResponseParser](/blob/master/src/main/java/com/darksci/pardot/api/parser/ResponseParser.java)\nThe ResponseParser interface defines how to take the API's response and convert it back into\nuser friendly Plain Old Java Objects (POJOs).\n\n## Contributors\n[Crim](https://github.com/crim)\n[LoRez](https://github.com/lorez)\n[dai-00](https://github.com/dai-00)\n\n## Releasing\nSteps for performing a release:\n\n1. Update release version: `mvn versions:set -DnewVersion=X.Y.Z`\n2. Validate and then commit version: `mvn versions:commit`\n3. Update CHANGELOG and README files.\n4. Merge to master.\n5. Deploy to Maven Central: `mvn clean deploy -P release`\n7. Create release on Github project, uploading JAR artifacts.\n\n## Changelog\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/)\nand this project adheres to [Semantic Versioning](http://semver.org/).\n\n[View Changelog](CHANGELOG.md)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrim%2Fpardot-java-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrim%2Fpardot-java-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrim%2Fpardot-java-client/lists"}