API3
amal at September 9th, 2015 06:30 — #1
Hello ,
I did code previously so that to avoid email and phone update. For this i have taken blank array for this.. like
if($count_email == 0)
{
$opc_email = '[{"type":"work","value":"'.$BillingEmail.'"}]';
} else { $opc_email = '[{""}]'; }
Now my else condition override our existing email and Phone.. I have avoid update because our team manually update the Email and Phone. Since 31 Aug, I am facing problem regarding Email and Phone update. before 31st August its was working fine with blank array '[{""}]'; . Also it creating problem when we removed this field during update Email and Phone..
Please suggest me solution asap so that we can avoid the Email and Phone at the time of contact update. Its really down my business so Plz take action quickly.
Thanks
Amal
liam at September 9th, 2015 07:21 — #2
Hello Amal,
I'm not sure what exactly you are doing, so please clarify these details:
- Is this an update of existing contacts in OP?
- Did you change your code recently, I'm not aware that we changed anything in the API over the last two weeks.
- Are you using partial updates? It's mentioned at the top of the API 3 documentation
One suggested fix would be to not change the email and phones lists at all if they already exist. Instead retrieve the contact you want to update and only change the details for which you have updated data. If you have a new email / phone, append it to the existing email / phone array.
If you are still struggling, please pass on your full code, via email or PM if you prefer, and I'll look into it for you.
-Liam
amal at September 9th, 2015 08:00 — #3
Hi Liam,
Yes, before this i had used blank array to avoid contact email and phone update. Also i am using partial update.. I have also tested contact update without email and Phone.. it again update the live contact with blank value..
I have not changed the code. code stopped working after 28 Aug.
I am using partial update . I am using API3
liam at September 9th, 2015 08:35 — #4
Thanks Amal,
I'm still debugging what happened. Your given date of August 28 matches our last update of the API server so it is likely to be a problem on our side, I'm very sorry about that.
My suggested solution for partial updates is simply not to send the an email / phone array at all in your else
statment
amal at September 9th, 2015 09:28 — #5
array
(
[first_name] => Matthew
[last_name] => Wayne
[address_list] => Array
(
[0] => Array
(
[address] => Suite 782 - B
[city] => Malibu
[state] => CA
[zip_code] => 90265
[country_code] => US
)
)
[company_name] => Diff and Co.
[status_id] => 5537558b1787fa4eb9000008
[status] => customer
[owner_id] => 5537557a1787fa4e86000007
[owner] => Matthew D.
[custom_fields] => Array
(
[0] => Array
(
[id] => 554311e81787fa06c1000044
[value] => OTHER
)
[1] => Array
(
[id] => 55492f901787fa47ad000017
[value] => Residential
)
[2] => Array
(
[id] => 554a588d1787fa0253000028
[value] => No
)
[3] => Array
(
[id] => 554848b61787fa6329000047
[value] => WSCC
)
[4] => Array
(
[id] => 554a58541787fa01da000017
[value] => Matthew D.
)
[5] => Array
(
[id] => 554a586f1787fa01f4000024
[value] => Yes
)
[6] => Array
(
[id] => 554a58a51787fa0246000028
[value] => billing@difflaw.com
)
[7] => Array
(
[id] => 557a82081787fa369f0001d1
[value] => 3221223421
)
[8] => Array
(
[id] => 554c436a1787fa2e46000071
[value] =>
)
[9] => Array
(
[id] => 5580ef5c1787fa34890001fb
[value] => DIFF LAW BILLING
)
[10] => Array
(
[id] => 554ef5851787fa701f000062
[value] => 333-333-3333
)
[11] => Array
(
[id] => 554c437b1787fa2e46000075
[value] => James Wayne
27101 Chimney Road
Suite 1950
Malibu, AK 90265
United States
)
)
)
Yes Liam, I have tested as per your solution, but it updated my Email and phone also and response me blank email and phone array.
See above format of contacts... it also update my email and phone when we go with Partial update.
Did you rectify the issue of partial update? Please inform me after fixing this issue, so that we can test the functionality..
liam at September 9th, 2015 10:36 — #6
Hello Amal,
I've fixed the issue on our end.
We had added some functionality to delete array data via a partial request and our test cases didn't check if this affected normal partial updates.
Everything should be working now for partial updates, and no emails or phones will be deleted.
I hope you didn't loose a lot of data over the past 2 weeks. If you like we can look at restoring data from our weekly / monthly backup.
-Liam
amal at November 17th, 2015 01:21 — #7
Hi Liam ,
Same issue again persist, so please check and rectify issue asap.
Thanks
liam at November 17th, 2015 04:20 — #8
Hi Amal,
I'm sorry that you are experiencing this issue again.
Thank you for letting us know, we are working on a fix right now, I will keep you updated with our progress.
-Liam
liam at November 17th, 2015 05:37 — #9
Hi Amal,
We have pushed live a fix, we had some conflicting requests and opinions on how a partial update should work. Now, a partial update will:
1. Delete a field's value if the fields key is passed with a null / empty value (eg. empty array)
2. Ignore a field if it's key isn't in the request body
3. Update a field if it's key and new value are present.
In the case of a field whose value is an array (eg. phones, emails, urls), the new array will overwrite the old array of data, not append.
So to make your code work, please ensure you aren't sending the email or phone keys at all in your partial update if you don't want to delete them.
I'm sorry again for these problems, we are working on improving test coverage to prevent such breaks in future.
Please let me know if you have any other problems or suggestions,
-Liam
yujmlvml18 at July 24th, 2019 07:02 — #10
You can solve the issue with the help of email Customer support expert. They will provide you with all the sufficient help required to resolve Forgot Roadrunner Password, Email Not working error, etc.
Powered by Discourse, best viewed with JavaScript enabled