List Collections
Lists all collections.
Request
Section titled “Request”A request can be submitted to this endpoint using the details below:
Method
Section titled “Method”https://api.fyendalscollection.com/collectionQuery Parameters
Section titled “Query Parameters”sort(Optional) - The order in which to sort the collections. Can be eitherChronological,Alphabetical,ValueorPercentageGain. The default isChronological.
Example
Section titled “Example”GET /collection?sort=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 CollectionResponseModel { readonly collectionId: string; readonly name: string; readonly valued: boolean; readonly pinned: boolean; readonly isGoalCollection: boolean; readonly description: string; readonly quantity: number; readonly image: number; readonly cashPosition: Money | null; readonly invested: Money | null; readonly profit: Money | null; readonly gain: Money | null; readonly marketValue: Money;}Example
Section titled “Example”HTTP/1.1 200 OKContent-Type: application/json
{ "results": [ { "collectionId": "3a14b163-15ee-41e2-a802-1494f2cc0d3f", "name": "My New Collection", "valued": false, "pinned": false, "isGoalCollection": false, "description": "My awesome collection!", "quantity": 0, "image": 0, "cashPosition": null, "invested": null, "profit": null, "gain": null, "marketValue": { "value": 0, "currency": "USD" } } ], "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.