API3
benajminlspence at August 12th, 2014 07:48 — #1
After API updates we have few issue now before API updates we were searching contacts based on Custom field and we were using url(contacts.json?custom_field_id=53aa9f5eeb89975e0XXXXX3&custom_field_value=test)
whic was working fine and was providing single contact but after 9th of August this stopped working. can you please check and let me know what is new solution
ruairi at August 12th, 2014 09:13 — #2
Sorry about that the custom_field search parameter was disabled accidentally.
It should be re-enabled in the next 10 minutes.
benajminlspence at September 30th, 2016 08:01 — #3
This has again been disabled in the latest API update, can you re instate asap?!
aprokaev at July 18th, 2017 01:49 — #4
Hello
Could you check if filter "custom_field_id=xxxx&custom_field_value=yyyy" is active ?
it seems API ignores it.
thanks, Alex
liam at July 18th, 2017 08:36 — #5
Hello Alex,
Filtering contacts by custom field id is working correctly for me.
eg: https://app.onepagecrm.com/api/v3/contacts.json?custom_field_id=596e0196eb8997b8850bdc32&custom_field_value=test
If it's still broken for you, please give me an example of the API query you are running, as well as the id of the contact which you are expecting to get in return.
Kind regards,
Liam
aprokaev at July 18th, 2017 08:56 — #6
Hello Liam
here is copy of my email which I've sent to support mailbox.
private content removed
If I visit http://developer.onepagecrm.com/api_browser/and enter
"contacts.json?per_page=100&custom_field_id=553a1f6f1787fa4401000010&custom_field_value=xxx&team=1&page=1&sort_by=company_name&order=asc&fields=id"
Problem #1. I get wrong # of results
"total_count": 150,
"page": 1,
"per_page": 100,
"max_page": 2
Problem #2. I see wrong value in this custom field , to be exact
"value": [
"yyy"
]
thanks, Alex
liam at July 18th, 2017 10:44 — #7
Hi Alex,
I found the problem.
The custom field 553a1f6f1787fa4401000010
is a multiple choice checkbox. The API is checking for exact matches, so if a contact has both "GGB" and some other value selected, it will be found by the filter but not by the API query.
we will look at changing this behaviour as I believe a multiple choice filed queried for a single value is more likely to be used as per your scenario.
For now the workaround is to use the custom filter via the api like such:
contacts.json?filter_id=58ee216b00d4afaf4c81b238&per_page=100&team=1&page=1&sort_by=company_name&order=asc
Regards,
Liam
aprokaev at July 20th, 2017 06:31 — #8
hi Liam
thank you!
I've tried filters and created another topic here
jamesh at July 20th, 2017 12:27 — #9
HI Liam,
No urgency, but if/when you do update this could you add a reply on this thread?
thanks
James
liam at August 3rd, 2017 05:48 — #10
Hi James,
This has indeed been fixed last week, but we forgot to notify you here. Sorry about that.
From now on when filtering by a custom_field which is multiple choice, and searching for a contacts value "a", then any contact will be returned which has
1) only "a" or
2) "a" and other choices selected
Kind regards,
Liam
Powered by Discourse, best viewed with JavaScript enabled