I’m trying to fill a custom date field through the REST API using your PHP SDK. This is for an account based in the UK, if that makes a difference.
When I manually fill out the custom date field in the Keap application itself and then query for it using the API, I receive the value as ‘Y-m-d’ (‘2024-09-16’). When I post to Keap using the same API, with the field in the same format, I receive no errors but the field does not get filled on Keap’s end. All other fields in the same request are updated fine and visible in Keap.
I’ve seen a few other threads on this, for example PHP API not updating custom date field? , where the advice amounted to “just try different formats”, but I’ve run out of those without success. I assume there has to be some standard and would be much obliged to receive it.
Thanks a lot. As it turns out, the date format was not the actual problem I was running into (though the 15 minute block comment is definitely filed away under “things that’ll save me time later”).
When initially testing custom fields, it seemed the content of fields needed to be wrapped in their own array/object to get updated. And this works for all field types, even if they’re just strings… except for the Date fields.
Your solution put me on to that and indeed when using 'content' => date() directly the update goes through without a hitch.