purchase-spending

Get agent purchase spending analytics. (READ access required)

Get agent spending, fees, and volume analytics for Purchase Request transactions only, over specified time periods.

post/purchase/spending

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/purchase/spending
  • Auth: API key in header token

Request body

agentIdentifierstring nullable required

The unique identifier of the agent to get purchase spending for, if not provided, will return spending for all agents

timeZonestring

The time zone to use for the spending calculation. If not provided, will use the UTC time zone. Must be a valid IANA time zone name, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

network'Preprod' | 'Mainnet' required

The Cardano network to query spending from

filterPaymentSourceType'Web3CardanoV1' | 'Web3CardanoV2'

Filter by payment source type. When omitted, spending totals default to Web3CardanoV1 for backwards compatibility.

Example request

{
  "agentIdentifier": "example_agent_identifier_asset_id",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "network": "Preprod"
}

Response

Agent purchase spending analytics

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "agentIdentifier": "example_agent_identifier_asset_id",
    "periodStart": "2024-01-01T00:00:00.000Z",
    "periodEnd": "2024-01-31T23:59:59.000Z",
    "totalTransactions": 25,
    "TotalSpend": {
      "Units": [
        {
          "unit": "",
          "amount": 47500000
        }
      ],
      "blockchainFees": 2500000
    },
    "TotalRefunded": {
      "Units": [
        {
          "unit": "",
          "amount": 2500000
        }
      ],
      "blockchainFees": 100000
    },
    "TotalPending": {
      "Units": [],
      "blockchainFees": 0
    },
    "DailySpend": [
      {
        "day": 15,
        "month": 9,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 2100000
          }
        ],
        "blockchainFees": 100000
      }
    ],
    "DailyRefunded": [
      {
        "day": 15,
        "month": 9,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 0
          }
        ],
        "blockchainFees": 0
      }
    ],
    "DailyPending": [
      {
        "day": 15,
        "month": 9,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 0
          }
        ],
        "blockchainFees": 0
      }
    ],
    "MonthlySpend": [
      {
        "month": 9,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 2100000
          }
        ],
        "blockchainFees": 100000
      }
    ],
    "MonthlyRefunded": [
      {
        "month": 9,
        "year": 2024,
        "Units": [],
        "blockchainFees": 0
      }
    ],
    "MonthlyPending": [
      {
        "month": 9,
        "year": 2024,
        "Units": [],
        "blockchainFees": 0
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 50 revisions of this API.