amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
569 stars 730 forks source link

[BUG] [SP-API] [Cant Access "Product Pricing API v2022-05-01"] #2792

Closed kirislaw closed 4 months ago

kirislaw commented 4 months ago

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

SP-API Name and Version or Report/Feed Type

Expected Behavior

The API Should Respond with an Object with all prices

Current Behavior

Im a Public Developer and i have an Aplication that checks prices fro my client, my app is in darf Status, and my clients are arpoving "pricing" and "Product Listing" via the Web Authorisation Workflow. My Aplication gets the Access token without any problems before doing the request. When the Aplication tries to do the "Retrieve a list of featured offers for a batch of up to 20 ASINs" request it gets "{'errors': [{'code': 'Unauthorized', 'message': 'Access to requested resource is denied.', 'details': ''}]}" Ive tried it with the Same Roles with my account and it worked.

Context/Screenshots

On The Documentation is Written, that you need only these Roles image https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide Ive Followed all steps, and when i authorize my Account With my Aplication it works fine, only With Customer Accounts it doesnt works

This is my current code

url = f"{endpoint}/batches/products/pricing/2022-05-01/items/competitiveSummary"

    headers = {
        "Content-Type": "application/json",
        'x-amz-access-token': access_token
    }

    data = {"requests": []}

    for asin in product_info:
        request_data = {
            "asin": f"{asin[0]}",
            "marketplaceId": f"{marketplace_id}",
            "includedData": [
                "featuredBuyingOptions"
            ],
            "uri": "/products/pricing/2022-05-01/items/competitiveSummary",
            "method": "GET"
        }

        data["requests"].append(request_data)

    responses = requests.post(url, json=data, headers=headers)
    data = responses.json()

Your Environment

I Discorvered this Bug on My Local Windows Machine

rodrifed commented 4 months ago

Hi @kirislaw,

Thank you for your message.

Based on what you described, we would need Developer Support to check your issue in order to identify the root-cause. I kindly ask you to please open a support case using the contact form (under Developer support in this page), including request id and timestamp.

Thank you, Federico Selling Partner Developer Services