Skip to content

Consult Deliveries

Retrieve Deliveries by ID

This endpoint allows the (seller) to retrieve a delivery using the id as a reference.

Required Scope

Value Description
open:order-delivery-seller:read Allows reading deliveries and related data.

URL Parameters

Field Type Description Required
id string ID of the delivery on the platform. Yes

Headers

Field Type Description Required
X-Channel-Id String ID of the sales channel you want to operate (e.g. "9fe0d853-732b-4e4a-a0b0-cff988ed043d") Yes

Filters

Field Type Description Required
updated_at__ge String (datetime ISO 8601) Filters deliveries modified from the specified date informed (e.g., "2023-06-27T12:15:37.729Z") No

Request:

curl -X 'GET' \
  'https://api.magalu.com/seller/v1/deliveries/{id}' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \ 
-H 'X-Channel-Id: <Channel Id>'

Response:

{
   "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
      },
      "tax":{
         "currency":"BRL",
         "normalizer":100,
         "total":100
      }
   },
   "foreign_amounts":{ // This object with its values ​​will only exist if the request is international
      "currency":"BRL",
      "normalizer":100,
      "total":30100,
      "discount":{
         "currency":"BRL",
         "normalizer":100,
         "total":772
      },
      "freight":{
         "currency":"BRL",
         "normalizer":100,
         "amount":1000,
         "interest":200,
         "discount":100
      },
      "tax":{
         "currency":"BRL",
         "normalizer":100,
         "total":2545
      },
      "exchange_rate":{
         "currency":"USD",
         "value":590
      }
   },
   "items":[
      {
         "sequencial":"1",
         "amounts":{
            "currency":"BRL",
            "normalizer":100,
            "total":10000,
            "discounts":[
               {
                  "currency":"BRL",
                  "normalizer":100,
                  "total":5000,
                  "shared":2500,
                  "type":"cash_payment",
                  "description":"Desconto à vista"
               }
            ],
            "freight":{
               "currency":"BRL",
               "normalizer":100,
               "total":10000,
               "shared":0
            },
            "taxes":[
               {
                  "currency":"BRL",
                  "normalizer":100,
                  "type":"icms|prc|...",
                  "description":"ICMS",
                  "total":100
               }
            ]
         },
         "foreign_amounts":{ // This object with its values ​​will only exist if the request is international
            "currency":"BRL",
            "normalizer":100,
            "total":985,
            "discount":{
               "currency":"BRL",
               "normalizer":100,
               "total":572
            },
            "comission":{
               "currency":"BRL",
               "normalizer":100,
               "total":572
            },
            "taxes":[
               {
                  "currency":"BRL",
                  "normalizer":100,
                  "total":195,
                  "type":"importacao",
                  "description":"importacao"
               }
            ],
            "exchange_rate":{
               "currency":"USD",
               "value":595
            }
         },
         "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":"g",
         "unit_price":{
            "currency":"BRL",
            "normalizer":100,
            "value":1999
         },
         "quantity":1
      }
   ],
   "shipping":{
      "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"
         }
      }
   },
   "invoiced_at":"2021-07-22T13:06:28.000Z",
   "delivered_at":"2021-07-22T13:06:28.000Z",
   "shipped_at":"2021-07-22T13:06:28.000Z",
   "cancelled_at":"2021-07-22T13:06:28.000Z",
   "labels":[
      {
         "value":"etiqueta",
         "id":"123"
      }
   ],
   "tracking_url":"http://url.de.acompanhamento.da.entrega/",
   "invoices":[
      {
         "key":"55080701212344000127550010000000981364117781",
         "issued_at":"2021-07-22T13:06:28.000Z",
         "volume_quantity":1,
         "status":"approved|validating|invalid"
      }
   ],
   "order":{
      "code":"123456789101112",
      "id":"c8be6d3d-77e6-4cd9-8d6e-dd556b3e46ee",
      "channel":{
         "id":"e83ed3c7-7bae-47c4-9dcd-d12f6329fe1a",
         "marketplace":{
            "document":"18901029000100"
         },
         "extras":{

         }
      }
   }
}

Response Codes

Code Description
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Retrieve Deliveries by Filters

This endpoint allows you to retrieve a collection of deliveries using filters as a reference.

Required Scope

Value Description
open:order-delivery-seller:read Allows reading deliveries and related data.

Headers

Field Type Description Required
X-Channel-Id String ID of the sales channel you want to operate (e.g. "9fe0d853-732b-4e4a-a0b0-cff988ed043d") Yes

Filters

Field Type Description Required
_limit integer Determines the number of records to be returned. Default value is 50. No
_offset integer Record reference position, from which the next N records will be returned. Default value is 0. No
status string Delivery status No
id String Delivery identifier No
order__code String Order Code No
purchased_at__ge String (datetime ISO 8601) Filters deliveries from the specified date informed (e.g., "2023-06-27T12:15:37.729Z") No
purchased_at__le String (datetime ISO 8601) Filters deliveries up to the specified date (e.g., "2023-06-27T12:15:37.729Z") No

Pagination and Sorting

Field Type Description Required
_limit integer Determines the number of records to be returned. Default value is 50. No
_offset integer Record reference position, from which the next N records will be returned. Default value is 0. No

Request:

curl -X 'GET' \
  'https://api.magalu.com/seller/v1/deliveries' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \ 
-H 'X-Channel-Id: <Channel Id>'

Response:

{
   "meta":{
      "page":{
         "limit":20,
         "offset":150,
         "max_limit":100
      },
      "links":{
         "previous":"?_offset=130&_limit=20",
         "next":"?_offset=170&_limit=20",
         "self":"?_offset=150&_limit=20"
      }
   },
   "results":[
      {
         "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",
         "purchased_at":"2024-09-27T18:00:53+00:00",
         "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
            },
            "tax":{
               "currency":"BRL",
               "normalizer":100,
               "total":1290
            }
         },
         "foreign_amounts":{ // This object with its values ​​will only exist if the request is international
            "currency":"BRL",
            "normalizer":100,
            "total":30100,
            "discount":{
               "currency":"BRL",
               "normalizer":100,
               "total":772
            },
            "freight":{
               "currency":"BRL",
               "normalizer":100,
               "amount":1000,
               "interest":200,
               "discount":200
            },
            "tax":{
               "currency":"BRL",
               "normalizer":100,
               "total":1290
            },
            "comission":{
               "currency":"BRL",
               "normalizer":100,
               "total":2545
            },
            "exchange_rate":{
               "currency":"USD",
               "value":595
            }
         },
         "items":[
            {
               "sequencial":"1",
               "amounts":{
                  "currency":"BRL",
                  "normalizer":100,
                  "total":10000,
                  "discounts":[
                     {
                        "currency":"BRL",
                        "normalizer":100,
                        "total":5000,
                        "shared":2500,
                        "type":"cash_payment",
                        "description":"Desconto à vista"
                     }
                  ],
                  "freight":{
                     "currency":"BRL",
                     "normalizer":100,
                     "total":10000,
                     "shared":0
                  },
                  "taxes":[
                     {
                        "currency":"BRL",
                        "normalizer":100,
                        "type":"icms|prc|...",
                        "description":"ICMS",
                        "total":100
                     }
                  ]
               },
               "foreign_amounts":{ // This object with its values ​​will only exist if the request is international
                  "currency":"BRL",
                  "normalizer":100,
                  "total":985,
                  "discount":{
                     "currency":"BRL",
                     "normalizer":100,
                     "total":572
                  },
                  "comission":{
                     "currency":"BRL",
                     "normalizer":100,
                     "total":572
                  },
                  "taxes":[
                     {
                        "currency":"BRL",
                        "normalizer":100,
                        "total":195,
                        "type":"importacao",
                        "description":"importacao"
                     }
                  ],
                  "exchange_rate":{
                     "currency":"USD",
                     "value":595
                  }
               },
               "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":"g",
               "unit_price":{
                  "currency":"BRL",
                  "normalizer":100,
                  "value":1999
               },
               "quantity":1
            }
         ],
         "shipping":{
            "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":{

               }
            }
         }
      }
   ]
}

Response Codes

Code Description
200 OK
400 Bad Request
401 Unauthorized
500 Internal Server Error