Get messages¶
List messages by ticket¶
This endpoint allows you to retrieve all messages 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}/messages' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
Field | Type | Description |
---|---|---|
code |
String | Field for free use by the seller's system. |
message |
String | Message to be sent. |
owner |
Object | Responsible for sending the message. |
owner .code |
String | Identifier in the external system (seller's ERP) for the author of the response. |
owner .name |
String | Name of the author responsible for the response. |
destination |
String | Recipient type. |
attachments |
List | List of attachments to be sent. |
attachments .file_name |
String | File name. |
attachments .file_extension |
String | File extension. |
attachments .file_type |
String | MIME type of the file. |
moderation |
Object | Message moderation. |
moderation .id |
String | Moderation ID. |
moderation .status |
String | Message moderation status. |
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": "3b5444b9-6fbb-40fd-b800-6c24176fb5ea",
"message": "The product will be delivered next week.",
"code": "msg-2",
"ticket": {
"id": "80b31c59-6d31-4d93-982a-7a6f51e335f5"
},
"sender": {
"id": "sellerId",
"name": "SellerName",
"type": "seller",
"owner": {
"name": "j.doe",
"code": "John Doe"
}
},
"moderation": {
"id": null,
"status": "approved",
"block_rules": [],
"updated_at": "2024-08-07T14:21:58.024000"
},
"attachments":[
{
"id": "6130955d-ea63-4859-a069-44c84434ec77",
"file_name": "99685aa4-a5ea-49b3-ba61-70626c1769b2.png",
"provided_file_name": "file_name.png",
"file_extension": "png",
"file_type": "image/png"
}
],
"destination": "customer",
"created_at": "2024-08-07T14:21:54"
}
]
}
Return codes
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Search ticket message by ID¶
This endpoint allows you to retrieve a message from a given ticket, using the message and the ticket id
s, 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 |
message_uuid |
string | Key to identify the message. | Yes |
Request:
curl -X 'GET' \
'https://api.magalu.com/seller/v0/tickets/{ticket_uuid}/messages/{message_uuid}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
{
"id": "bf3bd437-492c-4a32-b3a0-484238002356",
"message": "The product will be delivered next week.",
"code": null,
"ticket": {
"id": "80b31c59-6d31-4d93-982a-7a6f51e335f5"
},
"sender": {
"id": "sellerId",
"name": "SellerName",
"type": "seller",
"owner": {
"name": "j.doe",
"code": "John Doe"
}
},
"moderation": {
"id": null,
"status": "new",
"block_rules": [],
"updated_at": "2024-08-07T15:02:10.081000"
},
"attachments":[
{
"id": "6130955d-ea63-4859-a069-44c84434ec77",
"file_name": "99685aa4-a5ea-49b3-ba61-70626c1769b2.png",
"provided_file_name": "file_name.png",
"file_extension": "png",
"file_type": "image/png"
}
],
"destination": "seller",
"created_at": "2024-08-07T15:02:02"
}
Return codes
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
404 | Not Found |
500 | Internal Server Error |