Giter Site home page Giter Site logo

php-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-api's Issues

Documentation is unclear

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

Update all values by email?

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.

Update Opportunity/Deal does not update 'expected_value' or 'close_date'

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

Set Tags for a Deal

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.

Delete contact always return empty string

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 :

  • Status 204: Contact deleted successfully.
  • Status 401: Unauthorised. (when the user name and password fields are wrong.)

Update contact if already exists

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.

API Errors: Server 500

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 a 500 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,

Update Star Value doesn't work

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");

no response

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?

Receiving cURL Error 92 hitting any endpoint

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.