Comunidade
Erro 500 - Houve um erro ao adicionar ao carrinho
Olá! Estou tentando enviar esse curl e estou recebendo esse erro:
postman request POST 'https://sandbox.melhorenvio.com.br/api/v2/me/cart'
--header 'Accept: application/json'
--header 'Authorization: Bearer aaaaaa'
--header 'Content-Type: application/json'
--header 'User-Agent: Real Deal ([email protected])'
--body '{
"service": 4,
"from": {
"name": "Guilherme Duques",
"phone": "21974735995",
"email": "[email protected]",
"document": "86516229538",
"address": "Rua bolivar",
"complement": "1001",
"number": "84",
"district": "",
"city": "Rio de Janeiro",
"country_id": "BR",
"postal_code": "22061020",
"state_abbr": "RJ",
"note": ""
},
"to": {
"name": "Victor Manuel",
"phone": "21993908281",
"email": "[email protected]",
"document": "19671758703",
"address": "Rua Marquês de Olinda",
"complement": "Bloco 1, 603",
"number": "61",
"district": "",
"city": "Rio de Janeiro",
"country_id": "BR",
"postal_code": "22251040",
"state_abbr": "RJ",
"note": ""
},
"products": [
{
"name": "TESTE DUKES",
"quantity": "1",
"unitary_value": "1.00"
}
],
"volumes": [
{
"height": 6,
"width": 22,
"length": 28,
"weight": 0.4
}
],
"options": {
"insurance_value": 1,
"receipt": false,
"own_hand": false,
"reverse": false,
"non_commercial": true
}
}
'
Note que nao estou enviando o Agency como diz a documentação.... Porem se eu envio o Agency como 1 ele funciona.