activecampaign-api-php
activecampaign-api-php copied to clipboard
Date custom field
Hi there, I have a date custom field that I would like to update through the API (I am using ActiveCampaign.class.php).
This is the script I wrote in php, but I get a 500 errors when I test it: <?php
require_once("includes/ActiveCampaign.class.php");
$ac = new ActiveCampaign("MY_URL", "MY_API_KEY");
$email = $contact['email'];
/*
* ADD OR EDIT CONTACT (TO THE NEW LIST CREATED ABOVE).
*/
//$data = date("Y-m-d h:i:s");
$data = date("d-m-Y");
$contact = array(
"email" => $email,
"first_name" => "Test",
"field[%TEST_%,0]" => "OK",
"field[%DATE_TEST%,0]" => $data
);
$contact_sync = $ac->api("contact/sync", $contact);
?>
Of course MY_URL and MY_API are filled with the correct data. Does the API support date updates?
Thanks
Hi, I'm Tim, the integrations product manager at ActiveCampaign. What's a good email address to follow up with you on this issue?
This one is ok, thanks. Valerio
On 26. Nov 2018, at 17:29, Tim Jahn <[email protected] mailto:[email protected]> wrote:
What's a good email address to follow up with you on this issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ActiveCampaign/activecampaign-api-php/issues/103#issuecomment-441703870, or mute the thread https://github.com/notifications/unsubscribe-auth/AWTC6R2s_-jyxAhqotrT5GV2q6V0R1lQks5uzBbNgaJpZM4Yve9E.
-- Valerio Rossi www.universita.it Roma, Kognoscenti S.r.l.
Unfortunately, it looks like I'm unable to see your email address. If you don't want to post it publicly here, feel free to shoot me an email - tjahn at activecampaign. Thanks!
On 26. Nov 2018, at 18:56, Tim Jahn <[email protected] mailto:[email protected]> wrote:
Unfortunately, it looks like I'm unable to see your email address. If you don't want to post it publicly here, feel free to shoot me an email - tjahn at activecampaign. Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ActiveCampaign/activecampaign-api-php/issues/103#issuecomment-441735122, or mute the thread https://github.com/notifications/unsubscribe-auth/AWTC6VKPUweGAQn_U7Sr8WvHlgdNA6mIks5uzCtegaJpZM4Yve9E.
-- Valerio Rossi www.universita.it Roma, Kognoscenti S.r.l.
Was this ever solved? I have a custom field which is a date field, and I can not update it utilizing contact/sync. I have tried several formats for the date but nothing works. What is the correct format to submit/update a date field?
Yes, it is solved.
On 2. May 2019, at 18:30, Matt Pramschufer [email protected] wrote:
Was this ever solved? I have a custom field which is a date field, and I can not update it utilizing contact/sync. I have tried several formats for the date but nothing works. What is the correct format to submit/update a date field?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ActiveCampaign/activecampaign-api-php/issues/103#issuecomment-488741215, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSMF2OJTFQHKYVHGZGED3TPTMJLDANCNFSM4GF555CA.
disappointed to see that this issue seems to have been resolved outside of Git, which makes it inaccessible to anyone else who is having a similar issue. :/
Can someone share the solution?
I'm having same issue while trying to update a contacts' custom datetime fields. i've tried a million different date formats, but nothing seems to update the field.
@PPWSK & @dautry a datetime field should be in iso8601 format.
So for example: "2021-08-24T09:45:00+02:00"
A date field should be formatted as 2021-08-23
@reinaris What is the expected timezone for the custom datetime fields? I could not find any documentation in AC API that speaks about the default timezone that is used for the values passed.
@reinaris What is the expected timezone for the custom datetime fields? I could not find any documentation in AC API that speaks about the default timezone that is used for the values passed.
Good question, I have no clue! I think you have to find out by trying :)