Skip to content

Update Transaction

Updates an existing transaction. Only the fields in the supplied request model that are non-null are updated.

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

PATCH
https://api.fyendalscollection.com/transaction/{transactionId}
  • transactionId - The ID of the transaction to update.
UpdateTransactionRequestModel.ts
interface UpdateTransactionRequestModel {
readonly occurredDate: string | null;
readonly action: string | null;
readonly quantity: number | null;
readonly unitAmount: Money | null;
}
PATCH /transaction/bfdd3db0-afb6-4934-9f39-c3aa97f9a459 HTTP/1.1
Host: api.fyendalscollection.com
Authorization: Bearer eyJ...
Content-Type: application/json
{
"occurredDate": "2025-08-30",
"action": "Sale",
"quantity": 2,
"unitAmount": {
"currency": "NZD",
"value": 159.99
}
}

A successful response from this endpoint gives a 200 OK and the following response model:

TransactionResponseModel.ts
interface TransactionResponseModel {
readonly transactionId: string;
readonly variantId: string;
readonly productId: string;
readonly occurred: string;
readonly action: string;
readonly quantity: number;
readonly unitAmount: Money;
readonly variantName: string;
readonly productName: string;
readonly number: string | null;
readonly imageUrl: string;
readonly fcId: string;
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"transactionId": "bfdd3db0-afb6-4934-9f39-c3aa97f9a459",
"variantId": "2ca236a1-a30b-4246-8258-fbecac1003ee",
"productId": "549623c8-34df-4018-a39e-75b37664da77",
"occurred": "2025-08-30T12:00:00Z",
"action": "Sale",
"quantity": 2,
"unitAmount": {
"currency": "NZD",
"value": 159.99
},
"variantName": "1st Edition Cold Foil",
"productName": "Arknight Shard",
"number": "CRU000",
"imageUrl": "https://example.com/image.jpg",
"fcId": "CRU000-1ST-CF"
}

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

If the specified collection or variant does not exist.