Migrate Clientify integration from API v1 to API v2#164
Merged
davidperezgar merged 11 commits intotrunkfrom Mar 16, 2026
Merged
Migrate Clientify integration from API v1 to API v2#164davidperezgar merged 11 commits intotrunkfrom
davidperezgar merged 11 commits intotrunkfrom
Conversation
Co-authored-by: David Perez <davidperezgar@gmail.com>
|
Cursor Agent can help with this pull request. Just |
- Update base URL from api.clientify.net/v1 to api-plus.clientify.com/v2 - Update login endpoint from settings/my-account/ to me/ - Update custom fields to use ?object_type= filter parameter - Update deal creation to use contact_id/company_id instead of URL refs - Include products inline in deal creation payload (v2 format) - Add pipeline_id, pipeline_desc, pipeline_stage_desc deal fields - Add Email Main (type 4) and Phone Main (type 1) from v2 API - Fix PUT method: use wp_remote_request() instead of wp_remote_post() - Fix error body access: use wp_remote_retrieve_body() consistently - Fix pipeline field mismatch (pipeline_desc now maps correctly) - Update product format to use product_id + price (v2 schema) - Update test mock data to match v2 response formats - Add new tests: v2 types, deal fields, contact/deal creation Closes #163 Co-authored-by: David Perez <davidperezgar@gmail.com>
Co-authored-by: David Perez <davidperezgar@gmail.com>
Co-authored-by: David Perez <davidperezgar@gmail.com>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the Clientify CRM integration from the legacy API v1 to the new API v2 (
api-plus.clientify.com/v2). This update includes endpoint changes, schema updates, and several fixes for reliability and data integrity.Fixes #163.
Changes
me/, custom fields now filter byobject_type, deal creation uses ID-based references with inline products following the v2 schemamarketing_statusdefault — Contacts now default tomarketing_status = 2(Marketing Contact) when the field is not explicitly set, avoiding API rejections on contact creationpipeline_descfield mappingEmail MainandPhone Mainfield type mappingwp_remote_request()usingPUT; unified response handling viawp_remote_retrieve_body()for error pathsmarketing_statusdefaults to Marketing Contact (2)Benefits
marketing_statusis not explicitly configured in the feedTesting Instructions
marketing_statusexplicitly mapped — confirm it defaults to Marketing Contact (2) in ClientifyChecklist