• 0
Sign in to follow this  
KaisarCode

List items with variations Error

Question

Hi everybody, I'm trying to list an item with variations. I've tried with a lot of combinations in the following JSON, but I allways get some error.

This is the json I'm posting:

{
    "title": " AIR EXPRESS SET VALIJA DE VIAJE ",
    "description": "<p>AIR EXPRESS SET VALIJA DE VIAJE</p><p>20\" Negra</p>",
    "category_id": "MLA120681",
    "buying_mode": "buy_it_now",
    "automatic_relist": true,
    "price": "2394.40",
    "currency_id": "ARS",
    "listing_type_id": "gold_special",
    "condition": "new",
    "attributes": {
        "GENDER": "male",
        "83000": "92025",
        "73001": "82060"
    },
    "variations": [
        {
            "attributes_combinations": [
                {
                    "GENDER": "male",
                    "83000": "92025",
                    "73001": "82060"
                }
            ],
            "available_quantity": 10,
            "price": 2394.4,
            "picture_ids": [
                "http://www.perozzi.com.ar/img/p/4/9/9/3/4993.jpg"
            ]
        }
    ]
}

When I validate it, I get:
 

stdClass Object(    [message] => body.invalid_field_types    [error] => [invalid property type: [attributes] expected List but was null value: [73001:82060, 83000:92025, GENDER:male]]    [status] => 400    [cause] => Array        (        ))

I've tried  also removing the following block, as it's on http://developers.mercadolibre.com/list-your-item/

"attributes": {
        "GENDER": "male",
        "83000": "92025",
        "73001": "82060"
    },

but, instead, I get:
 

stdClass Object(    [message] => Validation error    [error] => validation_error    [status] => 400    [cause] => Array        (            [0] => stdClass Object                (                    [code] => item.attributes.missing_required                    [message] => The attributes [83000] are required for category MLA120681. Check the attribute is present in the attributes list or in all variation attributes combination.                )            [1] => stdClass Object                (                    [code] => item.attributes.invalid                    [message] => The attributes [null] are invalid for category MLA120681                )            [2] => stdClass Object                (                    [code] => item.variations.attribute_combinations.missing                    [message] => You cannot create a variation without attribute_combinations.                )            [3] => stdClass Object                (                    [code] => item.variations.attribute_combinations.invalid                    [message] => Attributes [null] do not allow_variations for category MLA120681. Is not possible varying over them.                )        ))

What is wrong with the JSON? I don't know what else to do.

 

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this