Update Collection
Updates an existing 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}collectionId- The ID of the collection to retrieve.
Request Model
Section titled “Request Model”When a collection has valued set to true, its statistics contribute to the
aggregated summary on the dashboard.
interface UpdateCollectionRequestModel { readonly name: string; readonly valued: boolean; readonly description: string; readonly pinned: boolean; readonly image: number;}Example
Section titled “Example”PUT /collection/3a14b163-15ee-41e2-a802-1494f2cc0d3f HTTP/1.1Host: api.fyendalscollection.comAuthorization: Bearer eyJ...Content-Type: application/json
{ "name": "My extra awesome collection!", "valued": true, "description": "New description!", "pinned": true, "image": 1}Response
Section titled “Response”A successful response from this endpoint gives a 200 OK and the following
response model:
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
{ "collectionId": "3a14b163-15ee-41e2-a802-1494f2cc0d3f", "name": "My extra awesome collection!", "valued": true, "pinned": true, "isGoalCollection": false, "description": "New description!", "quantity": 0, "image": 1, "cashPosition": null, "invested": null, "profit": null, "gain": null, "marketValue": { "value": 0, "currency": "USD" }}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 or variant does not exist.
LimitExceeded
Section titled “LimitExceeded”If you have exceeded the allowed limit for number of valued collections.