question

faisal-optini avatar image
faisal-optini asked

ShoppingService.search returns INVALID_PARAMETER for category "MoviesAndTV"

ShoppingService.search seems to work fine for categories like Music, Jewelry and Electronics etc, but i am getting INVALID_PARAMETER in response status, when i search for category "MoviesAndTV". I have also seen that response returned by Movies is identical to response returned by MobileApps (which is not supported by Mobile Associats API) This is how I did It: SearchRequest searchRequest = new SearchRequest(" MoviesAndTV ", " "); AssociatesAPI.getShoppingService().search(searchRequest); This is the response i m getting: { "page": 0, "products": [], "status": "INVALID_PARAMETER", "requestId": "75ef0910-e12e-4f47-a10b-7170db3fd151", "totalPages": 0 } This is product data I have added in amazon.sdktester.product.json which is present at root of sdcard "B00F91RYL8": { "productType":"DIGITAL", "brand" : "", "category": "MoviesAndTV", "rating": 4.0, "title":"World War Z", "description":"World War Z is the fast-paced, pulse-pounding epic of the potential last days of the human race. Former United Nations employee Gerry Lane (Brad Pitt) is called in to help stop the pandemic that has spread around the world.", "price":{"currency":"USD", "value":107.00}, "image" : {"width":66, "height":66, "url":" http://ecx.images-amazon.com/images/I/517blCGZzDL._SX215_.jpg"} } Amazon app Tester version: 1.0.0.27
mobile associates
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

faisal-optini avatar image
faisal-optini answered
I have got the above in Mobile Associates API for Android[b][/b]
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
Hi faisal_optini, Yours: SearchRequest searchRequest = new SearchRequest(" MoviesAndTV ", " "); Proposed : SearchRequest searchRequest = new SearchRequest("MoviesAndTV", " "); Note that there is no spaces before and after "MoviesAndTV" category, It should match the json file which has "category": "MoviesAndTV".
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
Can you check the complete json(amazon.sdktester.product.json) in valid or not The JSON Validator might be useful link to validate : http://jsonlint.com/
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Faisal, Are you able to fix the issue? Sorry for the attending your query so late.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Faisal, Is there any reason you are passing search term as empty string? Search term is a mandatory parameter in SearchRequest constructor.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Faisal, Since in my last post the search term is a mandatory field in SearchRequest constructor and cannot be a space.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.