Skip to content

Consult Tickets

Retrieve tickets by ID

This endpoint allows the seller to retrieve a ticket using id as a reference.

Required scope

Value Description
open:tickets-seller:read Allows read access to API resources.

Request parameters

Field Type Description Required
id string Key to identify the ticket. Yes

Request:

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

Response:

{
    "created_at": "2024-08-07T13:42:45",
    "updated_at": "2024-08-07T13:42:46",
    "id": "80b31c59-6d31-4d93-982a-7a6f51e335f5",
    "code": "f148ae87-0ce9-435b-94a4-6aa572f0569a",
    "type": "payment",
    "order": {
        "id": "bcc662e8-527b-410f-87a5-bbc8f5e623da",
        "code": "1281270182459143",
        "delivery": {
            "id": "96061b77-b065-4cd8-9e41-b097bf95c173",
            "seller": {
                "id": "c85be697-7b14-4460-a5c7-3e58b4a364f9",
                "name": "SellerName"
            },
            "items": [
                {
                  "description": "Livro infantil a Bela e a Fera com encartes em 3D.",
                  "external_sku": "livro-seller-01",
                  "id": "63c54b4a-ea19-4c52-90a8-bd38cd1a3157",
                  "image": "https://imagem.do.livro/foto.jpg",
                  "name": "A Bela e a Fera em 3D",
                  "quantity": 1,
                  "sku": "livro-01"
                }
      ]
        }
    },
    "channel": {
        "id": "3f042852-3efc-4d47-97f8-f94989c7b0bc"
    },
    "status": "waiting",
    "closed": false,
    "reason": null,
    "protocol": "202301000001123",
    "due_date": "2024-08-09T13:42:46",
    "origin": "customer"
}

Return codes

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

Retrieve tickets by filters

This endpoint allows the seller to retrieve a collection of tickets using filters as a reference.

Required scope

Value Description
open:tickets-seller:read Allows read access to API resources.

Request parameters

Field Type Description Required
_offset Number Reference record position. The next N records will be returned from it. Default value 0. No
_limit Number Determines the number of records to be returned. Default value 10. No
status String Ticket status. Can be the following values: new, open, waiting, resolved e closed. No
reason String Code that represents the reason for opening the ticket. Can be the following values: shipping_delay, price_discrepancy, incorrect_product, missing_damaged_parts, duplicated_order, payment_issue, quality_concern, change_of_mind, unavailability, customer_error, unexpected_circumstances, shipping_address_issues, shipping_delay, price_discrepancy, incorrect_product, missing_damaged_parts, duplicated_order, payment_issue, quality_concern, change_of_mind, unavailability, customer_error, unexpected_circumstances, shipping_address_issues, general, payment_authorization_failure, payment_discrepancy No
ticket_id String Ticket UUID identifier. No
order__id String Order UUID identifier. No
order__code String Order identifier. Não
ticket_id String Ticket UUID identifier. No
channel__id String Chanel UUID identifier. No
protocol String Ticket's protocol identifier. Não
created_at_gte String (datetime - ISO 8601) Filters all tickets with a greater than or equal creation date. No
created_at_lte String (datetime - ISO 8601) Filters all tickets with a less than or equal creation date. No

Request:

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

Response:

{
  "meta": {
    "page": {
      "limit": 1,
      "offset": 1,
      "count": 1,
      "max_limit": 10
    },
    "links": {
      "previous": "?_offset=0&_limit=1",
      "self": "?_offset=1&_limit=1",
      "next": "?_offset=2&_limit=1"
    }
  },
  "results": [
    {
            "created_at": "2024-08-07T13:42:45",
            "updated_at": "2024-08-07T13:42:46",
            "id": "80b31c59-6d31-4d93-982a-7a6f51e335f5",
            "code": "f148ae87-0ce9-435b-94a4-6aa572f0569a",
            "type": "cancellation",
            "order": {
                "id": "bcc662e8-527b-410f-87a5-bbc8f5e623da",
                "code": "1281270182459143",
                "delivery": {
                    "id": "96061b77-b065-4cd8-9e41-b097bf95c173",
                    "seller": {
                        "id": "c85be697-7b14-4460-a5c7-3e58b4a364f9",
                        "name": "SellerName"
                    },
                    "items": [
                        {
                          "description": "Livro infantil a Bela e a Fera com encartes em 3D.",
                          "external_sku": "livro-seller-01",
                          "id": "63c54b4a-ea19-4c52-90a8-bd38cd1a3157",
                          "image": "https://imagem.do.livro/foto.jpg",
                          "name": "A Bela e a Fera em 3D",
                          "quantity": 1,
                          "sku": "livro-01"
                        }
                    ]
                }
            },
            "channel": {
                "id": "3f042852-3efc-4d47-97f8-f94989c7b0bc"
            },
            "status": "waiting",
            "closed": "payment_issue",
            "reason": "payment_issue",
            "protocol": "2024080713422397",
            "due_date": "2024-08-09T13:42:46",
            "origin": "channel"
    }
  ]
}

Return code

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