英文:
Is there a limitation on primary Category of a location in Google My Business (PlaceActionLinks) for creating Place Action Links?
问题
我正在尝试为我们管理的位置创建一个“APPOINTMENT”操作类型的链接,按照此链接,但我遇到了这个错误:
{
"code" : 400,
"details" : [ {
"@type" : "type.googleapis.com/google.rpc.ErrorInfo",
"reason" : "INVALID_LOCATION_CATEGORY"
} ],
"errors" : [ {
"domain" : "global",
"message" : "Request contains an invalid argument.",
"reason" : "badRequest"
} ],
"message" : "Request contains an invalid argument.",
"status" : "INVALID_ARGUMENT"
}
位置的primaryCategory
是categories/gcid:womens_clothing_store
。
我正在通过JAVA发送请求(假设myBusinessPlaceActions是负责身份验证和API初始化的变量):
PlaceActionLink link = new PlaceActionLink();
link.setUri("APPOINTMENT URL");
link.setPlaceActionType("APPOINTMENT");
MyBusinessPlaceActions.Locations.PlaceActionLinks.Create requestCreate = myBusinessPlaceActions.locations()
.placeActionLinks().create("locations/ MY LOCATIONID", link);
相同的代码对其他客户和位置正常运行,例如primaryCategory
为categories/gcid:cosmetics_store
的位置,或者另一个客户和位置的类别为categories/gcid:spa_and_health_club
。出了什么问题?
英文:
I am trying to create an "APPOINTMENT" action type link for the location we manage, following this link and I have this error
{
"code" : 400,
"details" : [ {
"@type" : "type.googleapis.com/google.rpc.ErrorInfo",
"reason" : "INVALID_LOCATION_CATEGORY"
} ],
"errors" : [ {
"domain" : "global",
"message" : "Request contains an invalid argument.",
"reason" : "badRequest"
} ],
"message" : "Request contains an invalid argument.",
"status" : "INVALID_ARGUMENT"
}
the location's primaryCategory is categories/gcid:womens_clothing_store
I am sending the request via JAVA (suppose myBusinessPlaceActions is a variable which takes care of Authentication and initialising the API):
PlaceActionLink link = new PlaceActionLink();
link.setUri("The APPONTMENT URL");
link.setPlaceActionType("APPOINTMENT");
MyBusinessPlaceActions.Locations.PlaceActionLinks.Create requestCreate= myBusinessPlaceActions.locations().
placeActionLinks().create("locations/ MY LOCATIONID", link);
The Same Code is running correctly for other client and locations, for example a location with primary category =categories/gcid:cosmetics_store
or another client and location with category =categories/gcid:spa_and_health_club
What is wrong?
答案1
得分: 1
The error message INVALID_LOCATION_CATEGORY indicates that this category in particular is not eligible for the "APPOINTMENT" place action type.
For a full list of error codes and their explanations, see the Place Actions reference.
If you did manage to produce a place action link for a location with the category categories/gcid:womens_clothing_store
, that location may either have a different category as well through which that place action link was created or that category might have place action links of that type enabled in one country and disabled in another country.
英文:
The error message INVALID_LOCATION_CATEGORY indicates that this category in particular is not eligible for the "APPOINTMENT" place action type.
For a full list of error codes and their explanations, see the Place Actions reference.
If you did manage to produce a place action link for a location with the category categories/gcid:womens_clothing_store
, that location may either have a different category as well through which that place action link was created or that category might have place action links of that type enabled in one country and disabled in another country.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论