Giter Site home page Giter Site logo

rest-api's People

Contributors

graut avatar prem-tammina avatar rammohan-agile avatar ranjanagilecrm avatar saikiran-k avatar

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  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

rest-api's Issues

Send email to Contacts with tags

I am looking for the ability to send an email out to all contacts that contain a specific Tag.

This seems like a pretty fundamental function, but I can't seem to figure out how to do it using the API.

We have information that goes out to specific customer groups on a regular basis. We would like to use AgileCRM to track the opens and delivery info. The customers are all properly tagged. I just can't seem to figure out how to get an email sent to them.

Help would be appreciated.

Typing Question for Values

I have a question about value types.

I noticed in one of the examples for contact fields there's a "created" field that has an int JSON type, while in the docs it says "value" will always be a string. Is it really picky or can I just use strings for all values assuming the API will handle it on the other side?

I'm using D to handle these responses so I have to critique every detail that can derail incoming response handling.

Table of Contents

Hi, the documentation is pretty long. It should have a easy navigation way. Displaying the documentation via Wiki pages or creating a table of contents at the top will be better.

Thanks.

Contact update broken?

The contact update routing seems to be broken? Or perhaps I'm misunderstanding it's use. It doesn't seem to accept an id in the route in the same fashion that GET contact by ID would, I get a 405 if I try using a similar route but with PUT instead of GET of course.

I also tried the "dev/api/contact" endpoint and passing ID or email as a data argument as suggested in the docs. It returned a 200, but nothing seems to happen.

Update contact with email ID

Hi there,
Is there any way to update contact properties with email ID provided? I know there is an endpoint to edit contact with ID but in my system there is no way to get Id of the contact in Agile and there is no way to get response from API call as well.

getting 401 error while sending post request for creating contact

Error: XHR error
Stack trace:
ClientRequest.prototype._onFinish/xhr.onerror@webpack-internal:///../../../../stream-http/lib/request.js:196:23
wrapFn@webpack-internal:///../../../../zone.js/dist/zone.js:1176:30
ZoneDelegate.prototype.invokeTask@webpack-internal:///../../../../zone.js/dist/zone.js:421:17
onInvokeTask@webpack-internal:///../../../core/esm5/core.js:4941:24
ZoneDelegate.prototype.invokeTask@webpack-internal:///../../../../zone.js/dist/zone.js:420:17
Zone.prototype.runTask@webpack-internal:///../../../../zone.js/dist/zone.js:188:28
ZoneTask.invokeTask@webpack-internal:///../../../../zone.js/dist/zone.js:495:24
invokeTask@webpack-internal:///../../../../zone.js/dist/zone.js:1536:9
globalZoneAwareCallback@webpack-internal:///../../../../zone.js/dist/zone.js:1562:17
core.js:1427

API errors don't follow the Accept header

When I ask for JSON output I clearly expect to receive a JSON both if the reponse is successful or an error, instead I receive a string which is not parseable and forces me to double-check all data I get back from you. This should be fixed!

Count not in first contact

Hi,

I've used the page_size param to paginate my results. The documentation states: "Count of the contacts will be in the first contact...". This is not within the first contact of the results. I have 3 contacts in my CRM and requesting 1 per page like so:

https://commotioncreative.agilecrm.com/dev/api/contacts?page_size=1

However now count value is visible in the returned contact. I can see the cursor to retrieve the next page.

Please advise.

Error handling new contact creation

Inserting new contact throws

status: '500',
'exception message': 'java.lang.NumberFormatException: For input string: "580085ebf992e33126523d80"' }

This was my fault because we tried to insert new user with our internal database id`s.

First we are suprised that you use only number as so we guess you use sql but we are working with no-sql databases and can now not use same ids in your system as we use it on our.

But back to the topic your error handling is bad. Why are you passing a java exception back to the client

City and state names

Probably state and city names should be switched here:

{
      "type": "SYSTEM",
      "name": "address",
      "value": "{\"zip\":\"2000\",\"address\":\"225 George Street\",\"state\":\"Sydney\",\"countryname\":\"Australia\",\"country\":\"AU\",\"city\":\"NSW\"}"
}

Update tags for deals?

I don't see any endpoint and I've tried a few guesses but nothing works to update tags on deals.

Server error on GET of various assets

I'm getting this for some of my clients:

\n\n<title>500 Server Error</title>\n\n\n

Error: Server Error

\n

The server encountered an error and could not complete your request.

Please try again in 30 seconds.

\n

\n

Will just happen randomly. Looks like it also happens when the server is under too much of a load. However, it also happens when I haven't been hitting the server very often as well.

Was hoping someone could address this. Maybe it's a common bug. I'm using Accept application/json and content type json for the curl requests. Works most of the time for contact fetches. Pulling in things like notes, tasks, etc. causes this a lot though.

dev/api/search not working properly

Hi, I'm sending the following request:

{ 
  path: '/dev/api/search',
  headers: { Accept: 'application/json' },
  method: 'GET',
  query: 'q=andreafdaf%40gmail.com&page_size=1&type=PERSON',
  host: 'my_host.agilecrm.com',
  port: 443,
  auth: '_:_'
}

but I'm receiving a status 500 and an empty response, what's wrong?

dev/api/contacts/email/tags/delete 204 response is too vauge

When making a request to dev/api/contacts/email/tags/delete to delete some tags it seems to return a 204 regardless of whether anything was actually changes or not. I can send it an array of non-existing tags and I'll still get a 204 response back.

Here's the current response codes that it handles:

Status 204: Tags deleted successfully.
Status 401: Unauthorised. (when the user name and password fields are wrong.)
Status 400: If the input is in wrong format.

It would be better if it returned a 200 response with the updated contact resource so I don't have to leave anything up to interpretation.

API suggestion

Hello!

I'm working with your REST api right now and I've noticed there are no filtering options when fetching contacts.

Some useful additions would be:
GET dev/api/contacts?email=[email protected]
(searching with a POST request? hmmm...)

GET dev/api/contacts?domain=somecompany.com

GET dev/api/contacts?first_name=John

GET dev/api/contacts?last_name=Doe

GET dev/api/contacts?company=somecompany

GET dev/api/contacts?type=PERSON (or COMPANY)

GET dev/api/contacts?tags=seller&tags=rich...

Really simple filters that would be a huge improvement for us end users. This way fetching contacts is cleaner, it's almost nonsense having to retrieve MBs of JSON files and parse them all the time (throwing away 99% and more of the data retrieved)

Also the JSON output would be way cleaner in the form:

{
"count": 1238,
"page_size": 40,
"page_start": 39,
"page_end": 79,
"next_page": "ASd98asdh982hd98ahs",
"results": [ ... ]
}

How do you update a company's properties?

This does not work:

    payload = {
        'id': contact_id,
        'tags': tags,
        'type': "COMPANY",
        'properties': [
                {
                    "type": "SYSTEM",
                    "name": "website",
                    "subtype": "URL",
                    "value": website
                }
        ]
    }

/contacts/search/email endpoint does not work

It seems all the items related to email and tags do not work. The two I have tried are
/contacts/search/email and dev/api/contacts/email/tags/add
Response from the server

HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Tue, 30 Dec 2014 14:30:09 GMT
< Server: Google Frontend
< Cache-Control: private
< Transfer-Encoding: chunked

Getting 500 Server error on PUT contacts

Getting an obscure error from the API when trying to update a contact. This is driving me nuts. All of the fields are the correct types in json in a --data '{"id": 1233445}' type deal in curl.

Why am I not getting a better error message? Not like this just happened because of a server overload. I do all kinds of other calls before doing the update. Some updates pass, and a few fail, really simple ones that I'm confirming have the correct field info.

contacts/companies does not work with cursor

When you do a simple call to the contacts/companies endpoint it returns successfully:

curl -s -w "%{http_code}" -H "Accept: application/json" -u y:x https://x.agilecrm.com/dev/api/contacts/companies?page_size=25

However, when trying to run a call on the next page it gives me a 500 server error.

curl -s -w "%{http_code}" -H "Accept: application/json" -u y:x https://x.agilecrm.com/dev/api/contacts/companies?page_size=25&cursor=CjwSNmoRc35hZ2lsZS1jcm0tY2xvdWRyFAsSB0NvbnRhY3QYgICAwNDBhwgMogEKZ2V0d29ya2VycxgAIAA

Associate user with company

Hey,
I have some troubles to correctly and satisfy integrate with your platform, exactly I have some issue with linking contact - company.

Could you add endpoint to edit contact's company id?
Currently, it is possible to define only during creation of the user which will cause that I can not add some of my users to Agile Crm.

Good thing would be to give ability to define list of user' id belong to company where company is creating.

It is my last point from my wish list and probably impossible that would be nice to have ability to link contact to many companies.

Cheers

Never ending loop cursor for contacts and some other resources

I've debugged and double checked this for a long amount of time. Making sure my code wasn't causing the issue and working very hard to make everything work perfectly on my end.

This is what I've experienced:

Looping over to get contacts using the cursor is running in an endless loop (causing my scipts to run for 24+ hours or forever). It never appears to reach the end of the list. Alternatively I'd like to have an option just to pass a page number instead of a cursor, feel like that would work better.

I check for same ids, I check for null cursor (which seems to be in every request).

I can't get this to work on my end. The horrible part is sometimes it works and other times not. The randomness makes it hard to test and completely unreliable.

If you guys can help me out, and help out the developers community, I'd appreciate it a million times over. I want to keep my AgileCRM clients happy and I really appreciate the effort on your part as well.

Wrong documentation

  • At the beginning of section 1 it is stated:
    "Tag name should start with an alphabet and can not contain special characters other than underscore and space."
  • While in "Acceptable request representation" it reads:
    "tags": ["Lead","Likely Buyer","You_can-user $special chars"]

A clear contradiction!

Add Call Log through email

Please add the posibility to add call logs trough the API! And let us change the date when the call log has been added/when the call has been done.

Suggestion: add tags based on id

We can add tags to a contact based on email with

dev/api/contacts/email/tags/add

But it's not possible to do it using the contact ID, so if a contact doesn't have an email the only way to add a tag is to fetch the contact and update it... but adding a tag to the tags array and updating doesn't always work as one expects (it happened to me, sometimes if added this way the tag is visible only in the table view and disappears when inside the contact's page)

Dynamic filter doesn't work on number

If a custom field has type=Number it seems it's not possible to search for it with a dynamic filter.

Testcase:

  1. Create a new custom field for a company, named "testingdf" and set type=Number
  2. Go to a company and set testingdf=12345
  3. Do a dynamic-filter REST call with filterJson={"rules":[{"LHS":"testingdf","CONDITION":"EQUALS","RHS":"12345"}],"contact_type":"COMPANY"}'
  4. An empty array [] will be returned, with status code 200 (according to the document 204 should have been returned for a no match).
  5. Update the custom filed and set type=TextField
  6. Do the same dynamic-filter call, still just an empty array as response
  7. Update the company and set testingdf to something else, then change it back to 12345 (if the field isn't updated to something else first it won't work).
  8. Now do that dynamic-filter call again and the company will be returned.
  9. If you switch back to type=Number and update the field for the selected company it'll stop working again.

Calling with filterJson={"rules":[{"LHS":"testingdf","CONDITION":"EQUALS","RHS":12345}],"contact_type":"COMPANY"}' , aka with a number as RHS does not change anything.

Full dynamic-filter call:
curl https://something.agilecrm.com/dev/api/filters/filter/dynamic-filter -H "Accept: application/json" \ -H "Content-Type :application/x-www-form-urlencoded" \ -d 'page_size=25&global_sort_key=-created_time&filterJson={"rules":[{"LHS":"testingdf","CONDITION":"EQUALS","RHS":"12345"}],"contact_type":"COMPANY"}' \ -v -u user@something:key -X POST

Endpoint to retrieve a List of Companies is POST not GET

In the README the method to retrieve a list of companies has GET listed as the Method...

2.3 Get list of companies
dev/api/contacts/companies/list
Method: GET

This is what I would expect but I get a 405 Error with this. It only works if I call it as a POST which is very counterintuitive.

How do re-assign emails and stats?

Are emails and stats linked by the email address of the contact? If I change an email to another contact, those emails and stats will show in that other contact? Basically, I'm trying to move emails and stats to another user.

Cross-Origin Request Blocked

 headers.append('Authorization', btoa('[email protected],key'));
      headers.append('Access-Control-Allow-Origin', 'https://{{domain}}.agilecrm.com');
      headers.append('Access-Control-Allow-Methods', 'POST');
      headers.append('Access-Control-Max-Age', '86400');

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://aliworkspace.agilecrm.com/dev/api/contacts. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

/contacts/search/email endpoint body doesn't support emails with +

Tried to lookup the emails in my Agile contacts with the endpoint in the title and there were a few contacts that didn't work. It seemed that what they all had in common was that they use + (https://en.wikipedia.org/wiki/Email_address#Subaddressing), eg. an email in the format "[email protected]" didn't work but something like "[email protected]" would.

These emails were added via /contacts API endpoint, so these sorts of addresses are at least supported elsewhere in the API.

Protocol errors for example uses (curl, due to HTTP2)

  • Newer versions of curl support the HTTP2 feature
  • Trying to connect to Agile CRM's dev api will result in ALPN, offering h2, which is then accepted ALPN, server accepted to use h2 so a HTTP/2 connection is negotiated
  • This stream then dies almost straight after sending some headers
* HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

To use the examples, you need to force a non-h2 connection using an extra flag, e.g. --http1.1 so h2 is not attempted

Can't upload file on Agile cloud from my local machine

I have written code to upload file from local machine to cloud in VBA and its working fine. But when I see documents in my Agile account, I can still see my local file address linked to uploaded document. I also can't download this file.
Can anyone please help for the same..

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.