question

rjd-ca avatar image
0 Likes"
rjd-ca asked

What do I need to change about aspectsImageVariesBy to fix my inventory item group creation error?

I keep getting back error with ID of 25709 and message of "Invalid value for aspectsImageVariesBy." while trying to create a new inventory item group. This message is very vague about what exactly is invalid about the array I provided. Can anyone give me more details about what I need to do in order to fix this? I received this error while doing a PUT to this resource: https://api.sandbox.ebay.com/sell/inventory/v1/inventory_item_group/91a4597d-70a1-4e35-8c98-4995ca25be58 Here is the request body I used:

{
	"title": "Clif Bar Energy Bar",
	"description": "Some description",
	"imageUrls": [
		"https://www.europasports.com/media/catalog/500/722252300706.jpg",
		"https://www.europasports.com/media/catalog/500/722252300904.jpg",
		"https://www.europasports.com/media/catalog/500/722252301208.jpg",
		"https://www.europasports.com/media/catalog/500/722252301307.jpg"
	],
	"variantSKUs": [
		"540002",
		"540003",
		"540007",
		"540008"
	],
	"variesBy": {
		"aspectsImageVariesBy": [
			"Flavor",
			"Size"
		],
		"specifications": [{
			"name": "Flavor",
			"values": [
				"Apricot",
				"Chocolate Chip",
				"Crunchy Peanut Butter",
				"Chocolate Chip Peanut Crunch"
			]
		}, {
			"name": "Size",
			"values": [
				"12 - 2.4 oz (68 g) bar (28.8 oz [816 g])",
				"12 - 2.4 oz (68 g) bar",
				"12 - 2.4 oz (68 g) bar [28.8 oz (816 g)] box"
			]
		}]
	}
}
And here is the response I received:

{
  "errors": [
    {
      "errorId": 25709,
      "domain": "API_INVENTORY",
      "subdomain": "Selling",
      "category": "REQUEST",
      "message": "Invalid value for aspectsImageVariesBy.",
      "parameters": [
        {
          "name": "text1",
          "value": "aspectsImageVariesBy"
        }
      ]
    }
  ]
}
**EDIT: ** Updated request body with correct specifications key. Also here is the request body that I managed to get working by removing "Size". Still trying to determine why I cannot create an inventoryItemGroup with both size and flavor variant options. See my comment for details.

{
    "title": "Clif Bar Energy Bar",
    "description": "Some description",
    "imageUrls": [
        "https://www.europasports.com/media/catalog/500/722252300706.jpg",
        "https://www.europasports.com/media/catalog/500/722252300904.jpg",
        "https://www.europasports.com/media/catalog/500/722252301208.jpg",
        "https://www.europasports.com/media/catalog/500/722252301307.jpg"
    ],
    "variantSKUs": [
        "540002",
        "540003",
        "540007",
        "540008"
    ],
    "variesBy": {
        "aspectsImageVariesBy": [
            "Flavor"
        ],
        "specifications": [{
            "name": "Flavor",
            "values": [
                "Apricot",
                "Chocolate Chip",
                "Crunchy Peanut Butter",
                "Chocolate Chip Peanut Crunch"
            ]
        }]
    }
}
sellbad request25709aspectsimagevariesbyinventory_item_group
· 1
10 |600 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.

Two things that I found so far: 1. In the above request I incorrectly used the key variesBy.specifications.value instead of variesBy.specifications.values 2. When I remove the "Size" key from the variesBy section I was able to successfully create the inventoryItemGroup What are the constraints around variation when creating the inventory item group? The API reference does not mention what constitutes invalid variation. I will continue to play with this but my guess is that the API is checking to see if there is 12 variantSKUs included in the request (2 flavors * 3 sizes).
0 Likes 0 ·
zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered
Hi rjd-ca, It turns out you don't need to provide "aspects" container in your use case. Sorry for the wrong information. As you have observed, eBay currently expect only one value in "aspectsImageVariesBy " and error out if more than one value is provided. Below is the sample request for specifying multiple specifications: { "title": "Clif Bar Energy Bar", "description": "Some description", "imageUrls": [ " https://www.europasports.com/media/catalog/500/722252300706.jpg", " https://www.europasports.com/media/catalog/500/722252300904.jpg", " https://www.europasports.com/media/catalog/500/722252301208.jpg", " https://www.europasports.com/media/catalog/500/722252301307.jpg" ], "variantSKUs": [ "540002", "540003", "540007", "540008" ], "variesBy": { "aspectsImageVariesBy": [ "Flavor" ], "specifications": [{ "name": "Flavor", "values": [ "Apricot", "Chocolate Chip", "Crunchy Peanut Butter", "Chocolate Chip Peanut Crunch" ] }, { "name": "Size", "values": [ "12 - 2.4 oz (68 g) bar (28.8 oz [816 g])", "12 - 2.4 oz (68 g) bar", "12 - 2.4 oz (68 g) bar [28.8 oz (816 g)] box" ] }] } } Regards,
· 1
10 |600 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.

Thank you for your reply. I was able to get my request working with the request body you mention above. I look forward to aspectImageVariesBy behavior being fixed in an upcoming release.
0 Likes 0 ·
zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered
· 1
10 |600 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.

Thanks for responding. I tried adding the following aspects field to my POST but got the same 400 response and error code from my question above (errorId 25709, "Invalid value for aspectsImageVariesBy."):

"aspects": {
		"Flavor": ["Apricot",
			"Chocolate Chip",
			"Crunchy Peanut Butter",
			"Chocolate Chip Peanut Crunch"
		],
		"Size": ["12 - 2.4 oz (68 g) bar (28.8 oz [816 g])",
			"12 - 2.4 oz (68 g) bar",
			"12 - 2.4 oz (68 g) bar [28.8 oz (816 g)] box"
		]
	}
0 Likes 0 ·
srilatha777 avatar image
1 Like"
srilatha777 answered
Thank you for bringing this to our attention. Apologies for the inconvenience being caused. eBay currently supports variants images to vary only by one specification. aspectsImageVariesBy is an array as per the schema. But, we only expect single value in the collection. Please send a single value for "aspectsImageVariesBy" and that should fix this error. We will get the cryptic error message fixed at the earliest. Thanks
10 |600 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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