Create Tickets¶
Create a new customer service ticket¶
This endpoint allows you to create a new ticket (protocol) for customer services
Required scope
Value | Description |
---|---|
open:tickets-seller:write |
Allows the use of write/update APIs. |
Request parameters
Field | Type | Description | Required |
---|---|---|---|
type |
String | Type of tickets. ENUM: cancellation ,payment , shipping |
Yes |
channel |
String | Channel to which the request belongs. | Yes |
channel.id |
String | Unique order identifier on the platform. | Yes |
channel.alias |
String | The channel alias. | Yes |
order |
String | Details of the items for which the protocol is being opened. | Yes |
order .id |
String | Unique order identifier on the platform. | Yes |
order .code |
String | Order code. | Yes |
order .delivery |
Object | Details of the items that will be part of the request. | Yes |
order .delivery .id |
String | Unique order identifier on the platform. | Yes |
order .delivery .seller |
String | Information about the seller who made the sale. | Yes |
order .delivery .items |
List | Items that make up the protocol. | Yes |
order .delivery .seller .id |
String | Tenant Seller ID on Id Magalu. | Yes |
order .delivery .seller .name |
String | Seller or Store Name. | Yes |
order .delivery .items .id |
String | Unique order identifier on the platform. | Yes |
order .delivery .items .sku |
String | SKU identifier in the system. | Yes |
order .delivery .items .external_sku |
String | SKU identifier in the external system (integrator or seller). | Yes |
order .delivery .items .name |
String | Product name. | Yes |
order .delivery .items .description |
String | Product Description. | Yes |
order .delivery .items .image |
String | Main product image. | Yes |
order .delivery .items .quantity |
String | Number of items linked to the protocol. | Yes |
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 . |
Yes |
Request:
curl -X 'POST' \
'https://api.magalu.com/seller/v0/tickets' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{
"type": "shipping",
"channel": {
"id": "195a8e41-afcc-455b-907a-475137106f84",
"alias": "marketplace"
},
"order": {
"code": "987654",
"delivery": {
"id": "195a8e41-afcc-455b-907a-475137106f84",
"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"
}
],
"seller": {
"id": "c85be697-7b14-4460-a5c7-3e58b4a364f9",
"name": "Lojinha de Livros Infantis"
}
},
"id": "195a8e41-afcc-455b-907a-475137106f84"
},
"reason": "missing_damaged_parts"
}'
Field | Type | Description |
---|---|---|
transaction_id |
String | A unique identifier to track transaction status. |
links |
List | A list with the endpoint to retrieve the transaction status. |
Response:
{
"transaction_id": "2d97892b-50f2-4e0e-8967-3d962c29ade9",
"links": [
{
"path": "/seller/v0/transactions/2d97892b-50f2-4e0e-8967-3d962c29ade9"
}
]
}
Track Ticket Creation Completion¶
Ticket creation is now an asynchronous process and can be tracked via transactions. See the documentation on asynchronous responses and transactions for more information on this process.
Return codes
Code | Description |
---|---|
202 | Accepted |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Track Ticket Creation Completion¶
Ticket creation is an asynchronous process and can be tracked via transactions. See the documentation on asynchronous responses and transactions for more information on this process.