Method: inappproducts.batchUpdate
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تؤدي إلى تعديل منتج واحد أو أكثر داخل التطبيق أو إدراجه (المنتجات المُدارة أو الاشتراكات).
يمكنك ضبط حقل TimeTolerance في الطلبات المتداخلة على PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT لتحقيق الحد الأقصى من سرعة معالجة بيانات التحديثات.
يجب عدم استخدام هذه الطريقة بعد الآن لتعديل الاشتراكات. راجِع هذه المقالة للاطّلاع على مزيد من المعلومات.
طلب HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchUpdate
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
packageName |
string
اسم حزمة التطبيق
|
نص الطلب
يحتوي نص الطلب على بيانات بالبنية التالية:
الحقول |
requests[] |
object (InappproductsUpdateRequest )
مطلوب. طلبات تعديل فردية يجب إدخال طلب واحد على الأقل. يمكن أن يحتوي على ما يصل إلى 100 طلب. يجب أن تتوافق جميع الطلبات مع منتجات مختلفة داخل التطبيق.
|
نص الاستجابة
الرد على تحديث مجمّع للمنتجات داخل التطبيق
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"inappproducts": [
{
object (InAppProduct )
}
]
} |
الحقول |
inappproducts[] |
object (InAppProduct )
المنتجات داخل التطبيق المعدَّلة أو المدرَجة
|
نطاقات الأذونات
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/androidpublisher
InappproductsUpdateRequest
طلب تعديل منتج داخل التطبيق
تمثيل JSON |
{
"packageName": string,
"sku": string,
"autoConvertMissingPrices": boolean,
"inappproduct": {
object (InAppProduct )
},
"allowMissing": boolean,
"latencyTolerance": enum (ProductUpdateLatencyTolerance )
} |
الحقول |
packageName |
string
اسم حزمة التطبيق
|
sku |
string
معرّف فريد للمنتج داخل التطبيق
|
autoConvertMissingPrices |
boolean
إذا كانت القيمة "صحيحة"، سيتم تحويل الأسعار تلقائيًا إلى العملة المستهدفة استنادًا إلى السعر التلقائي في جميع المناطق التي يستهدفها التطبيق الرئيسي والتي لم يتم تحديد سعر لها لهذا المنتج داخل التطبيق. وتكون القيمة التلقائية على "خطأ".
|
inappproduct |
object (InAppProduct )
المنتج الجديد داخل التطبيق.
|
allowMissing |
boolean
في حال ضبط هذه السياسة على "صحيح"، ولم يتوفّر المنتج داخل التطبيق الذي يحمل اسم packageName أو رمز التخزين التعريفي المحدَّدين، سيتم إنشاء المنتج داخل التطبيق.
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
اختياريّ. مقدار التفاوت في وقت الاستجابة لنشر تحديث المنتج هذا يتم ضبط الإعدادات التلقائية على الحساسية لوقت الاستجابة.
|
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eUpdates or inserts one or more in-app products (managed products or subscriptions) using batch update.\u003c/p\u003e\n"],["\u003cp\u003eThis method utilizes an HTTP POST request to \u003ccode\u003ehttps://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchUpdate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach request can contain up to 100 individual update requests, all corresponding to different in-app products.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003elatencyTolerance\u003c/code\u003e can be set to \u003ccode\u003ePRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT\u003c/code\u003e for maximum throughput.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This outlines the `batchUpdate` method for in-app products, accessible via a POST HTTP request to a specified URL. It allows updating or inserting multiple in-app products (managed products) within a single request, capped at 100. The request body contains an array of `InappproductsUpdateRequest` objects, each defining updates to an in-app product using its package name and unique SKU, with option to automatically convert missing prices. The response returns a list of the updated or inserted in-app products. Subscription updates are not supported by this method.\n"],null,["# Method: inappproducts.batchUpdate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.InappproductsBatchUpdateResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [InappproductsUpdateRequest](#InappproductsUpdateRequest)\n - [JSON representation](#InappproductsUpdateRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates or inserts one or more in-app products (managed products or subscriptions).\n\nSet the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput.\n\nThis method should no longer be used to update subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchUpdate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|-----------------------------------|\n| `packageName` | `string` Package name of the app. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requests\": [ { object (/android-publisher/api-ref/rest/v3/inappproducts/batchUpdate#InappproductsUpdateRequest) } ] } ``` |\n\n| Fields ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[InappproductsUpdateRequest](/android-publisher/api-ref/rest/v3/inappproducts/batchUpdate#InappproductsUpdateRequest)`)` Required. Individual update requests. At least one request is required. Can contain up to 100 requests. All requests must correspond to different in-app products. |\n\n### Response body\n\nResponse for a batch in-app product update.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------|\n| ``` { \"inappproducts\": [ { object (/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct) } ] } ``` |\n\n| Fields ||\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `inappproducts[]` | `object (`[InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct)`)` The updated or inserted in-app products. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nInappproductsUpdateRequest\n--------------------------\n\nRequest to update an in-app product.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"packageName\": string, \"sku\": string, \"autoConvertMissingPrices\": boolean, \"inappproduct\": { object (/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct) }, \"allowMissing\": boolean, \"latencyTolerance\": enum (/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance) } ``` |\n\n| Fields ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Package name of the app. |\n| `sku` | `string` Unique identifier for the in-app product. |\n| `autoConvertMissingPrices` | `boolean` If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. |\n| `inappproduct` | `object (`[InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct)`)` The new in-app product. |\n| `allowMissing` | `boolean` If set to true, and the in-app product with the given packageName and sku doesn't exist, the in-app product will be created. |\n| `latencyTolerance` | `enum (`[ProductUpdateLatencyTolerance](/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance)`)` Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. |"]]