Skip to content

Consult Delivery History

This endpoint allows the (seller) to retrieve the history of 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
created_at__ge String (datetime ISO 8601) Filters orders from the specified date informed (e.g., "2023-06-27T12:15:37.729Z") No
created_at__le String (datetime ISO 8601) Filters orders 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
_sort String Sorting order, allowing the following values: No
- created_at:asc
- created_at:desc (default)

Request:

curl -X 'GET' \
  'https://api.magalu.com/seller/v1/deliveries/{id}/histories' \
  -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": [
    {
      "description": "Informação curta sobre o status ou o motivo",
      "created_at": "2021-07-22T13:06:28.000Z",
      "extras": {
        "chave": "Value"
      }
    }
  ]
}

Response Codes

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