I’m aware of the endpoint GET /v1/organizations/search - however, being a noob and finding no worked example anywhere, I just can’t seem to figure it out.
What kind of a worked example are you looking for?
Also, how are you making your API calls? Are you using Postman?
For this particular endpoint, the search term you use has to contain a minimum of 2 characters.
I just ran this endpoint and used 2 characters “ca” to run my search. These are the results I got along with ID of the company:
Hi @Nicole_Tan
So sorry for the late response - Gmail marked this as spam
I’m using a mix of web browser, Jupyter Notebook (Python) and VS Code, actually; but - your example is all I needed, as I can see an example of the URL call in the GET request: which is exactly what I was looking for!
Thank you so very much!
Hi @Nicole_Tan
How can I get a organization by unique attributes like name or other using ruby gem ‘pipedrive’ pipedrive
when I try by name,
client = ::Pipedrive::Organization.new(ENV[‘PIPEDRIVE_API_TOKEN’])
client.find_by_name(‘name’) , it return result like
#<Enumerator: #<Pipedrive::Organization:0x00007f06a0ab8210 @api_token=“my_api_token”>:find_by_name(term: name)>
@ali527 Have you tried the solution provided above?
With the GET /v1/organizations/search endpoint, the search term you use has to contain a minimum of 2 characters.
@Nicole_Tan Thanks for your quick response. Well, I tired it with following URL.
“https://#{ENV[‘PIPEDRIVE_COMPANY_DOMAIN’]}.pipedrive.com/api/v1/organizations/search/?term=#{company.name}&exact_match=true&limit=1&fields=name&api_token=#{ENV[‘PIPEDRIVE_API_TOKEN’]}”
For the GET /v1/organizations/search endpoint, the required parameter is the search term. It has to have at least two characters.
If you want to search by company name, add name to the fields parameter, for example: https://{COMPANYDOMAIN}.pipedrive.com/api/v1/organizations/search?term={YOUR OWN TERM}&fields=name&start=0.
You can use the fields parameter to specify which field the search should be done in.
Here is what I did in Postman. I ran a search for Organizations with the search term ca and added name to the field parameter so that it searches the name of the Organizations.