Is there a limitation on primary Category of a location in Google My Business (PlaceActionLinks) for creating Place Action Links?

huangapple go评论70阅读模式
英文:

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"
}

位置的primaryCategorycategories/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);

相同的代码对其他客户和位置正常运行,例如primaryCategorycategories/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.

huangapple
  • 本文由 发表于 2023年5月29日 17:12:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76356036.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定