Adicionar nota fiscal a uma entrega¶
Este endpoint permite que o vendedor (seller
) adicione uma nota fiscal a uma entrega utilizando o id
como referência.
Escopo requerido
Valor | Descrição |
---|---|
open:order-delivery:write |
Permite a escrita de entregas e dados relacionados. |
Parâmetros da URL
Campo | Tipo | Descrição | Obrigatório |
---|---|---|---|
id |
string | ID da entrega na plataforma. | Sim |
Chamada:
curl -X 'POST' \
'https://services.magalu.com/seller/v1/deliveries/{id}/invoices' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{
"key": "55080701212344000127550010000000941364117781",
"issued_at": "2024-07-22T13:06:28.000Z",
"volume_quantity": 1,
"xml": "<xml>...</xml>"
}'
{
"code": "123456789101112-1",
"id": "6c764444-436d-4659-8cec-304414b05259",
"seller": {
"id": "GENPUB.e83ed3c7-7bae-47c4-9dcd-d12f6329fe1a",
"name": "Loja do Edu"
},
"status": "new|approved|invoiced|shipped|delivered|cancelled|frozen",
"amounts": {
"currency": "BRL",
"normalizer": 100,
"total": 10000,
"discount": {
"currency": "BRL",
"normalizer": 100,
"total": 5000,
"shared": 2500
},
"freight": {
"currency": "BRL",
"normalizer": 100,
"total": 10000,
"shared": 0
},
"taxes": [
{
"currency": "BRL",
"normalizer": 100,
"type": "icms|prc|...",
"description": "ICMS",
"total": 100
}
],
"commission": 1000
},
"items": [
{
"sequencial": "1",
"amounts": {
"currency": "BRL",
"normalizer": 100,
"total": 10000,
"discount": {
"currency": "BRL",
"normalizer": 100,
"total": 5000,
"shared": 2500
},
"freight": {
"currency": "BRL",
"normalizer": 100,
"total": 10000,
"shared": 0
},
"commission": 12
},
"info": {
"sku": "livro_01",
"id": "00839163-486f-4557-8173-c454d22edd64",
"name": "Livro XYZ",
"description": "...",
"images": [
{
"url": "https://imagem.do.livro/foto.jpg"
}
],
"attributes": [
{
"name": "color",
"value": "black"
}
],
"extras": {
"categories": "UD"
},
"dimensions": {
"height": {
"value": 120,
"unit": "cm"
},
"width": {
"value": 100,
"unit": "cm"
},
"length": {
"value": 110,
"unit": "cm"
},
"weight": {
"value": 170,
"unit": "g"
}
}
},
"measure_unit": "PC|KG|G",
"unit_price": {
"currency": "BRL",
"normalizer": 100,
"value": 1999
},
"quantity": 1
}
],
"shipping": {
"posting_date": "2021-07-22T13:06:28.000Z",
"recipient": {
"customer_type": "cnpj|cpf",
"document_number": "12312312311",
"email": "user@mail.com",
"name": "Fu***as",
"phones": [
{
"area_code": "11",
"country_code": "55",
"number": "991232233",
"type": "mobile|comercial|residential"
}
],
"address": {
"zipcode": "86380000",
"street": "1 DE MAIO",
"number": "79",
"district": "VILA INDUSTRIAL",
"city": "ANDIRA",
"state": "PR",
"country": "BR",
"complement": "apto 1023",
"reference": ""
}
},
"drop_details": {
"store": {
"name": "loja magalu 001 franca",
"document": "1928491824"
},
"address": {
"zipcode": "86380000",
"street": "1 DE MAIO",
"number": "79",
"district": "VILA INDUSTRIAL",
"city": "ANDIRA",
"state": "PR",
"country": "BR",
"complement": "apto 1023",
"reference": ""
}
},
"handling_time": {
"value": 15,
"precision": "days",
"workday": true,
"limit_date": "2021-07-22T13:06:28.000Z"
},
"deadline": {
"value": 15,
"precision": "days",
"workday": true,
"limit_date": "2021-07-22T13:06:28.000Z"
},
"provider": {
"id": "integra",
"name": "integra",
"description": "Entrega pelo parceiro",
"extras": {
"chave": "valor"
}
}
},
"order": {
"code": "123456789101112",
"id": "c8be6d3d-77e6-4cd9-8d6e-dd556b3e46ee",
"channel": {
"id": "e83ed3c7-7bae-47c4-9dcd-d12f6329fe1a",
"marketplace": {
"document": "18901029000100"
},
"extras": {}
}
}
}
Código | Descrição |
---|---|
201 | CREATED |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |