Skip to content

Transaction API

This page provides routes for managing transactions. The following routes are available:

Retrieve a list of all transactions of the authenticated organization

This endpoint retrieves a list of all transactions of the authenticated organization.

GET https://api.token.web3sandpit.com/api/v1/transactions/all

INFO

Authentication: Requires ApiKey for authentication.

Permissions: Requires OWNER role with user_management and read permissions.

Parameters

None

Example

json
{}
json
{
  "response": [
    {
      "_id": "671b923963637ba722dc2f03",
      "amount": 2,
      "blockHash": "0xb61a5987aa3137142fe8c744664e5b56692c8e7d9b0408a510e4f9f62b0d3123",
      "blockNumber": 13605564,
      "from": "0xd3cD3419d3e4552744bFf01e8cDF9464AeF0baCB",
      "hash": "0x2c0d076a44b4d600d890e0fcd836ec2b822b62a5a5da2fab1417a54e6e209123",
      "createdAt": "2024-10-25T12:42:33.800Z",
      "updatedAt": "2024-10-25T12:42:33.800Z",
      "__v": 0,
      "id": "671b923963637ba722dc2f03"
    }
  ],
  "status": "success"
}

HTTP Response Codes

Status CodeTextDescription
200OKWith an array of user objects and pagination information.
400Bad RequestThe request was invalid or cannot be processed.
401UnauthorizedAuthentication is required or has failed.
403ForbiddenThe authenticated user is not authorized to perform the requested action.
404Not FoundThe requested resource could not be found.
500Internal Server ErrorAn unexpected error occurred.

Retrieve a list of transactions of the authenticated user

This endpoint retrieves a list of transactions of the authenticated user.

GET https://api.token.web3sandpit.com/api/v1/transactions/my

INFO

Authentication: Requires ApiKey for authentication. Permissions: Requires USER role with read permission.

Parameters

None

Example

json
{}
json
{
  "response": [
    {
      "_id": "6731f2d1419d96b0fab027f3",
      "amount": 10,
      "blockHash": "0x61bf20ff9e6b3c4271eacdd8ec7a066f14e96260207eb3ecd1a72070b1502d123",
      "blockNumber": 14294111,
      "from": "0xd3cD3419d3e4552744bFf01e8cDF9464AeF0ba123",
      "hash": "0xbade6d66dcf9d681fa4b47f2323a4eb01762b56f55cea81288013a4d36adc0123",
      "to": "0x9696cf4cd872E6C4B65cdc3Fc1b4da802C0C8cD2",
      "createdAt": "2024-11-11T12:04:33.261Z",
      "updatedAt": "2024-11-11T12:04:33.261Z",
      "__v": 0,
      "id": "6731f2d1419d96b0fab027f3"
    },
    {
      "_id": "6731b234e2c840500b6e5aaf",
      "amount": 2,
      "blockHash": "0x4d0904aea8c98131a49c1d8994af23612787704cbe35ddc40fff11258c4e0123",
      "blockNumber": 14286411,
      "from": "0xd3cD3419d3e4552744bFf01e8cDF9464AeF0b123",
      "hash": "0x2816abfffca77e64bb9213a089ea70757b3a0e355dd3cb14853cac0e4dcc3123",
      "to": "0x9696cf4cd872E6C4B65cdc3Fc1b4da802C0C8123",
      "createdAt": "2024-11-11T07:28:52.016Z",
      "updatedAt": "2024-11-11T07:28:52.016Z",
      "__v": 0,
      "id": "6731b234e2c840500b6e5aaf"
    }
  ],
  "status": "success"
}

HTTP Response Codes

| Status Code | Text | Description | | ----------- | --------------------- | ------------------------------------------------------------------------- | --- | | 200 | OK | With an array of user objects and pagination information. | | 400 | Bad Request | The request was invalid or cannot be processed. | | 401 | Unauthorized | Authentication is required or has failed. | | 403 | Forbidden | The authenticated user is not authorized to perform the requested action. | | | 500 | Internal Server Error | An unexpected error occurred. |

API Documentation created with ❤️ by TrackGenesis