Save mensagens¶
Create messages for a ticket¶
This endpoint allows you to create a message for a given ticket
Required scope
Value | Description |
---|---|
open:ticket-messages-seller:write |
Allows the use of write/update APIs. |
Request parameters
Field | Type | Description | Required |
---|---|---|---|
ticket_uuid |
string | Key to identify the ticket. | Yes |
Request:
curl -X 'POST' \
'https://api.magalu.com/seller/v0/tickets/{ticket_uuid}/messages' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{
"code": "msg-1",
"message": "The product will be delivered next week.",
"owner": {
"code": "j.doe",
"name": "John Doe"
},
"destination": "customer"
}'
Response:
{
"id": "bbf7315b-2c0c-4d27-a6e2-9823eb776710",
"message": "The product will be delivered next week.",
"code": "msg-1",
"ticket": {
"id": "2c247041-6b7e-4d0d-ae1d-d72bdbb60158"
},
"sender": {
"id": "sellerId",
"name": "SellerName",
"type": "seller",
"owner": {
"name": "John Doe",
"code": "j.doe"
}
},
"moderation": {
"id": null,
"status": "new",
"block_rules": [],
"updated_at": "2024-08-09T13:30:38.609067Z"
},
"destination": "customer",
"created_at": "2024-08-09T13:30:38.609142Z"
}
Return codes
Código | Descrição |
---|---|
202 | Accepted |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |