Skip to content

Create Events

Criar eventos para um ticket

Este endpoint permite criar um evento para um determinado ticket

Escopo requerido

Valor Descrição
open:ticket-events-seller:write Permite a utilização das APIs de escrita/atualização de eventos.

Parâmetros da URL

Campo Tipo Descrição Obrigatório
ticket_uuid string Unique identifier for the ticket. Sim

Request Parameters

Field Type Description Required
code String Optional code for user-defined event control No
type String Type of event to be created: 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, withdrawn_product, waiting_picked_up, validating_return_invoice, waiting_refund_release No

Resquest:

curl -X 'POST' \
  'https://api.magalu.com/seller/v0/tickets/{ticket_uuid}/events' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "optional_user_defined_code",
    "type": "product_received"
  }'

Response parameters

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"
    }
  ]
}

Códigos de retorno

Código Descrição
202 Accepted
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Track Event Creation Completion

Event 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.