agilecrm / rest-api Goto Github PK
View Code? Open in Web Editor NEWREST API Documentation from Agile CRM
REST API Documentation from Agile CRM
I'm getting this for some of my clients:
\n\n<title>500 Server Error</title>\n\n\nPlease try again in 30 seconds.
\n\nWill 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.
This is what I want to do:
Delete a given contact with a campaign.
Move that contact's info to another contact, and re-assign the campaign to the new contact.
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
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.
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.
Hi i want to integrate agilecem sales with my site , and now i need an endpoint to get all contact's custom fileds, so that i can send custom fileds values from my site to my agilecrm account.
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.
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
Using deal_ids does not seem to work for any of them.
When I submit the email of a COMPANY instead of a PERSON using dev/api/contacts/search/email I receive null (I'm using JSON as output) in response, although it is present using the UI
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)
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.
This does not work:
payload = {
'id': contact_id,
'tags': tags,
'type': "COMPANY",
'properties': [
{
"type": "SYSTEM",
"name": "website",
"subtype": "URL",
"value": website
}
]
}
A clear contradiction!
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.
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.
How would I do this for contacts? Seems that companies have it, but I don't see the contacts one anywhere in the docs.
Is there any way to search for users using a custom type property like user_id in my system, not ID from agilecrm?
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..
I don't see any endpoint and I've tried a few guesses but nothing works to update tags on deals.
Response code 200-OK for deleting a deal isn't valid. It should be changed to 204.
The tags key in the contact object appears to not work.
Hello. It's possible to find contacts with tag *** like in *agilecrm.com filter?
Screenshot
I'm using contact_ids as a string[] array. No error but not re-attaching.
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.
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).
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?
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.
There is no point in returning a JSON object where some fields are... stringified JSON
Of course this is a must when using XML but if a client asks for the JSON output those fields should be parsed
The header below https://github.com/agilecrm/rest-api#44-get-the-list-of-tasks-of-current-user should probably read:
But currently reads:
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!
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
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
If a custom field has type=Number it seems it's not possible to search for it with a dynamic filter.
Testcase:
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
I'm referring this document https://github.com/agilecrm/rest-api. I am not able to find any rest api call to create contact with this document. can anyone help me out
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.
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.
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": [ ... ]
}
https://{domain}.agilecrm.com/dev/api/contacts/bulk/tags
doesn't work? It's giving me
404 Could not find resource
Same as #3
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\"}"
}
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.
curl
support the HTTP2
featureALPN, offering h2
, which is then accepted ALPN, server accepted to use h2
so a HTTP/2
connection is negotiated* 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
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.
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
I keep getting this error that the query timed out. At first I thought it was pulling too many contacts at once so I moved it to a 30 limit, but I still keep getting it randomly.
E.g. List of campaigns dev/api/workflows
simply sends a response "Sucesses"
Which also is misspelled
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.
Hi
Is possible to get via api a list of fields (include custom fields) from the contacts module?
When i get the contact data, custom fields with no data don´t appear in the response.
It would appear from the documentation that only the last response/reply for a ticket are available through the API. Is this correct?
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.