Skip to content

Validation Rules for Size Attributes (apparel_size, shapewear_size, etc.) and Discrepancy Between Schema and Actual Validation #5080

@coderpang

Description

@coderpang

Hello,

I am working with the Selling Partner API and have questions regarding the validation logic for various size-related attributes such as apparel_size, bottles_size, footwear_size, headwear_size, shapewear_size, and shirt_size.

Validation Logic & Documentation: Could you please clarify how the validation rules for these size attributes work? Specifically, is there any official documentation that explains the flow or logic behind these validations? For example, how do fields like size_class, size_system, age_range_description, and target_gender interact to determine if a given size value is valid?

Encountered Discrepancy (US Marketplace, BRA Category): I am encountering a validation error for the shapewear_size attribute in the US marketplace for the BRA (Clothing & Accessories) category that seems to contradict the provided JSON schema.

Error Message:

Based on the data from '[shapewear_size#?.size_class, shapewear_size#?.size_system, age_range_description.value, target_gender.value]', the 'jaspo_s' on the field '"size"' for the attribute 'Shapewear Size' is not a valid value. Please provide a valid value.

Schema Context: According to the shapewear_size JSON schema (provided below), the enum for the size field explicitly includes "jaspo_s" as a valid value. This value corresponds to the display string "S" in the enumNames array.
This creates confusion because the schema suggests "jaspo_s" is acceptable, but the validation service rejects it based on a combination of other field values.

My question is: What is the specific validation logic that causes "jaspo_s" to be considered invalid in this context (US marketplace, BRA category, with my specific combination of size_class, size_system, etc.)? How should we interpret the schema enum list in relation to these cross-field validations?

For reference, here is the relevant portion of the shapewear_size schema (items.properties.size):

{
  "size": {
    "hidden": false,
    "examples": ["9, Medium, 9 Months"],
    "enumNames": ["0", "0 Go", ... , "S", ... , "XXG"], // Note "S" is present
    "editable": true,
    "description": "Provide the size value associated with the size system and size class.",
    "title": "Size Value",
    "type": "string",
    "enum": ["numeric_0", "go_0", ... , "jaspo_s", ... , "xxg"] // Note "jaspo_s" is present
  },
  // ... other properties (size_system, size_class, etc.)
}

Any insight into the validation workflow or documentation covering these rules would be greatly appreciated. This will help us submit correct data and handle errors more effectively.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions