According to the documentation for the Google Play Developer API , I should be able to perform insert or update requests. However, Im running into a problem when it seems that either the documentation is wrong, the API is broken, or I just missed something.
Im POST in the URL: https://www.googleapis.com/androidpublisher/v2/applications/inappproducts/batch?access_token=<my token here>&autoConvertMissingPrices=true' My Content-Type is set to: application / json And the body of my POST` is the following:
{ "entrys": [{ "batchId": "<my batch id>", "methodName": "update", "inappproductsupdaterequest": { "inappproduct": { "packageName": "<my package name>", "sku": "<my product sku>", "status": "active", "purchaseType": "managedUser", "defaultPrice": { "priceMicros": "<my price>", "currency": "USD" }, "listings": { "en-US": { "title": "<my title> ", "description": "<my description>" } }, "defaultLanguage": "en-US" } } }] }
When I POST , I get the following error:
{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Required parameter: [entry[0].inappproductsUpdateRequest.package_name]", "locationType": "parameter", "location": "[entry[0].inappproductsUpdateRequest.package_name]" } ], "code": 400, "message": "Required parameter: [entry[0].inappproductsUpdateRequest.package_name]" } }
If Im reading this correctly, they want the package name parameter to be a child of inappproductsUpdateRequest . However, when I try to move or copy (tried both) "packageName": "<my package name>" as a child under inappproductsUpdateRequest , I get an error message:
{ "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Unknown field name: packageName", "locationType": "other", "location": "entrys.inappproductsupdaterequest" } ], "code": 400, "message": "Unknown field name: packageName" } }
I get the same error when I try package_name instead of packageName .
Any thoughts?