Looking for a little help here.
Would love it if Rest V2 had an createWithDupeCheck (upsert) functionality so I didn’t have to bother with v1.
When retrieve a contact via V1 endpoint, I get the following for a billing address:
[
“line1” => “542 S. MAIN CT”,
“line2” => “”,
“locality” => “Anaheim”,
“region” => “CA”,
“field” => “BILLING”,
“postal_code” => “92808”,
“zip_code” => “92808”,
“zip_four” => null,
“country_code” => “USA”,
]
I want to create (or update) a related contact at the same address. So I create the contact payload, and keep the address the same, and make my PUT request to /v1/contacts with:
[
“line1” => “542 S. MAIN CT”,
“locality” => “Anaheim”,
“region” => “CA”,
“postal_code” => “92808”,
“country_code” => “USA”,
“field” => “BILLING”,
]
This results in a 400 Bad Request with the response: {“message”:“BILLING Region is invalid”}
I am returning the EXACT region that was provided. No modifications.
When I use the V2 endpoint to create a new contact, I can use the exact same data and it works just fine. But now I am making two calls: #1 check if a contact exists, #2 create the contact OR #2 update the contact.
