• 0
Sign in to follow this  
Vinicius2018

Ajuda na inclusão de atributos

Question

Olá, estou começando a usar  a api, li bastante e não estou conseguindo entender o motivo de não conseguir incluir os atributos no cadastro do produto, após o cadastro do produto, os atributos que adicionei manualmente não está sendo exibidos ou inclusos.Sei que é algo simples, mas por favor alguém poderia me ajudar a entender melhor, obrigado :D,  este é o JSON:

{
"title":"Item de teste - Não ofertar ",
"category_id":"MLB238487",
"price":10000,
"currency_id":"BRL",
"available_quantity":1,
"buying_mode":"buy_it_now",
"condition":"not_specified",
"listing_type_id":"gold",
    "description":{
                    "plain_text":"TEXTO DA DESCRIÇÃO "
    },
"pictures":[
{"source":"https://upload.wikimedia.org/wikipedia/commons/4/4a/Assinatura_de_E-mail_Pr%C3%B3-Sa%C3%BAde_Rodrigo_Sullivam_Financeiro_HP.jpg"}
],
    "attributes": [
               {
        "id": "LINE",
        "name": "Elgin teste"
        },
        
        { 
        "id": "AIR_CONDITIONER_MODEL_TYPE",
        "name": "Modelo teste"
        },
      
        {
        "id":"402748",
        "value_name":"Eletrônico"
             },
             {
        "id": "198812",
        "name": "110V/220V (Bivolt)",

             }
             ]
}

e a resposta é está:

{
    "id": "MLB1019252867",
    "site_id": "MLB",
    "title": "Item De Teste - Não Ofertar ",
    "subtitle": null,
    "seller_id": xxxxx,
    "category_id": "MLB238487",
    "official_store_id": null,
    "price": 10000,
    "base_price": 10000,
    "original_price": null,
    "currency_id": "BRL",
    "initial_quantity": 1,
    "available_quantity": 1,
    "sold_quantity": 0,
    "sale_terms": [],
    "buying_mode": "buy_it_now",
    "listing_type_id": "gold_special",
    "start_time": "2018-04-26T12:05:01.256Z",
    "stop_time": "2038-04-21T04:00:00.000Z",
    "end_time": "2038-04-21T04:00:00.000Z",
    "expiration_time": "2018-07-15T12:05:01.445Z",
    "condition": "not_specified",
    "permalink": "http://produto.mercadolivre.com.br/MLB-1019252867-item-de-teste-no-ofertar-_JM",
    "thumbnail": "http://www.mercadolibre.com/jm/img?s=STC&v=I&f=proccesing_image_pt.jpg",
    "secure_thumbnail": "https://www.mercadolibre.com/jm/img?s=STC&v=I&f=proccesing_image_pt.jpg",
    "pictures": [
        {
            "id": "628190-MLB27254991847_042018",
            "url": "http://www.mercadolibre.com/jm/img?s=STC&v=O&f=proccesing_image_pt.jpg",
            "secure_url": "https://www.mercadolibre.com/jm/img?s=STC&v=O&f=proccesing_image_pt.jpg",
            "size": "500x500",
            "max_size": "500x500",
            "quality": ""
        }
    ],
    "video_id": null,
    "descriptions": [
        {
            "id": "MLB1019252867-1654979308"
        }
    ],
    "accepts_mercadopago": true,
    "non_mercado_pago_payment_methods": [],
    "shipping": {
        "mode": "not_specified",
        "local_pick_up": false,
        "free_shipping": false,
        "methods": [],
        "dimensions": null,
        "tags": [],
        "logistic_type": "not_specified",
        "store_pick_up": false
    },
    "international_delivery_mode": "none",
    "seller_address": {
        "id": 916901707,
        "comment": "",
        "address_line": "Rua Terenas 123",
        "zip_code": "03128010",
        "city": {
            "id": "BR-SP-44",
            "name": "São Paulo"
        },
        "state": {
            "id": "BR-SP",
            "name": "São Paulo"
        },
        "country": {
            "id": "BR",
            "name": "Brasil"
        },
        "latitude": -23.5695742,
        "longitude": -46.5864281,
        "search_location": {
            "neighborhood": {
                "id": "TUxCQkFMVGN1ejd6",
                "name": "Alto da Mooca"
            },
            "city": {
                "id": "TUxCQ1NQLTQzMzc",
                "name": "São Paulo Zona Leste"
            },
            "state": {
                "id": "TUxCUFNBT085N2E4",
                "name": "São Paulo"
            }
        }
    },
    "seller_contact": null,
    "location": {},
    "geolocation": {
        "latitude": -23.5695742,
        "longitude": -46.5864281
    },
    "coverage_areas": [],
    "attributes": [
        {
            "id": "BRAND",
            "name": "Marca",
            "value_id": "354",
            "value_name": "Cadence",
            "value_struct": null,
            "attribute_group_id": "OTHERS",
            "attribute_group_name": "Outros"
        },
        {
            "id": "COOLING_PERFORMANCE",
            "name": "Capacidade de refrigeração",
            "value_id": null,
            "value_name": "9000BTU/h",
            "value_struct": {
                "number": 9000,
                "unit": "BTU/h"
            },
            "attribute_group_id": "OTHERS",
            "attribute_group_name": "Outros"
        }
    ],
    "warnings": [
        {
            "code": "item.description.text.not_allowed",
            "message": "The text property is deprecated. And will soon be rejected. Please use plain_text"
        }
    ],
    "listing_source": "",
    "variations": [],
    "status": "active",
    "sub_status": [],
    "tags": [
        "immediate_payment"
    ],
    "warranty": null,
    "catalog_product_id": null,
    "domain_id": "MLB-AIR_CONDITIONERS",
    "seller_custom_field": null,
    "parent_item_id": null,
    "differential_pricing": null,
    "deal_ids": [],
    "automatic_relist": false,
    "date_created": "2018-04-26T12:05:01.587Z",
    "last_updated": "2018-04-26T12:05:01.587Z"
}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Resolvi,

código JSON

    "attributes": [
				{
 					"id": "PACKAGE_HEIGHT",
 					"value_name": "20.0cm"
                },
                {
                    "id": "PACKAGE_LENGTH",
                    "value_name": "20.0cm"
                },
                {
                    "id": "PACKAGE_WIDTH",
                    "value_name": "20.0cm"
                },
                {
                    "id": "PACKAGE_WEIGHT",
                    "value_name": "0.02kg"
                },
                {
                	"id": "AIR_CONDITIONER_TECHNOLOGY",
                	"value_name": "Tecnologia teste"
                },{
                    "id": "PRODUCT_TYPE", 
                    "value_id": "290203", 
                    "value_name":"Split" 
                }
             ],

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this