The newly released (2012-06-04) Swedbank mobile application is now a real android application and no longer just a website wrapper. What follows is a short documentation of the JSON API used by the app.
The API is located at https://auth.api.swedbank.se/ and all requests and responses are JSON objects.
Login with username/password
POST /TDE_DAP_Portal_REST_WEB/api/v1/identification/personalcode?dsid=Zf0wGfKF HTTP/1.1
Authorization: aWlyallxRmpRcTVMY0ZDbDo5YmE2OTkxMzQ2ZjJmOGU5
Content-Type: application/json; charset=UTF-8
Content-Length: 43
Host: auth.api.swedbank.se
Connection: Keep-Alive
User-Agent: SwedbankMobilbank/3.0.0 (Android; 4.0.2) samsung/Galaxy_Nexus
Cookie: dsid=Zf0wGfKF
Cookie2: $Version=1
{"password":"123abc","userId":"8105280000"}
Nothing unusual about this request except for the dsid and Authorization header. During my short period of testing the Authorization header maintained the same value for all requests, the dsid on the other hand changes with every request and there’s no way of telling what the dsid for the next request should be just by looking at the API response. A bit deeper digging will be required to find out how it’s generated.
Login response
HTTP/1.1 201 Created
Server: FSB
Date: Mon, 04 Jun 2012 23:21:26 GMT
Cache-control: no-cache
Transfer-encoding: chunked
Content-type: application/json; charset=UTF-8
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-language: sv-SE
Set-Cookie: mobilsession=1016992778.47873.0000; expires=Mon, 04-Jun-2012 23:41:26 GMT; path=/
{
"personalCodeChangeRequired": false,
"links": {
"next": {
"method": "GET",
"uri": "/v1/profile/"
}
},
"serverTime": "20120605 01:21"
}
Not a lot of interesting information here. We’ve got a URL for our next request so let’s continue.
Profile request
POST /TDE_DAP_Portal_REST_WEB/api/v1/profile/private/08999?dsid=6hl9Isv6 HTTP/1.1
Authorization: aWlyallxRmpRcTVMY0ZDbDo5YmE2OTkxMzQ2ZjJmOGU5
Content-Type: application/json; charset=UTF-8
Content-Length: 0
Host: auth.api.swedbank.se
Connection: Keep-Alive
User-Agent: SwedbankMobilbank/3.0.0 (Android; 4.0.2) samsung/Galaxy_Nexus
Cookie: JSESSIONID=0000XRefgtdh63YPHmwNuITrMTg:16t5rmrdr; SWBTC=gi35jCq1KpGexTaK8FLZIEgVIKk=:LTFhNTQxZDhmOjEzN2I3ODllYTIxOmQyYw==:odwhiQ==; mobilsession=1016992778.47873.0000; dsid=6hl9Isv6
Cookie2: $Version=1
Profile response
{
"hasSwedbankProfile": true,
"hasSavingbankProfile": false,
"selectedProfile": {
"customerName": "Firstname Lastname",
"customerNumber": "username/personnr"
},
"menuStructure": {
"menuGroups": [{
"name": ["/v1/sign"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/sign/securitytoken/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}, {
"requestMethods": ["POST"],
"serviceURIs": ["/v1/sign/securitytoken/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}, {
"requestMethods": ["POST"],
"serviceURIs": ["/v1/sign/bankid/mobile/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}, {
"requestMethods": ["GET"],
"serviceURIs": ["/v1/sign/bankid/mobile/verify/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/identification"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/identification/personalcode"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/identification"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/identification/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/identification"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/identification/logout"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/identification"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/identification/touch"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/transfer/baseinfo"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/transfer/registered"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/transfer/registered"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/transfer/{transferId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/transfer/{transferId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/transfer/confirmed/{signId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/transfer/confirmed"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/transfer/recipient"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/transfer/recipient/confirmed/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/transfer"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/transfer/{transferId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/profile"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/profile/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/profile"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/profile/{profileId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/profile"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/profile/private/{bankId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/baseinfo"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/payment/registered"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/registered"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/{paymentId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/payment/{paymentId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/payment/confirmed/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/confirmed"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/payment/{paymentId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/einvoice/{einvoiceId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/payment/payee"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/payment/payee/confirmed/{signId}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/payee/{type}/{accountNumber}"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/payment"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/payment/rejected"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/search"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/search/location"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/search"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/search/location"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/marketinfo/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/multimarketinfo/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/marketinfo/{selection}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/securitylist/{listid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/securitylist/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/securities/userlist/{listid}/{instrumenttype}/{instrumentid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/securities/userlist/{listid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/securities/userlist/{listid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/securities/userlist/{listid}/{instrumenttype}/{instrumentid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/userlist/{listid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/userlist"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/securities/userlist/{listid}/{name}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/securities/userlist/{name}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/securities/quickuserlist/{vpsubscriptionid}/{instrumenttype}/{instrumentid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/quickuserlist/{vpsubscriptionid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/securities/quickuserlist/{vpsubscriptionid}/{instrumenttype}/{instrumentid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["PUT"],
"serviceURIs": ["/v1/securities/subscription/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/securities/subscription/{vpsubscriptionid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/option/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/engagement"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/engagement/overview"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/engagement"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/engagement/transactions/{accountId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/engagement"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/engagement/loandetail/{loanId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/quickbalance"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/quickbalance/subscription/{accountId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/quickbalance"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/quickbalance/subscription/{subscriptionId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/quickbalance"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/quickbalance/{subscriptionId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/quickbalance"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/quickbalance/accounts"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/loan"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/loan/rates/private/{bankid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/v1/loan"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/loan/rates/mortgage/{bankid}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/loan"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/loan/calculation/housingmortgage"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/loan"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/loan/calculation/private"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/v1/prepaidcard"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/prepaidcard/reload"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/prepaidcard"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/prepaidcard/reload"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/custodies"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": false
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/custody"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": false
}]
}, {
"name": ["/v1/securities"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/securities/selectcustody"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": false
}]
}, {
"name": ["/v1/securities/order"],
"items": [{
"requestMethods": ["POST"],
"serviceURIs": ["/v1/securities/order/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/order"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/order/estimation"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/order"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/order/validation"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/order"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/securities/order/{orderId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/trigger"],
"items": [{
"requestMethods": ["DELETE"],
"serviceURIs": ["/v1/securities/trigger/{triggerId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/orders"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/issues"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/triggers"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/trades"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/orders/{orderId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/trades/{tradeId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/issues/{issueId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/triggers/{triggerId}"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/securities/orderstatus"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/securities/orderstatus/activity"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/einvoice"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/einvoice/incoming"],
"authorized": false,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/message"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/message/reminders"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/currency"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/currency/exchangerates"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/currency"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/currency/conversion"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}, {
"name": ["/v1/identification/device"],
"items": [{
"requestMethods": ["GET"],
"serviceURIs": ["/v1/identification/device/"],
"authorized": true,
"authorizedIfAuthMethodUpgrade": true
}]
}]
}
}
We’ve got the user’s name and username/personnr, but that’s not the most interesting part! The menuStructure object seems to contain all the URIs for this API. As you might imagine this will come in handy later.
Let’s continue with the accounts/engagements request.
Accounts and engagements
GET /TDE_DAP_Portal_REST_WEB/api/v1/engagement/overview?dsid=gNBHkcQm HTTP/1.1
Authorization: aWlyallxRmpRcTVMY0ZDbDo5YmE2OTkxMzQ2ZjJmOGU5
Content-Type: application/json; charset=UTF-8
Host: auth.api.swedbank.se
Connection: Keep-Alive
User-Agent: SwedbankMobilbank/3.0.0 (Android; 4.0.2) samsung/Galaxy_Nexus
Cookie: JSESSIONID=0000XRefgtPh6dYPHmwNuITrMTg:16t5rmrdr; SWBTC=gi35jCq1KpGexTaK8FLZIEgVIKk=:LTFhNTQxZDhmOjEzN2I3ODllYTIxOmQyYw==:odwhiQ==; mobilsession=1076992778.47873.0000; dsid=gNBHkcQm
Cookie2: $Version=1
Accounts response
HTTP/1.1 200 OK
Server: FSB
Date: Mon, 04 Jun 2012 23:21:27 GMT
Cache-control: no-cache
Transfer-encoding: chunked
Content-type: application/json; charset=UTF-8
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-language: sv-SE
Set-Cookie: mobilsession=1076992778.47873.0000; expires=Mon, 04-Jun-2012 23:41:27 GMT; path=/
{
"transactionAccounts": [{
"selectedForQuickbalance": false,
"links": {
"next": {
"method": "GET",
"uri": "/v1/engagement/transactions/befef7059a0a16d6c40fcf70a0bc3f22e422617a"
}
},
"name": "Privatkonto",
"id": "befef7059a0a16d6c40fcf70a0bc3f22e422617a",
"currency": "SEK",
"accountNumber": "903 000 000-0",
"clearingNumber": "8327-9",
"balance": "12 345,67",
"fullyFormattedNumber": "8327-9,903 000 000-0"
}],
"transactionDisposalAccounts": [],
"loanAccounts": [],
"savingAccounts": [{
"selectedForQuickbalance": false,
"links": {
"next": {
"method": "GET",
"uri": "/v1/engagement/transactions/3cee0aaad3896cd72210a15142b158d1c51a2c12"
}
},
"name": "e-sparkonto",
"id": "3cee0aaad3896cd72210a15142b158d1c51a2c12",
"currency": "SEK",
"accountNumber": "913 000 000-0",
"clearingNumber": "8327-9",
"balance": "123 456,78",
"fullyFormattedNumber": "8327-9,913 000 000-0"
}],
"cardAccounts": [],
"cardCredit": {}
}
Transaction accounts, saving accounts, loan accounts, card accounts and card credit. That’s a lot of useful info with just one request!
The last example will be a request for a list of transactions for an account.
Transactions for “Privatkonto”
GET /TDE_DAP_Portal_REST_WEB/api/v1/engagement/transactions/befef7059a0a16d6c40fcf70a0bc3f22e422617a?dsid=MAccCv1G HTTP/1.1
Authorization: aWlyallxRmpRcTVMY0ZDbDo5YmE2OTkxMzQ2ZjJmOGU5
Content-Type: application/json; charset=UTF-8
Host: auth.api.swedbank.se
Connection: Keep-Alive
User-Agent: SwedbankMobilbank/3.0.0 (Android; 4.0.2) samsung/Galaxy_Nexus
Cookie: JSESSIONID=0000ioFdEvbn3ZpzdjzB3BeGFXvr:16t5rmpto; SWBTC=PWrrZq5yzmlcxYgT+LFMjtDQ+0o=:NTllODMzMGE6MTM3Yjc3OWFjM2Y6MjFmNQ==:ETAIkA==; mobilsession=1026661130.47873.0000; dsid=MAccCv1G
Cookie2: $Version=1
Transactions response
HTTP/1.1 200 OK
Server: FSB
Date: Tue, 05 Jun 2012 00:17:16 GMT
Cache-control: no-cache
Transfer-encoding: chunked
Content-type: application/json; charset=UTF-8
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-language: sv-SE
Set-Cookie: mobilsession=1026661130.47873.0000; expires=Tue, 05-Jun-2012 00:37:16 GMT; path=/
{
"transactions": [{
"date": "2012-06-04",
"description": "CLAS OHLSON",
"currency": "SEK",
"amount": "-49,00"
}, {
"date": "2012-06-04",
"description": "KONTANTEN DIREKT",
"currency": "SEK",
"amount": "-500,00"
}, {
"date": "2012-06-03",
"description": "CYKLOTEKET",
"currency": "SEK",
"amount": "-480,00"
}, ... ],
"account": {
"availableAmount": "12 345,67",
"creditGranted": "0,00",
"quickbalanceSubscription": {
"id": "3a249d57ed7263318be7dd0267b073b42e0efd6a",
"active": false,
"links": {
"next": {
"method": "POST",
"uri": "/v1/quickbalance/subscription/3a249d57ed7263318be7dd0267b073b42e0efd6a"
}
}
},
"name": "Privatkonto",
"id": "befef7059a0a16d6c40fcf70a0bc3f22e422617a",
"currency": "SEK",
"accountNumber": "903 000 000-0",
"clearingNumber": "8327-9",
"balance": "12 345,67",
"fullyFormattedNumber": "8327-9,903 000 000-0"
},
"numberOfTransactions": 100,
"reservedTransactions": [{
"date": "20120604",
"description": "SKYDDAT BELOPP",
"currency": "SEK",
"amount": "-140,10"
}, {
"date": "20120604",
"description": "SKYDDAT BELOPP",
"currency": "SEK",
"amount": "-600,00"
}, ... ],
"numberOfReservedTransactions": 4,
"moreTransactionsAvailable": true,
"links": {
"next": {
"method": "GET",
"uri": "/v1/engagement/transactions/befef7059a0a16d6c40fcf70a0bc3f22e422617a?transactionsPerPage=100&page=2"
}
}
}
Not much to explain here. We’ve got a list of the last 100 transactions and another list with all the reserved transactions.
That’s all I had time for today. I might update this post with additional information about how the dsid is generated and… other stuff.