agilecrm / php-api Goto Github PK
View Code? Open in Web Editor NEWPHP Client to Access Agile Functionality
PHP Client to Access Agile Functionality
Please update the documentation to be more clear.
In curlwrap_v2.php, I set "AGILE_DOMAIN" to the full domain name:
mydomain.agilecrm.com
That doesn't work, it needs just the subdomain to run properly, but this isn't explicitly stated anywhere:
mydomain
Is there a way to send google utm parameters when creating new company contacts via api call?
It would be nice if you could attribute me (well, Zendesk, I developed it) for this as it came from over here https://gist.github.com/apanzerj/2920899 :-D
It would just be nice.
Thanks
Adam Panzer
@apanzerj
Zendesk Developer
Is it possible to update all values to an existing contact based on email address? I would like to update lead score, star value, tags and properties in a single command, if possible.
Is it possible to give the company name to the json when you are creating a contact?
Hello agilecrm php-api team,
I came across this issue when updating a Deal in my PHP Laravel 5 website. I have tried to do the same using Postman extension. "expected_value" and "close_date" does not update in Agile.
This is the array which I am setting up:
$opportunity_json = array(
"id" => $deal->agile_id, //It is mandatory field. Id of deal
"name" => $deal->name,
"expected_value"=>$deal->value,
"milestone" => $deal->milestone,
"close_date" => $close_date,
"probability"=> $deal->probability,
"contact_ids"=>array($agile_id, "$company->agile_id"),
"custom_data" => array(
array(
"name"=>"Contract Date",
"value"=>$date
),
array(
"name"=>"Contract Term",
"value"=>$contract
),
array(
"name"=>"Payment Term",
"value"=>$payment
),
array(
"name"=>"Sales Manager",
"value"=>$manager
),
array(
"name"=>"Deal Source",
"value"=>$source
),
array(
"name"=>"Setup Fee",
"value"=>$deal->setup_fee
),
)
);
Then I converted it to a readable JSON format and using the curl method.:
$opportunity_json = json_encode($opportunity_json);
$response = curl_wrap("opportunity/partial-update", $opportunity_json, "PUT", "application/json");
All the values have a valid value in them. I have tried using strings for the values instead of integers, that didn't work.
I also tried using Postman, using the rest-api call just with the "expected_value" or just "close_date" and both together. I am converting a regular date string into Epoch using DateTime library from PHP so I'm sure it is being converted correctly.
When I create the Deal/Opportunity, it does not have issues setting such value, it is only when I update them.
If you have anything to help me figure this out, please let me know.
Lucas
Setting tags when creating a Deal does not appear to work.
/** Create a new Deal **/
$agile_newDeal = array(
'name' => 'Test Deal',
'description' => 'Test',
'tags' => array('Test Tag'),
/* other parameters */
);
$agile_newDeal_json = json_encode($agile_newDeal);
$agile_deal_response = curl_wrap("opportunity", $agile_newDeal_json, "POST", "application/json");
$agile_deal = json_decode($agile_deal_response,false,512,JSON_BIGINT_AS_STRING);
print_r($agile_deal);
The API Response returns an empty array in $agile_deal->tags
and $agile_deal->tagsWithTime
.
Hello agilecrm team,
It would be great if you could implemente a way to get a Deal's Tasks.
Thanks in advance!
How can I also include tags when creating a deal?
When is deleted a contact always response an empty string
curl_wrap("contacts/5722721933590528", null, "DELETE", "application/json");
But REST-API specification response 204 o 401 status codes :
Is it possible to define the owner when creating a contact?
When trying to add a contact using:
curl_wrap("contacts", $contact_json, "POST", "application/json")
it works great. But if the contact already exists; nothing happens.
You'd like to be able to update contact if it exists, or else create new contact.
HI there,
Just intergraded with your API via this PHP wrapper - which was pretty straight forward thanks. However I have had at least 4 server 500 responses like so:
GuzzleHttp\Exception\ServerException: Server error:
PUT XXXX/dev/api/contacts/edit-properties
resulted in a500 Internal Server Error
response
It does seem to be just that particular API call currently.
This seems to happen every week presently which is a problem because I am setting tags against new and current records which trigger campaigns and obviously some people are falling through.
I'm trying to catch more info and will send it when I have it, but a 500 is internal on your server so not much I can say really. Can you please look at better error handling for this and I'm happy to feed it back to you as I see it my side.
Cheers,
I used the $contact_json in your example, substituting an actual Contact ID, and I get no error but the star value never updates. Looking at the REST API examples I've determined there is an error in your example. It should be "curl_wrap("contacts/edit/add-star", $contact_json, "PUT", "application/json");
I'm not getting any response. I'm using the wrapper. All I did was replace the DEFINE(...,..)... with my own details, and ran the search example but I don't get any response
I'm calling the api from localhost: Could this be the problem?
Hello,
Its possible list all registered contacts?
Tks;
Hey, thanks for the API!
I'm getting an error using the hitting any endpoint with curl and catching it reveals it to be error 92:
"HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)"
My implementation:
<?php
$user = get_user($id);
$agile_data = array(
'tags' => array('Web User'),
'properties' => array(
array(// First Name
'name' => 'first_name',
'value' => $user['first_name'],
'type' => 'SYSTEM'
),
array(// Last Name
'name' => 'last_name',
'value' => $user['last_name'],
'type' => 'SYSTEM'
),
array(// Email
'name' => 'email',
'value' => $user['email'],
'type' => 'SYSTEM'
),
// ETC...
)
);
$agile_json = json_encode($agile_data);
curl_wrap('contacts', $agile_json, 'POST', 'application/json');
Here's my server setup:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Apache 2.4
config
config-runtime
mod_bwlimited
mod_cgi
mod_deflate
mod_expires
mod_headers
mod_mpm_prefork
mod_proxy
mod_proxy_fcgi
mod_proxy_http
mod_proxy_wstunnel
mod_ruid2
mod_security2
mod_ssl
mod_unique_id
tools
PHP 7.2
libc-client
pear
php-bcmath
php-calendar
php-cli
php-common
php-curl
php-devel
php-fpm
php-ftp
php-gd
php-imap
php-litespeed
php-mbstring
php-mysqlnd
php-pdo
php-posix
php-sockets
php-xml
runtime
I'm able to log in and hit the endpoint just fine from a browser using the same creds. Any help would be appreciated!
Thanks again!
Hello agilecrm team,
I've using you api and had great results but i've encounter some lacks that would be great to fulfill:
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.