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
585 stars 730 forks source link

[BUG] [SP-API] [Issue] Error 99022 - Required value missing for field width #2860

Closed AgilineDeveloper closed 1 year ago

AgilineDeveloper commented 1 year ago

I have been at this a while and can't seem to find any information on what value is missing from width, height, and length. Any insight would be greatly appreciated!

REQUEST:

PUT https://sellingpartnerapi-na.amazon.com/ /listings/2020-09-01 /items/{{sellerId}}/test2?marketplaceIds=ATVPDKIKX0DER PARAMS:

marketplaceIds:ATVPDKIKX0DER issueLocale:en_US HEADERS:

Content-Type:application/json Accept:application/json x-amz-access-token:{{accessToken}} BODY:

{
    "productType": "LUGGAGE",
    "requirements": "LISTING",
    "attributes": {
        "condition_type": [
            {
                "value": "new_new",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "brand": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "item_name": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "item_type_keyword": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "color": [
            {
                "value": "Grey",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "product_description": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "supplier_declared_material_regulation": [
            {
                "value": "not_applicable"
            }
        ],
        "merchant_suggested_asin": [
            {
                "value": 1234567890,
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "batteries_required": [
            {
                "value": false,
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "item_package_dimensions": [
            {
                "height": {
                    "value": 2.0,
                    "unit": "IN"
                }
            },
            {
                "length": {
                    "value": 16.50,
                    "unit": "IN"
                }
            },
            {
                "width": {
                    "value": 4.20,
                    "unit": "IN"
                }
            }
        ],
        "item_type_name": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "item_package_weight": [
            {
                "value": "4",
                "unit": "kilograms"
            }
        ],
        "supplier_declared_dg_hz_regulation": [
            {
                "value": "not_applicable"
            }
        ],
        "externally_assigned_product_identifier": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "material": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "country_of_origin": [
            {
                "value": "US",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "department": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "model_name": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "model_number": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "style": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ],
        "bullet_point": [
            {
                "value": "Howdy",
                "language_tag": "en_US",
                "marketplace_id": "{{!marketplaceID!}}"
            }
        ]
    }
}

RESPONSE:

{
    "sku": "test2",
    "status": "INVALID",
    "submissionId": "58273f3a7ac64418afc725d2df66728b",
    "issues": [
        {
            "code": "99022",
            "message": "Required value missing for field width.",
            "severity": "ERROR",
            "attributeName": "item_package_dimensions"
        },
        {
            "code": "99022",
            "message": "Required value missing for field height.",
            "severity": "ERROR",
            "attributeName": "item_package_dimensions"
        },
        {
            "code": "99022",
            "message": "Required value missing for field length.",
            "severity": "ERROR",
            "attributeName": "item_package_dimensions"
        }
    ]
}

I'm testing using Postman.

Thanks again!

littleylv commented 1 year ago
        "item_package_dimensions": [
            {
                "height": {
                    "value": 2.0,
                    "unit": "IN"
                }
            },
            {
                "length": {
                    "value": 16.50,
                    "unit": "IN"
                }
            },
            {
                "width": {
                    "value": 4.20,
                    "unit": "IN"
                }
            }
        ],

should be:

        "item_package_dimensions": [
            {
                "height": {
                    "value": 2.0,
                    "unit": "IN"
                },
                "length": {
                    "value": 16.50,
                    "unit": "IN"
                },
                "width": {
                    "value": 4.20,
                    "unit": "IN"
                },
                "marketplace_id": "your_marketplace_id"
            }
        ],
sungolivia commented 1 year ago

@SoftwareDeveloper2010 have you tried what @littleylv mentioned ^?

AgilineDeveloper commented 1 year ago
        "item_package_dimensions": [
            {
                "height": {
                    "value": 2.0,
                    "unit": "IN"
                }
            },
            {
                "length": {
                    "value": 16.50,
                    "unit": "IN"
                }
            },
            {
                "width": {
                    "value": 4.20,
                    "unit": "IN"
                }
            }
        ],

should be:

        "item_package_dimensions": [
            {
                "height": {
                    "value": 2.0,
                    "unit": "IN"
                },
                "length": {
                    "value": 16.50,
                    "unit": "IN"
                },
                "width": {
                    "value": 4.20,
                    "unit": "IN"
                },
                "marketplace_id": "your_marketplace_id"
            }
        ],

Thank you so much for this! Solves that issue!

I seem to be getting these errors now:

{
    "sku": "test2",
    "status": "INVALID",
    "submissionId": "1f85ba713b82431d9bd755c8626a29ff",
    "issues": [
        {
            "code": "90244",
            "message": "Invalid enumerated value 'IN' for attribute 'item_package_dimensions'.",
            "severity": "ERROR",
            "attributeName": "item_package_dimensions"
        },
        {
            "code": "90220",
            "message": "'condition_type' is required but not supplied.",
            "severity": "ERROR",
            "attributeName": "condition_type"
        }
    ]
}

Any idea what these are referring to? condition_type is there and I'm not to sure about the first one.

Thank you again @littleylv !!

sungolivia commented 1 year ago

Hey @SoftwareDeveloper2010 side question from me I just noticed you are using older version of the Listings API, any particular reason why not for the 2021 version?

AgilineDeveloper commented 1 year ago

Hey @SoftwareDeveloper2010 side question from me I just noticed you are using older version of the Listings API, any particular reason why not for the 2021 version?

Not really. I'll change it now to see if it changes anything. Thank you for the suggestion!

AgilineDeveloper commented 1 year ago

Hey @SoftwareDeveloper2010 side question from me I just noticed you are using older version of the Listings API, any particular reason why not for the 2021 version?

Not really. I'll change it now to see if it changes anything. Thank you for the suggestion!

Its updated to 2021-08-01 and still facing the same errors unfortunately.

littleylv commented 1 year ago

I suggest you read the Guide first before coding:

Listings data submitted to the Listings Items API adheres to the JSON Schema format provided by the Selling Partner API for Product Type Definitions. See the Product Type Definitions API documentation for details on retrieving schemas for supported Amazon product types and validating data prior to submitting to Amazon with the Listings Items API.

unit should be one of "centimeters","feet","inches","meters","millimeters","yards", not IN. And condition_type is required.

AgilineDeveloper commented 1 year ago

Thank you again @littleylv! My issue with the condition_type is it is supplied. Its the first attribute supplied.

github-actions[bot] commented 1 year ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

github-actions[bot] commented 1 year ago

closed for inactivity