質問&ディスカッション

MishimaKuniki
Mitwirkender/Mitwirkende

SearchAPIのプロパティについて

lösung

filter Group 内に operatorという値があるのですが、

こちらの中に多数設定できる値があります。

それぞれどういった場合に使用するか教えていただきませんか?

 

またこちらスクリーンショットの値で実行した際にこのような結果が返ってきてしまいました。
私が欲しい値としてはこの名前に対して会社IDを取得したいのですが、可能でしょうか?

 

ご回答よろしくお願いします。

スクリーンショット 2020-09-18 10.51.32(2).png

0 Upvotes
1 Akzeptierte Lösung
WendyGoh
Lösung
HubSpot Employee
HubSpot Employee

SearchAPIのプロパティについて

lösung

Hey @MishimaKuniki,

 

No worries at all 🙂 

 

Thanks for the further clarification! When looking to search for company domain on the documentation here, you can do so like this:

 

example.png

  • Do note that I set the limit to 1 so that it will return at least one company. Since company domain name is unique, I wouldn't expect the result to return more than one company record. However, if you're looking to retrieve company records based on other properties that may return more than one company records, you may want to set this value higher. The maximum limit is 100.

Lösung in ursprünglichem Beitrag anzeigen

12 Antworten
WendyGoh
HubSpot Employee
HubSpot Employee

SearchAPIのプロパティについて

lösung

Thanks for tagging me @natsumimori! 🙂

 

Hey @MishimaKuniki,

 

When looking to use the filters to search and retrieve company IDs based on the company name, are you referring to the company domain name? If so, the propertyName that you would need to use here is domain . This is because domain is the internal name for the Company domain name property:
Screen Shot 2020-09-21 at 3.26.36 PM.png

 

Additionally, do note that when you're doing test call on the docs, you would need to include either the API Key or OAuth Access token as the authentication type:
test call.png
natsumimori
Community-Manager/-in
Community-Manager/-in

SearchAPIのプロパティについて

lösung

Thank you @WendyGoh !

@MishimaKuniki さん、上記Wendyの回答を参照なさってみてください!

------------

会社名に基づいて会社IDを検索・取得するためにフィルターを使用しようとしている場合、会社のドメイン名を参照していますか?もしそうであれば、ここで使用する必要があるプロパティ名は domain です。これは、 domain が会社のドメイン名プロパティの内部名であるためです。

さらに、ドキュメントのテストコールを行う際には、認証タイプとして API Key または OAuth Access token のいずれかを含める必要があることに注意してください。

------------

MishimaKuniki
Mitwirkender/Mitwirkende

SearchAPIのプロパティについて

lösung

会社のドメイン名は参照していないですね。

それぞれ値を与えみたのですが、使用方法はこちらで合っていますでしょうか?

いまいちそれぞれのパラメータに何を与えてあげればいいのかわからないのですが・・・

HubSpot_Community_-_Re__SearchAPIのプロパティについて_-_HubSpot_Community.png

スクリーンショット 2020-09-24 13.14.23(2).png

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

SearchAPIのプロパティについて

lösung

Hey @MishimaKuniki,

 

Taking a look at your screenshot - I'm seeing that you're attempting to search for contacts with propertyName - admin equal hoge.ne. 

 

If within your HubSpot portal, there's a property internal name - admin and you're looking to retrieve contacts who's has the admin property value as 'hoge.ne', then I would say that you're including the correct parameters. 

 

Additionally, while I have redacted your hapikey key, I'd highly recommend you to regenereate your hapikey key since it has been surfaced on the public forum for days. Moving forward, please avoid sharing your API key on the public forums. Thank you!

MishimaKuniki
Mitwirkender/Mitwirkende

SearchAPIのプロパティについて

lösung

@WendyGoh さん

 

hapikeyの編集ありがとうございました😅

デモ環境で行っていたため失念をしておりました。

 

ご指摘ありがとうございます。

正常値では無かったため、修正し実行しましたが、特に値が返ってきませんでした。

欲しい値として、会社名を取得したいのですが、この場合どうすればいいでしょうか?

 

sorts,query,propertiesの値がわからず・・・こちらは例で言うとどういう値が入りますか?sorts,query,propertiesの値がわからず・・・こちらは例で言うとどういう値が入りますか?propertyNameを正常の値へpropertyNameを正常の値へ

0 Upvotes
shizaki
Teilnehmer/-in | Platinum Partner
Teilnehmer/-in | Platinum Partner

SearchAPIのプロパティについて

lösung

@MishimaKuniki さん


レスしようとしたら@WendyGoh さんが完璧なお答えをされていました😅

 

蛇足かもしれませんが一つだけ補足させていただくと、
@WendyGoh さんのキャプチャにもありますが"query"の値を空にするのがミソだと思います。


https://developers.hubspot.com/docs/api/crm/search
のSearchのところに書かれていますが、queryに何か値があるとその文字列でプロパティを色々と検索する仕様のようです。
なのでqueryにデフォルトで入ってる「string」を入れたままだとプロパティ(nameとかdomainとか)に「string」という文字列が入ってるcompanyを探しにいってしまいます。
(上記リンクにある例はcontactですが、companyも同様かと思われます。)

身も蓋もないですが、API Docsのテストコールからだと余計なパラメータが強制的に色々くっついちゃうので、何か試す際はpostman等の外部サービス使うほうが逆に手軽かもしれませんね。

MishimaKuniki
Mitwirkender/Mitwirkende

SearchAPIのプロパティについて

lösung

@WendyGoh さん

@shizaki さん

 

大変参考になる回答ありがとうございます!

無事にquerryを空にしてみたところ、APIコールがうまく行きました!

 

@shizaki さんのおっしゃる通り、postman通した方が早い場合もあるのですね!

丁寧な解説ありがとうございます!

これでAPIの連携で使用していくことができます😂

 

またこちらで度々質問させていただきますが、よろしくお願いいたします!

0 Upvotes
WendyGoh
Lösung
HubSpot Employee
HubSpot Employee

SearchAPIのプロパティについて

lösung

Hey @MishimaKuniki,

 

No worries at all 🙂 

 

Thanks for the further clarification! When looking to search for company domain on the documentation here, you can do so like this:

 

example.png

  • Do note that I set the limit to 1 so that it will return at least one company. Since company domain name is unique, I wouldn't expect the result to return more than one company record. However, if you're looking to retrieve company records based on other properties that may return more than one company records, you may want to set this value higher. The maximum limit is 100.
natsumimori
Community-Manager/-in
Community-Manager/-in

SearchAPIのプロパティについて

lösung

@WendyGoh Is there anything else you can suggest to him?

0 Upvotes
natsumimori
Community-Manager/-in
Community-Manager/-in

SearchAPIのプロパティについて

lösung

@dennisedson would you be able to share your advice for @MishimaKuniki ?

 

@MishimaKuniki さん

API関連のご質問のため、Developers' Forum ManagerのDennisを仲介させていただきますね。また、こちら関連していそうな日本語資料です:[CRM API|検索]

0 Upvotes
MishimaKuniki
Mitwirkender/Mitwirkende

SearchAPIのプロパティについて

lösung

@natsumimori さん

ありがとうございます!

よろしくお願いいたします!

0 Upvotes
natsumimori
Community-Manager/-in
Community-Manager/-in

SearchAPIのプロパティについて

lösung

@WendyGoh would you be able to help out @MishimaKuniki ?

0 Upvotes