> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 更新使用者

> 更新社群網路的帳號或使用者資料

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

export const HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

<PlansAvailable plans={["premium"]} maxPackRequired={false} />

更新社群網路的帳號或使用者資料。目前僅支援 Google Business Profile。

<Note>Google 限制某些 Google Business Profile 地點欄位在 24 小時滾動期間內最多只能更新 5 次。例如，若 `phoneNumbers` 在 24 小時滾動期間內更新超過 5 次，將會回傳 400 錯誤。</Note>

## 標頭參數

<HeaderAPI />

## 路徑參數

<ParamField path=":platform" type="string" required>
  值：`gbp`
</ParamField>

## Body 參數

<ParamField body="phoneNumbers" type="object">
  包含客戶可用來聯繫商家的各種電話號碼的物件。

  ```json theme={"system"}
  "phoneNumbers": {
      "primaryPhone": "212-123-4567",
      "additionalPhones": [
          "212-432-2342"
      ]
  }
  ```
</ParamField>

<ParamField body="name" type="string">
  此地點的 Google 識別碼。
</ParamField>

<ParamField body="adPhone" type="string">
  用於 AdWords 地點擴充功能顯示的替代電話號碼，取代該地點的主要電話號碼。
</ParamField>

<ParamField body="storeCode" type="string">
  此地點的外部識別碼，在指定的帳號中必須唯一。用於將該地點與你自己的紀錄關聯起來。
</ParamField>

<ParamField body="title" type="string">
  地點名稱應反映商家在真實世界中的名稱，並與店面、網站、文具用品上一致，也是客戶所熟知的名稱。
</ParamField>

<ParamField body="websiteUrl" type="string">
  此商家的 URL。
</ParamField>

<ParamField body="labels" type="array">
  一組自由格式的字串，可用來為你的商家加上標籤。這些標籤不對外顯示，僅你自己看得見。每個標籤必須介於 1-255 字元。
</ParamField>

<ParamField body="latlng" type="object">
  代表一組經緯度的物件。以一對雙精度浮點數表示緯度與經度（單位為度）。除非另有說明，此物件必須遵循 WGS84 標準。

  ```json theme={"system"}
  {
      "latitude": number,
      "longitude": number
  }
  ```

  數值必須位於標準化範圍內。

  緯度（度），必須介於 \[-90.0, +90.0]。

  經度（度），必須介於 \[-180.0, +180.0]。
</ParamField>

<ParamField body="profile" type="object">
  此欄位包含以你自己口吻撰寫的地點描述，其他人無法編輯。

  ```json theme={"system"}
  {
      "description": string
  }
  ```
</ParamField>

<ResponseExample>
  ```json 200: Success theme={"system"}
  {
      "gmb": {
          "status": "success",
          "data": {
              "name": "locations/4913369732395328466",
              "languageCode": "en",
              "title": "Ayrshare",
              "phoneNumbers": {},
              "categories": {
                  "primaryCategory": {
                      "name": "categories/gcid:software_company",
                      "displayName": "Software company",
                      "serviceTypes": [
                          {
                              "serviceTypeId": "job_type_id:application_development",
                              "displayName": "Application development"
                          },
                          {
                              "serviceTypeId": "job_type_id:big_data_consulting_and_implementation",
                              "displayName": "Big data consulting & implementation"
                          },
                          {
                              "serviceTypeId": "job_type_id:data_center_management",
                              "displayName": "Data center management"
                          },
                          {
                              "serviceTypeId": "job_type_id:data_quality_management",
                              "displayName": "Data quality management"
                          },
                          {
                              "serviceTypeId": "job_type_id:enterprise_software_development",
                              "displayName": "Enterprise software development"
                          },
                          {
                              "serviceTypeId": "job_type_id:it_consulting",
                              "displayName": "It consulting"
                          },
                          {
                              "serviceTypeId": "job_type_id:mobile_app_development",
                              "displayName": "Mobile app development"
                          },
                          {
                              "serviceTypeId": "job_type_id:platform_consulting",
                              "displayName": "Platform consulting"
                          },
                          {
                              "serviceTypeId": "job_type_id:security_services_management",
                              "displayName": "Security services management"
                          },
                          {
                              "serviceTypeId": "job_type_id:software_consulting",
                              "displayName": "Software consulting"
                          },
                          {
                              "serviceTypeId": "job_type_id:software_development",
                              "displayName": "Software development"
                          },
                          {
                              "serviceTypeId": "job_type_id:software_development_outsourcing",
                              "displayName": "Software development outsourcing"
                          },
                          {
                              "serviceTypeId": "job_type_id:solution_consulting",
                              "displayName": "Solution consulting"
                          }
                      ],
                      "moreHoursTypes": [
                          {
                              "hoursTypeId": "ACCESS",
                              "displayName": "Access",
                              "localizedDisplayName": "Access"
                          },
                          {
                              "hoursTypeId": "BREAKFAST",
                              "displayName": "Breakfast",
                              "localizedDisplayName": "Breakfast"
                          },
                          {
                              "hoursTypeId": "BRUNCH",
                              "displayName": "Brunch",
                              "localizedDisplayName": "Brunch"
                          },
                          {
                              "hoursTypeId": "DELIVERY",
                              "displayName": "Delivery",
                              "localizedDisplayName": "Delivery"
                          },
                          {
                              "hoursTypeId": "DINNER",
                              "displayName": "Dinner",
                              "localizedDisplayName": "Dinner"
                          },
                          {
                              "hoursTypeId": "DRIVE_THROUGH",
                              "displayName": "Drive through",
                              "localizedDisplayName": "Drive through"
                          },
                          {
                              "hoursTypeId": "HAPPY_HOUR",
                              "displayName": "Happy hours",
                              "localizedDisplayName": "Happy hours"
                          },
                          {
                              "hoursTypeId": "KITCHEN",
                              "displayName": "Kitchen",
                              "localizedDisplayName": "Kitchen"
                          },
                          {
                              "hoursTypeId": "LUNCH",
                              "displayName": "Lunch",
                              "localizedDisplayName": "Lunch"
                          },
                          {
                              "hoursTypeId": "ONLINE_SERVICE_HOURS",
                              "displayName": "Online service hours",
                              "localizedDisplayName": "Online service hours"
                          },
                          {
                              "hoursTypeId": "PICKUP",
                              "displayName": "Pickup",
                              "localizedDisplayName": "Pickup"
                          },
                          {
                              "hoursTypeId": "TAKEOUT",
                              "displayName": "Takeout",
                              "localizedDisplayName": "Takeout"
                          },
                          {
                              "hoursTypeId": "SENIOR_HOURS",
                              "displayName": "Senior hours",
                              "localizedDisplayName": "Senior hours"
                          }
                      ]
                  },
                  "additionalCategories": [
                      {
                          "name": "categories/gcid:automation_company",
                          "displayName": "Automation company",
                          "moreHoursTypes": [
                              {
                                  "hoursTypeId": "ACCESS",
                                  "displayName": "Access",
                                  "localizedDisplayName": "Access"
                              },
                              {
                                  "hoursTypeId": "BREAKFAST",
                                  "displayName": "Breakfast",
                                  "localizedDisplayName": "Breakfast"
                              },
                              {
                                  "hoursTypeId": "BRUNCH",
                                  "displayName": "Brunch",
                                  "localizedDisplayName": "Brunch"
                              },
                              {
                                  "hoursTypeId": "DELIVERY",
                                  "displayName": "Delivery",
                                  "localizedDisplayName": "Delivery"
                              },
                              {
                                  "hoursTypeId": "DINNER",
                                  "displayName": "Dinner",
                                  "localizedDisplayName": "Dinner"
                              },
                              {
                                  "hoursTypeId": "DRIVE_THROUGH",
                                  "displayName": "Drive through",
                                  "localizedDisplayName": "Drive through"
                              },
                              {
                                  "hoursTypeId": "HAPPY_HOUR",
                                  "displayName": "Happy hours",
                                  "localizedDisplayName": "Happy hours"
                              },
                              {
                                  "hoursTypeId": "KITCHEN",
                                  "displayName": "Kitchen",
                                  "localizedDisplayName": "Kitchen"
                              },
                              {
                                  "hoursTypeId": "LUNCH",
                                  "displayName": "Lunch",
                                  "localizedDisplayName": "Lunch"
                              },
                              {
                                  "hoursTypeId": "ONLINE_SERVICE_HOURS",
                                  "displayName": "Online service hours",
                                  "localizedDisplayName": "Online service hours"
                              },
                              {
                                  "hoursTypeId": "PICKUP",
                                  "displayName": "Pickup",
                                  "localizedDisplayName": "Pickup"
                              },
                              {
                                  "hoursTypeId": "TAKEOUT",
                                  "displayName": "Takeout",
                                  "localizedDisplayName": "Takeout"
                              },
                              {
                                  "hoursTypeId": "SENIOR_HOURS",
                                  "displayName": "Senior hours",
                                  "localizedDisplayName": "Senior hours"
                              }
                          ]
                      }
                  ]
              },
              "storefrontAddress": {
                  "regionCode": "US",
                  "languageCode": "en",
                  "postalCode": "10019",
                  "administrativeArea": "NY",
                  "locality": "New York",
                  "addressLines": [
                      "142 W 57th St"
                  ]
              },
              "websiteUri": "https://www.ayrshare.com/",
              "regularHours": {
                  "periods": [
                      {
                          "openDay": "SUNDAY",
                          "openTime": {},
                          "closeDay": "SUNDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      },
                      {
                          "openDay": "MONDAY",
                          "openTime": {},
                          "closeDay": "MONDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      },
                      {
                          "openDay": "TUESDAY",
                          "openTime": {},
                          "closeDay": "TUESDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      },
                      {
                          "openDay": "WEDNESDAY",
                          "openTime": {},
                          "closeDay": "WEDNESDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      },
                      {
                          "openDay": "THURSDAY",
                          "openTime": {},
                          "closeDay": "THURSDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      },
                      {
                          "openDay": "FRIDAY",
                          "openTime": {},
                          "closeDay": "FRIDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      },
                      {
                          "openDay": "SATURDAY",
                          "openTime": {},
                          "closeDay": "SATURDAY",
                          "closeTime": {
                              "hours": 24
                          }
                      }
                  ]
              },
              "serviceArea": {
                  "businessType": "CUSTOMER_AND_BUSINESS_LOCATION",
                  "places": {
                      "placeInfos": [
                          {
                              "placeName": "United States",
                              "placeId": "ChIJCzYy5IS16lQRQrfeQ5K5Oxw"
                          }
                      ]
                  },
                  "regionCode": "US"
              },
              "openInfo": {
                  "status": "OPEN",
                  "canReopen": true
              },
              "metadata": {
                  "hasPendingEdits": true,
                  "canDelete": true,
                  "canModifyServiceList": true,
                  "placeId": "ChIJN53jw8BZwokRBEeVVtPLkkg",
                  "mapsUri": "https://maps.google.com/maps?cid=5229466225881728772",
                  "newReviewUri": "https://search.google.com/local/writereview?placeid=ChIJN53jw8BZwokRBEeVVtPLkkg",
                  "hasVoiceOfMerchant": true
              },
              "profile": {
                  "description": "Easy to integrate Social Media APIs allow you to manage all your users' social accounts right from your product. Post, Auto Schedule, and Analytics. Great for SaaS, CMS, DAM, Agencies, and Apps."
              }
          }
      }
  }
  ```

  ```json 400: Too Many Updates theme={"system"}
  {
      "action": "authorization",
      "status": "error",
      "code": 227,
      "message": "Error updating GBP location data. This can occur if you attempt more than 5 updates within a rolling 24 hours period. Please wait and try again."
  }
  ```
</ResponseExample>
