API-spesifikasjoner
Ny JSON fil: https://bitsnorge.github.io/dsop-saldo-studielan-api/dsop-saldo-studielan-api.json
{
"swagger": "2.0",
"info": {
"version": "v1-v2",
"title": "Accounts API Lånekassen",
"description": "Hent kontoinformasjon for kunder i Lånekassen",
"contact": {
"name": "Magnus Andersen",
"email": "magnus.andersen@lanekassen.no"
},
"license": {
"name": "Avtale med Lånekassen",
"url": "http://www.lanekassen.no/"
}
},
"schemes": [
"http"
],
"paths": {
"/v2/Accounts": {
"get": {
"tags": [
"Accounts"
],
"summary": "Returns a Account List for Customer v2",
"description": "The request must contain a valid Maskinporten token. Consent information is validated from the Maskinporten token and no separate Consent-ID header is required.",
"operationId": "AccountsV2_Get",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "PSU_ID",
"in": "header",
"required": true,
"type": "string",
"description": "Social security number for the requested customer"
},
{
"name": "Authorization",
"in": "header",
"required": true,
"type": "string",
"description": "Authorization token from Maskinporten"
},
{
"name": "X-Request-Id",
"in": "header",
"required": true,
"type": "string",
"description": "Unique id for the request, used for logging and tracing"
},
{
"name": "ApiKey",
"in": "header",
"required": true,
"type": "string",
"description": "Api key, required to get access to the api"
}
],
"responses": {
"200": {
"description": "Returns a Json response containing the list of the Accounts for a Customer in Lånekassen",
"schema": {
"$ref": "#/definitions/CustomerPSU"
}
},
"400": {
"description": "One or more headers are invalid"
},
"401": {
"description": "Authorization token is invalid"
},
"403": {
"description": "Consent information in the Maskinporten token is invalid or missing"
},
"404": {
"description": "Requested PSU_ID does not exist"
},
"429": {
"description": "Too busy"
},
"500": {
"description": "Unknown error. Contact support if the error persists"
}
}
}
}
},
"definitions": {
"CustomerPSU": {
"type": "object",
"properties": {
"Accounts": {
"type": "array",
"items": {
"$ref": "#/definitions/Account"
}
},
"TotalAmount": {
"type": "number",
"format": "double"
}
}
},
"Account": {
"type": "object",
"properties": {
"Balances": {
"type": "array",
"items": {
"$ref": "#/definitions/Balance"
}
},
"Name": {
"type": "string",
"readOnly": true
},
"Bban": {
"type": "string",
"readOnly": true
},
"Assert": {
"type": "object",
"readOnly": true
}
}
},
"Balance": {
"type": "object",
"properties": {
"BalanceType": {
"type": "string",
"readOnly": true
},
"BalanceAmount": {
"$ref": "#/definitions/Currency"
},
"LastChangeDateTime": {
"format": "date-time",
"type": "string"
}
}
},
"Currency": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"amount": {
"format": "double",
"type": "number"
}
}
}
}
}