Comments (7)
Getting the same issue with custom fields using personalization tags, eg field[%CITY%,0]. What's the fix?
Edit: Fixed. I'm guessing the wrapper doesn't process multiple tags. Had to split the field parameter into a separate array like so:
$contact = array(
'p[1]' => 1,
'status[1]' => 1,
'email' => 'john@doe',
'first_name' => 'John',
'last_name' => 'Doe'
);
$contact['field'] = array(
'%CITY%,0' => 'city',
'%STATE%,0' => 'state',
'%POSTCODE%,0' => 'postcode'
);
from activecampaign-api-php.
Hmm... the form is correct, supposing that you have a custom field with the id that you are passing in. Could you submit a ticket through the help section in your account with some form of the code you're using to make the API call?
Thanks!
from activecampaign-api-php.
Sure. Will do.
from activecampaign-api-php.
@nathanwaters I know this was awhile ago... but you da' man. Thanks for adding that solution in there. The docs/examples aren't clear on it at all.
from activecampaign-api-php.
It seems that i'm having some issues with the api. I have the following:
`$url = $credentials['api_url'];
$params = array(
'api_key' => $credentials['api_key'],
'api_action' => $api_action,
'api_output' => 'serialize',
);
$list = 'p[' . $credentials['list_id'] . ']';
$status = 'status[' . $credentials['list_id'] . ']';
$token = filter_xss($token);
if($api_action == 'contact_add') {
$post = array(
'email' => $email,
'first_name' => $firstname,
'last_name' => $lastname,
'tags' => $tags,
$list => $credentials['list_id'],
$status => 1,
);
$post['field'] = array(
'%TOKEN%,0' => $token,
'%SAVVYREDIRECTURL%,0' => $redirect_url,
'%PHONE%,0' => '131234',
);
}
elseif($api_action == 'contact_edit') {
$post = array(
'id' => $contact_id,
'first_name' => $firstname,
'last_name' => $lastname,
$list => $credentials['list_id'],
);
$post['field'] = array(
'%TOKEN%,0' => $token,
'%SAVVYREDIRECTURL%,0' => $redirect_url,
'%PHONE%,0' => '131234',
);
}`
what it did is it just saves the token, but not the customurl and the phone fields.
may i please ask what's wrong or what's missing? thanks.
from activecampaign-api-php.
@msavvy On which of those is that happening? Or is it both?
Also, are you using this wrapper? I ask because if so, you wouldn't need api_key
nor api_action
params since the wrapper handles those for you. If you aren't using the wrapper, then that's your issue, you'd need to look at the documentation on making an API call without the wrapper which can be found here - https://www.activecampaign.com/api/example.php?call=contact_add
from activecampaign-api-php.
I am trying to fetch custom field data from deals. so please suggest any API fo this.
from activecampaign-api-php.
Related Issues (20)
- An unespected problem occurred with the api HOT 1
- Address api endpoint HOT 2
- Date custom field HOT 12
- Your session has expired. Please login again. HOT 6
- No support for tasks HOT 2
- Coonect a store via API
- composer install says Nothing to install or update HOT 1
- Docs HOT 2
- Search User by First Name
- Create contact with Address and Address2 values HOT 2
- Bom characters in response as exception
- Don't disable TLS verification by default
- Changing versions breaks url_base property in ActiveCampaign class
- contact/sync width custom checkbox field.
- using api to send email with template HOT 1
- version 3 support? HOT 7
- Api v3
- API Wrapper not working with PHP 8.1.11 HOT 1
- Get all contacts of a tag
- Repository hasn't been updated since Dec 7, 2017
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activecampaign-api-php.