Consult events¶
List events by ticket¶
This endpoint allows you to retrieve all events from a given ticket
Required scope
Value | Description |
---|---|
open:ticket-events-seller:read |
Allows read access to event 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}/events' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
Field | Type | Description |
---|---|---|
id |
String | Key to identify the event. |
code |
String | Field for free use by the seller's system. |
ticket_id |
Object | Key to identify the tichet. |
type |
String | Ticket type. Can be the following values: product_sent , return_info_sent , authorize_refund , product_received , exchange_product_received , refunded , added_bank_account , sla_waiting_customer_expired , rejection_reason , valid_bank_account , waiting_seller_pickup , seller_already_pickedup , waiting_pickup_schedule , sensitive_data_identified , sensitive_data_saved , return_invoice , cancel_invoice , delivery , return_invoice , withdrawn_product , waiting_picked_up , validating_return_invoice , waiting_refund_release |
created_at |
String | Creation date. |
updated_at |
String | Update date. |
created_by |
String | User who created the record. |
updated_by |
String | User who updated it. |
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": [
{
"id": "fb3d0cae-ef77-49ac-9516-21b764e7dc36",
"code": "optional_user_defined_code",
"ticket_id": "58991c5b-2f63-4afe-b168-99dd720287bc",
"type": "product_sent",
"created_at": "2024-03-07T14:51:59.432Z",
"updated_at": "2024-03-07T14:51:59.432Z",
"created_by": "b339ffda-11ec-4ef7-af9c-881554aa4dc7",
"updated_by": "6e6c763c-f38f-475a-9f61-d0620f34de5e"
}
]
}
Return codes
Código | Descrição |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Retrieve events by filters¶
This endpoint allows the seller to retrieve a collection of events, from a given ticket, using filters as a reference.
Required scope
Value | Description |
---|---|
open:ticket-events-seller:read |
Allows read access to event API resources. |
Request parameters
Field | Type | Description |
---|---|---|
ticket_uuid |
String | Key to identify the ticket. |
_offset |
Number | Reference record position. The next N records will be returned from it. Default value 0. |
_limit |
Number | Determines the number of records to be returned. Default value 10. |
type |
String | Ticket type. Can be the following values: product_sent , return_info_sent , authorize_refund , product_received , exchange_product_received , refunded , added_bank_account , sla_waiting_customer_expired , rejection_reason , valid_bank_account , waiting_seller_pickup , seller_already_pickedup , waiting_pickup_schedule , sensitive_data_identified , sensitive_data_saved , return_invoice , cancel_invoice , delivery , return_invoice , withdrawn_product , waiting_picked_up , validating_return_invoice , waiting_refund_release |
created_at_gte |
String (datetime - ISO 8601) | Filters all return codes with a greater than or equal creation date. |
created_at_lte |
String (datetime - ISO 8601) | Filters all return codes with a less than or equal creation date. |
Request:
curl -X 'GET' \
'https://api.magalu.com/seller/v0/tickets/{ticket_uuid}/events?_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": [
{
"id": "fb3d0cae-ef77-49ac-9516-21b764e7dc36",
"code": "optional_user_defined_code",
"ticket_id": "58991c5b-2f63-4afe-b168-99dd720287bc",
"type": "product_sent",
"created_at": "2024-03-07T14:51:59.432Z",
"updated_at": "2024-03-07T14:51:59.432Z",
"created_by": "b339ffda-11ec-4ef7-af9c-881554aa4dc7",
"updated_by": "6e6c763c-f38f-475a-9f61-d0620f34de5e"
}
]
}
Return codes
Código | Descrição |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |