List Transaction Summaries
Lists all transaction summaries for a collection. Use this endpoint to determine what is currently in your collection.
What is a Transaction Summary?
Section titled “What is a Transaction Summary?”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:
| Action | Quantity | Variant | Unit Amount |
|---|---|---|---|
| Purchase | 2 | Heart of Fyendal 1st Edition Cold Foil | 500.00 |
| Purchase | 3 | Arknight Shard 1st Edition Cold Foil | 100.00 |
| Purchase | 2 | Arknight Shard 1st Edition Cold Foil | 150.00 |
| Sale | 4 | Arknight Shard 1st Edition Cold Foil | 200.00 |
You will receive the following set of transaction summaries:
| Quantity | Variant | Invested | Profit |
|---|---|---|---|
| 2 | Heart of Fyendal 1st Edition Cold Foil | 1000.00 | 0.00 |
| 1 | Arknight Shard 1st Edition Cold Foil | 120.00 | 320.00 |
Specifically, there is one transaction summary per variant in your collection.
Request
Section titled “Request”A request can be submitted to this endpoint using the details below:
Method
Section titled “Method”https://api.fyendalscollection.com/collection/{collectionId}/transaction-summarycollectionId- The ID of the collection to list transactions from.
Query Parameters
Section titled “Query Parameters”-
sort(Optional) - The order in which to sort the collections. Can be eitherAlphabetical,MarketValue,UnitValue,Gain,Quantity,CardNumberorPercentageGain. The default isAlphabetical. -
searchQuery(Optional) - The query to search by.
Example
Section titled “Example”GET /collection/3a14b163-15ee-41e2-a802-1494f2cc0d3f/transaction-summary?sortOrder=Chronological HTTP/1.1Host: api.fyendalscollection.comAuthorization: Bearer eyJ...Response
Section titled “Response”A successful response from this endpoint gives a 200 OK and uses the following
response model for each result:
Response Model
Section titled “Response Model”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;}Example
Section titled “Example”HTTP/1.1 200 OKContent-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}Problem Types
Section titled “Problem Types”The following problem types can be encountered when using this endpoint:
NotFound
Section titled “NotFound”If the specified collection does not exist or if searching beyond the maximum cursor.
InvalidQuery
Section titled “InvalidQuery”If the provided query is invalid or malformed.