Method: monetization.subscriptions.batchUpdate
تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعمل هذه السياسة على تعديل مجموعة من الاشتراكات.
يمكنك ضبط حقل TimeTolerance في الطلبات المتداخلة على PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT لتحقيق الحد الأقصى من سرعة معالجة بيانات التحديثات.
طلب HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions:batchUpdate
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
packageName | string مطلوب. التطبيق الرئيسي (اسم الحزمة) الذي يجب تعديل الاشتراكات له يجب أن تكون القيمة مساوية لحقل packageName على جميع موارد الاشتراك. |
نص الطلب
يحتوي نص الطلب على بيانات بالبنية التالية:
الحقول |
requests[] | object (UpdateSubscriptionRequest ) مطلوب. قائمة بطلبات التعديل لما يصل إلى 100 عنصر. يجب تعديل اشتراكات مختلفة في جميع الطلبات. |
نص الاستجابة
رسالة ردّ على BatchUpdateSubscription
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{ "subscriptions": [ { object (Subscription ) } ] } |
الحقول |
subscriptions[] | object (Subscription ) قائمة الاشتراكات المعدَّلة |
نطاقات الأذونات
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/androidpublisher
UpdateSubscriptionRequest
طلب رسالة for Subscriptions.patch
الحقول |
subscription | object (Subscription ) مطلوب. الاشتراك المطلوب تعديله |
updateMask | string (FieldMask format) مطلوب. قائمة الحقول التي سيتم تعديلها هذه قائمة مفصولة بفواصل تضم أسماء الحقول المؤهلة بالكامل. مثال: "user.displayName,photo" |
regionsVersion | object (RegionsVersion ) مطلوب. إصدار المناطق المتاحة التي يتم استخدامها للاشتراك. |
allowMissing | boolean اختياريّ. إذا تم ضبط السياسة على "صحيح"، ولم يكن الاشتراك بالاسمَين packageName وproductId المحدّدَين، سيتم إنشاء الاشتراك. في حال إنشاء اشتراك جديد، يتم تجاهل updateMask. |
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 a batch of up to 100 subscriptions for a specified Android app package.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing a list of \u003ccode\u003eUpdateSubscriptionRequest\u003c/code\u003e objects, each specifying the subscription to update and desired changes.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes an HTTP POST request to \u003ccode\u003ehttps://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions:batchUpdate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAllows for creating new subscriptions if they don't exist by setting \u003ccode\u003eallowMissing\u003c/code\u003e to true within the \u003ccode\u003eUpdateSubscriptionRequest\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eOffers control over update propagation latency using the \u003ccode\u003elatencyTolerance\u003c/code\u003e field for optimized throughput.\u003c/p\u003e\n"]]],["This document details the process of batch updating subscriptions via an HTTP POST request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions:batchUpdate`. The request body includes a list of `UpdateSubscriptionRequest` objects, each specifying a subscription to update, fields to modify, and region information. The response body returns a list of updated `Subscription` objects. A maximum of 100 requests is allowed and `packageName` must be specified. Optionally, new subscriptions can be created if they do not exist.\n"],null,["- [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.BatchUpdateSubscriptionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [UpdateSubscriptionRequest](#UpdateSubscriptionRequest)\n - [JSON representation](#UpdateSubscriptionRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates a batch of subscriptions.\n\nSet the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput.\n\nHTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions:batchUpdate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) for which the subscriptions should be updated. Must be equal to the packageName field on all the Subscription resources. |\n\nRequest 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/monetization.subscriptions/batchUpdate#UpdateSubscriptionRequest) } ] } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[UpdateSubscriptionRequest](/android-publisher/api-ref/rest/v3/monetization.subscriptions/batchUpdate#UpdateSubscriptionRequest)`)` Required. A list of update requests of up to 100 elements. All requests must update different subscriptions. |\n\nResponse body Response message for BatchUpdateSubscription.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"subscriptions\": [ { object (/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription) } ] } ``` |\n\n| Fields ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| `subscriptions[]` | `object (`[Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription)`)` The updated subscriptions list. |\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nUpdateSubscriptionRequest Request message for subscriptions.patch.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"subscription\": { object (/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription) }, \"updateMask\": string, \"regionsVersion\": { object (/android-publisher/api-ref/rest/v3/RegionsVersion) }, \"allowMissing\": boolean, \"latencyTolerance\": enum (/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance) } ``` |\n\n| Fields ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `subscription` | `object (`[Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription)`)` Required. The subscription to update. |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. The list of fields to be updated. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n| `regionsVersion` | `object (`[RegionsVersion](/android-publisher/api-ref/rest/v3/RegionsVersion)`)` Required. The version of the available regions being used for the subscription. |\n| `allowMissing` | `boolean` Optional. If set to true, and the subscription with the given packageName and productId doesn't exist, the subscription will be created. If a new subscription is created, updateMask is ignored. |\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. |"]]