api-examples
api-examples copied to clipboard
Swagger - Transactions v2 is missing "transactionId" in API doc
According to https://api.sbanken.no/Bank/swagger/#!/GET/ApiV2TransactionsByCustomerIdByAccountNumberGet, transactionId is no longer available in API v2. It was available in v1 and the API response also contains the field.
Current API documentation:
Internbank.Api.Contracts.Core.Bank.Transactions.v2.Transaction {
accountingDate (string, optional),
interestDate (string, optional),
otherAccountNumber (string, optional),
otherAccountNumberSpecified (boolean, optional),
amount (number, optional),
text (string, optional),
transactionType (string, optional),
transactionTypeCode (integer, optional),
transactionTypeText (string, optional),
isReservation (boolean, optional),
reservationType (string, optional) = ['notReservation', 'visaReservation', 'purchaseReservation', 'atmReservation'],
source (string, optional) = ['accountStatement', 'archive'],
cardDetails (Internbank.Api.Contracts.Core.Bank.Transactions.v2.CardDetails, optional),
cardDetailsSpecified (boolean, optional)
}
Hi @HNygard. TransactionId was intentionally removed in Transactions V2.
I believe @HNygard is saying that transactionId is still present in the output. I did a test and can confirm that it's still there.
Hi @anderaus . If you are using V1 of Transactions, then it is still there (for backwards compatibility). In V2 it has been removed. Please note that the CardDetails properties may include a transactionId which is only relevant to the card transaction. Do you still get a transactionId from V2 on the main transaction response?
@sbankenOB yes. V2 of the transaction endpoint still returns transactionId on the root object.
@sbankenOB : Yes, it is still present in V2 as far as I can see. And why should it not be present? Don't you have a unique ID per transaction?
A unique ID per transaction is VERY useful.
Example available in https://github.com/Sbanken/api-examples/issues/14:
{
"transactionId": "X",
"accountingDate": "2017-10-31T00:00:00+01:00",
"interestDate": "2017-11-01T00:00:00+01:00",
"otherAccountNumberSpecified": false,
"amount": 123.45,
"text": "KREDITRENTER",
"transactionType": "KREDITRTE",
"transactionTypeCode": 752,
"transactionTypeText": "KREDITRTE",
"isReservation": false,
"reservationType": null,
"source": 1,
"cardDetailsSpecified": false
}
Hi again, confirmed that this is a bug. However, as transactionId is a requested feature, we will look into providing an Identifier that is unique within the current account context.
@sbankenOB any update on this? As accounting/interestDate for transactions only returns the date (which could be a proxy for id, if it has second resolution at least) there is no unique identifier for transactions.
After playing around with the API and watching how transactions change states, doing anything useful with them without having a unique transaction id seems pretty useless. Fingers crossed that this will make it back in the API.
As far as I can see, transactionId is now only missing from non-card payments. As stated above, having a transactionId, or some sort of Id to track a transaction when it changes state, is very important in order to do many tasks, like categorising transactions.