Skip to content

Get Transaction

Retrieve Transaction by ID

This endpoint allows retrieving a transaction using its id as a reference.

Required Scope

Value Description
open:sac-transaction-seller:read Allows the use of transaction read APIs.

URL Parameters

Field Type Description Required
id string Unique identifier of the transaction. Yes

Request

curl -X 'GET' \
  'https://api.magalu.com/seller/v0/transactions/{id}' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \
Response parameters

Field Type Description
created_at String Creation date.
updated_at String Update date.
id String Key to identify the transaction.
code String Transaction code.
operation Object Transaction operation.
trigger_endpoint String Point of origin.
status String Transaction status. Could it be: pending, processing, completed, failed, cancelled.
events List List of transaction events.
events.event String Transaction event. Could it be: info, failure, transition, delay.
events.message String Transaction event message.
events.data String Transaction event date.
events.data.ticket_id String Ticket UUID identifier.
events.status String Transaction event status. Could it be: pending, processing, completed, failed, cancelled.
events.created_at String Event creation date.

Response:

{
  "created_at": "2024-11-08T11:49:35.938000",
  "updated_at": "2024-11-08T11:49:35.938000",
  "id": "5d3ca96b-cdab-4770-8f8a-1afc66a24274",
  "code": "5D3CA96B",
  "operation": "create",
  "trigger_endpoint": "channel/v0/tickets",
  "status": "completed",
  "events": [
    {
      "event": "transition",
      "message": "Ticket creation successful",
      "data": {
        "ticket_id": "8f6a64a6-0b9e-5c1c-8242-34828585f0dc"
      },
      "status": "completed",
      "created_at": "2024-11-08T11:49:52.489000"
    }
  ]
}

Return Codes

Code Description
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Track the progress of a transaction

The transaction is an asynchronous flow and its progress can be monitored. See the documentation on asynchronous flows and transactions to understand more about the process.