Get the total number of purchases. (READ access required)
Changed onGets the total count of purchases.
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
The network the purchases were made on
When true, only counts purchases that require manual resolution: the next action is WaitingForManualAction or an error was recorded on it
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.
Filter by payment source type. When omitted with no smart-contract-address filter, purchase count defaults to Web3CardanoV1 for backwards compatibility.
Filter by on-chain state
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.
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
Example response
{
"status": "Success",
"data": {
"total": 75
}
}Changes
- info
added the new optional
queryrequest parameterfilterAgentIdentifier - info
added the new optional
queryrequest parameterfilterOnChainState - info
added the new optional
queryrequest parametersearchQuery
- info
- warning
deleted the
queryrequest parameterfilterAgentIdentifier - warning
deleted the
queryrequest parameterfilterOnChainState - warning
deleted the
queryrequest parametersearchQuery
- warning