Reputation: 1270
I am trying to use the Google Play Developer API to patch a subscription using the REST endpoint.
https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions/patch
The required query parameters are updatedMask
and regionsVersion
. When I click on the RegionsVersion
for documentation it just says:
A string representing version of the available regions being used for the specified resource.
https://developers.google.com/android-publisher/api-ref/rest/v3/RegionsVersion
Based on that description I'm not sure what kind of value it's expecting other than an object with a version property that is a string. When I omit the regionsVersion
parameter is returns the following error:
{
"error": {
"code": 400,
"message": "Regions version should be set to the default value 2022/01.",
"status": "INVALID_ARGUMENT"
}
}
Does anyone have any idea or an example of how this required parameter is intended to be used?
Upvotes: 0
Views: 364
Reputation: 776
Additional information for folks that might be using the Google API Python Client to perform "patch" operations on product data (i.e. https://googleapis.github.io/google-api-python-client/docs/dyn/androidpublisher_v3.monetization.subscriptions.html#patch)
The following arguments are required:
Example code:
response = api_client.monetization().subscriptions().patch(
packageName=bundle_id,
productId=product_id,
body=subscription_object,
regionsVersion_version='2025/01',
updateMask="basePlans"
).execute()
Upvotes: 0
Reputation: 46
I had the same issue and I found that since it's s JSON object you'll have to set its property like that with query params:
?updateMask=listings®ionsVersion.version=2022/01
This worked fine for me!
Upvotes: 3