Skip to content

Get return codes

List return codes by ticket

This endpoint allows you to retrieve all return codes from a given ticket

Required scope

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

Request parameters

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

Request:

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

Field Type Description
created_at String Creation date.
updated_at String Update date.
id String UUID of the ticket the event belongs to.
ticket_id Object Ticket UUID identifier.
reverse_code String Reverse shipping code.

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-11-22T10:42:45",
      "updated_at": "2024-11-22T10:42:45",
      "id": "80b31c59-6d31-4d93-982a-7a6f51e335f5",
      "ticket_id": "f148ae87-0ce9-435b-94a4-6aa572f0569a",
      "reverse_code": "63c54b4a-ea19-4c52-90a8-bd38cd1a3157"
    }
  ]
}

Return codes

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

Retrieve return codes by filters

This endpoint allows the seller to retrieve a collection of return codes 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
reverse_code String Return code's UUID identifier. No
created_at_gte String (datetime - ISO 8601) Filters all return codes with a greater than or equal creation date. No
created_at_lte String (datetime - ISO 8601) Filters all return codes with a less than or equal creation date. No

Request:

curl -X 'GET' \
  'https://api.magalu.com/seller/v0/tickets/{ticket_uuid}/returns?_limit=1' \
  -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-11-22T10:42:45",
      "updated_at": "2024-11-22T10:42:45",
      "id": "80b31c59-6d31-4d93-982a-7a6f51e335f5",
      "ticket_id": "f148ae87-0ce9-435b-94a4-6aa572f0569a",
      "reverse_code": "63c54b4a-ea19-4c52-90a8-bd38cd1a3157"
    }
  ]
}

Return codes

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

Search ticket return code by ID

This endpoint allows you to retrieve a return code from a given ticket, using the return code and the ticket ids, as a reference.

Required scope

Value Description
open:ticket-messages-seller:read Allows usage of reading APIs.

Request parameters

Field Type Description Required
ticket_uuid string Key to identify the ticket. Yes
return_uuid string Key to identify the return code. Yes

Request:

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

Response:

{
    "created_at": "2024-11-22T10:42:45",
    "updated_at": "2024-11-22T10:42:45",
    "id": "80b31c59-6d31-4d93-982a-7a6f51e335f5",
    "ticket_id": "f148ae87-0ce9-435b-94a4-6aa572f0569a",
    "reverse_code": "63c54b4a-ea19-4c52-90a8-bd38cd1a3157"
}

Return codes

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