Skip to content

List Transaction Summaries

Lists all transaction summaries for a collection. Use this endpoint to determine what is currently in your collection.

The contents of a collection can be derived from the transactions recorded against it. A transaction summary is an aggregation of these transactions per variant.

As an example, if you have a collection with the following transactions:

ActionQuantityVariantUnit Amount
Purchase2Heart of Fyendal 1st Edition Cold Foil500.00
Purchase3Arknight Shard 1st Edition Cold Foil100.00
Purchase2Arknight Shard 1st Edition Cold Foil150.00
Sale4Arknight Shard 1st Edition Cold Foil200.00

You will receive the following set of transaction summaries:

QuantityVariantInvestedProfit
2Heart of Fyendal 1st Edition Cold Foil1000.000.00
1Arknight Shard 1st Edition Cold Foil120.00320.00

Specifically, there is one transaction summary per variant in your collection.

A request can be submitted to this endpoint using the details below:

GET
https://api.fyendalscollection.com/collection/{collectionId}/transaction-summary
  • collectionId - The ID of the collection to list transactions from.
  • sort (Optional) - The order in which to sort the collections. Can be either Alphabetical, MarketValue, UnitValue, Gain, Quantity, CardNumber or PercentageGain. The default is Alphabetical.

  • searchQuery (Optional) - The query to search by.

GET /collection/3a14b163-15ee-41e2-a802-1494f2cc0d3f/transaction-summary?sortOrder=Chronological HTTP/1.1
Host: api.fyendalscollection.com
Authorization: Bearer eyJ...

A successful response from this endpoint gives a 200 OK and uses the following response model for each result:

TransactionSummaryResponseModel.ts
interface TransactionSummaryResponseModel {
readonly variantId: string;
readonly variantName: string;
readonly productId: string;
readonly productName: string;
readonly quantity: number;
readonly imageUrl: string;
readonly number: string | null;
readonly cashPosition: Money | null;
readonly invested: Money | null;
readonly profit: Money | null;
readonly gain: Money | null;
readonly marketValue: Money;
readonly fcId: string;
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"variantId": "2ca236a1-a30b-4246-8258-fbecac1003ee",
"variantName": "1st Edition Cold Foil",
"productId": "549623c8-34df-4018-a39e-75b37664da77",
"productName": "Arknight Shard",
"quantity": 2,
"imageUrl": "https://example.com/image.jpg",
"number": "CRU000",
"cashPosition": null,
"invested": null,
"profit": null,
"gain": null,
"marketValue": {
"value": 299.98,
"currency": "USD"
},
"fcId": "CRU000-1ST-CF"
}
],
"nextCursor": 1
}

The following problem types can be encountered when using this endpoint:

If the specified collection does not exist or if searching beyond the maximum cursor.

If the provided query is invalid or malformed.