Hi everyone,
Activecampaign is kind of new for me.
I have to create a script to import a list of data and each datum is related to a specific email. I am using the API Bêta 3, maybe should I use the API 2 instead?
By doing a curl to /api/3/contacts/6929/fieldValues, I can see the field I would like to update for my test (you can see the result below ). I would like to update the field with the ID 2374 - field 29 - (actual testing value, which I added from a form, is “ceci est test #2 de testreal”). How can I update this value from the API Bêta 3? I can see this doc for API 2 : API Examples Using contact_edit, and I can see an example about how to update a deal with the API 3 here : Overview - however it is not clear. What I understand for now is that I will have to post to /api/3/contacts/6929 a json string. Can the JSON string be only something like
{
"fieldValues": {
"id": "2374",
"Testreal": "field update!"
}
}
Is that right? I am not sure and I don’t want to break anything related to my client stuff… thank you.
//// This is the output from my test at https://wamidi.godeek.cloud/test.php
Array
(
[fieldValues] => Array
(
[0] => Array
(
[contact] => 6929
[field] => 1
[value] =>
[cdate] => 2017-09-26T09:34:57-05:00
[udate] => 2017-09-26T09:34:57-05:00
[links] => Array
(
[owner] => /api/3/fieldValues/2364/owner
[field] => /api/3/fieldValues/2364/field
)
[id] => 2364
[owner] => 6929
)
[...]
[10] => Array
(
[contact] => 6929
[field] => 29
[value] => ceci est test #2 de testreal
[cdate] => 2017-09-26T09:34:57-05:00
[udate] => 2017-09-26T09:34:57-05:00
[links] => Array
(
[owner] => /api/3/fieldValues/2374/owner
[field] => /api/3/fieldValues/2374/field
)
[id] => 2374
[owner] => 6929
)
)
)