purchase

Get the total number of purchases. (READ access required)

Changed on

Gets the total count of purchases.

get/purchase/count

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/count
  • Auth: API key in header token

Query parameters

network'Preprod' | 'Mainnet' required

The network the purchases were made on

filterNeedsManualActionstring

When true, only counts purchases that require manual resolution: the next action is WaitingForManualAction or an error was recorded on it

filterSmartContractAddressstring nullable

The smart contract address of the payment source. When omitted with no explicit payment source type, purchase count defaults to Web3CardanoV1 for backwards compatibility. Supplying this field queries that exact V1 or V2 source.

filterPaymentSourceType'Web3CardanoV1' | 'Web3CardanoV2'

Filter by payment source type. When omitted with no smart-contract-address filter, purchase count defaults to Web3CardanoV1 for backwards compatibility.

filterOnChainState'FundsLocked' | 'FundsOrDatumInvalid' | 'ResultSubmitted' | 'RefundRequested' | 'Disputed' | 'WithdrawAuthorized' | 'RefundAuthorized' | 'Withdrawn' | 'RefundWithdrawn' | 'DisputedWithdrawn'

Filter by on-chain state

filterAgentIdentifierstring

Restrict results to one or more agents by exact agent identifier, as a comma-separated list of at most 20. Prefer this over searchQuery when filtering by agent: it is an exact (case-insensitive) match and will not match other fields. Supplying this field does not apply the default Web3CardanoV1 compatibility filter, so agents on a Web3CardanoV2 source are found too. A value naming no agent matches nothing.

searchQuerystring

Free-text search. Matches ID, blockchain identifier (exact), agent identifier, agent name, smart contract wallet address, on-chain state, layer ("L1", "L2" or "hydra"), or amount. A query that looks like a hash (5+ hex characters) additionally matches input hash, result hash, Hydra head ID, and the current or any historical transaction hash. Matching is case-insensitive, and "%" and "_" are matched literally.

Response

Total purchases count

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "total": 75
  }
}

Changes

    • info

      added the new optional query request parameter filterAgentIdentifier

    • info

      added the new optional query request parameter filterOnChainState

    • info

      added the new optional query request parameter searchQuery

    • warning

      deleted the query request parameter filterAgentIdentifier

    • warning

      deleted the query request parameter filterOnChainState

    • warning

      deleted the query request parameter searchQuery