تتضمّن واجهة برمجة التطبيقات
لأداء الأعمال في Google طريقة واجهة برمجة تطبيقات
جديدة تتيح جلب عدة "مقاييس يومية" في طلب واحد لواجهة برمجة التطبيقات.
يُرجى مراجعة
الجدول الزمني للإيقاف وتعليمات نقل البيانات من طريقة v4 reportInsights API إلى واجهة برمجة التطبيقات الخاصة بأداء "الملف التجاري على Google".
العمل مع بيانات الحساب
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توضّح لك هذه المقالة التعليمية كيفية العمل مع بيانات الحساب. تتيح لك واجهة برمجة التطبيقات My Business Account Management API
تنفيذ ما يلي:
- إدراج جميع الحسابات
- عرض حساب محدّد
- تعديل حساب
قبل البدء
قبل استخدام واجهة برمجة التطبيقات My Business Account Management API، عليك تسجيل تطبيقك
والحصول على بيانات اعتماد OAuth 2.0.
للاطّلاع على تفاصيل عن كيفية بدء استخدام واجهات برمجة تطبيقات "الملف التجاري على Google"، يُرجى الاطّلاع على الإعداد الأساسي.
سرد جميع الحسابات
من الطرق الرائعة للتحقّق من صحة الحسابات المرتبطة بمستخدم تمّت مصادقة هويته هي
إدراج جميع حساباته. استخدِم واجهة برمجة التطبيقات accounts.list
لعرض جميع الحسابات المرتبطة بمستخدم معيّن.
لإدراج جميع حسابات مستخدم تمّت المصادقة عليه، استخدِم ما يلي:
$ GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts
عرض حساب معيّن
في بعض الأحيان، تريد فقط الاطّلاع على معلومات عن حساب معيّن لمستخدم
تم مصادقة هويته. استخدِم واجهة برمجة التطبيقات accounts.get
لعرض حساب محدّد ومراجعة تفاصيل إضافية للحساب.
لعرض حساب معيّن حسب الاسم، استخدِم ما يلي:
$ GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}
تعديل حساب
يُعدّ تغيير اسم الحساب مهمة إدارية أساسية. استخدِم واجهة برمجة التطبيقات
accounts.update
لتغيير
اسم الحساب.
لتعديل حساب معيّن حسب الاسم، استخدِم ما يلي:
$ PUT https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}
{
"account": {
"accountName": "Anne Droyd"
},
"languageCode": "en",
"validateOnly": "true"
}
القيود
- الحقل الوحيد القابل للتعديل في الحساب هو
accountName
. ويتم تجاهل أي حقول أخرى
تم تمريرها.
- لا يمكن تعديل الحسابات من النوع
BUSINESS
إلا بهذه الطريقة.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe My Business Account Management API allows you to manage business accounts, including listing all accounts, retrieving specific account details, and updating account names.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, you must register your application and obtain OAuth 2.0 credentials as outlined in the basic setup guide.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve a list of all accounts associated with an authenticated user or fetch details for a specific account using dedicated API endpoints.\u003c/p\u003e\n"],["\u003cp\u003eUpdating an account is restricted to changing the account name for business type accounts only, with other fields being ignored.\u003c/p\u003e\n"]]],[],null,["# Work with account data\n\n\u003cbr /\u003e\n\nThis tutorial shows you how to work with account data. The My Business Account Management API\nprovides you with the ability to do the following:\n\n- List all accounts.\n- Return a specific account.\n- Update an account.\n\nBefore you begin\n----------------\n\nBefore you use the My Business Account Management API, you need to register your application\nand obtain OAuth 2.0 credentials.\n\nFor details on how to get started with the Business Profile APIs, see\n[Basic setup](/my-business/content/basic-setup).\n\nList all accounts\n-----------------\n\nA great way to validate the accounts associated with an authenticated user is to\nlist all their accounts. Use the [`accounts.list`](/my-business/reference/accountmanagement/rest/v1/accounts/list)\nAPI to list all accounts associated with a user.\n\nTo list all the accounts for an authenticated user, use the following:\nHTTP \n\n```bash\n$ GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts\n```\n\nReturn a specific account\n-------------------------\n\nSometimes, you only want to see information about a specific account for an\nauthenticated user. Use the [`accounts.get`](/my-business/reference/accountmanagement/rest/v1/accounts/get)\nAPI to return a specific account and review additional account details.\n\nTo return a specific account by name, use the following:\nHTTP \n\n```bash\n$ GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}\n```\n\nUpdate an account\n-----------------\n\nChanging an account name is a fundamental administrative task. Use the\n[`accounts.update`](/my-business/reference/accountmanagement/rest/v1/accounts/patch) API to alter\nthe account name.\n\nTo update a specific account by name, use the following:\nHTTP \n\n```bash\n$ PUT https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}\n\n{\n \"account\": {\n \"accountName\": \"Anne Droyd\"\n },\n \"languageCode\": \"en\",\n \"validateOnly\": \"true\"\n}\n```\n\n### Restrictions\n\n- The only editable field for an account is `accountName`. Any other fields passed are ignored.\n- Only accounts of `BUSINESS` type can be updated in this manner."]]