diff --git a/api/baufi-passende-vorschlaege-api.yaml b/api/baufi-passende-vorschlaege-api.yaml index 7fd18ae..f0ab211 100644 --- a/api/baufi-passende-vorschlaege-api.yaml +++ b/api/baufi-passende-vorschlaege-api.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: description: 'As consumer, I want to determine appropriate financing proposals based on my situation and preferences. Analyze my needs and compare and find the best offers which fits my needs.' - version: 1.0.27 + version: 1.0.42 title: Vorschlaege API contact: name: Europace AG @@ -135,9 +135,9 @@ paths: schema: $ref: '#/components/schemas/FinanzierungsVorschlaege' '400': - description: Bad request + description: Bad request. '404': - description: No determination triggered for this ID or result no longer available + description: No determination triggered for this ID or result no longer available. '500': description: Internal server error security: @@ -164,9 +164,9 @@ paths: schema: $ref: '#/components/schemas/VorschlagResponse' '401': - description: Authorization information is missing or invalid + description: Authorization information is missing or invalid. '404': - description: No financial proposals found for AnfrageId + description: No financial proposals found for AnfrageId. '419': description: Max count of bookmarks exceeded '500': @@ -616,6 +616,16 @@ components: format: int32 description: 'Desired provision interest-free period in months' example: 6 + produktAnbieterIds: + type: string + description: 'A list of comma seperated produktanbieter ids for which the api will try to generate offers if allowed by the partner management.' + finanzierungsBestandteile: + type: string + description: 'Allowed values are: UNKOMPLIZIERTE_FINANZIERUNG, OEFFENTLICHE_FOERDERUNGEN, WEITERE_PRODUKTE' + enum: + - UNKOMPLIZIERTE_FINANZIERUNG + - OEFFENTLICHE_FOERDERUNGEN + - WEITERE_PRODUKTE Restschuld: type: object properties: @@ -687,6 +697,9 @@ components: type: string format: date example: '2021-05-21' + angebotsTyp: + type: string + example: 'NEUFINANZIERUNG|PROLONGATION|UMSCHULDUNG' finanzierungsbausteine: maxItems: 2 minItems: 1 @@ -1218,4 +1231,4 @@ components: bearerAuth: type: http scheme: bearer - bearerFormat: JWT + bearerFormat: JWT \ No newline at end of file diff --git a/docs/passende-vorschlaege-europace.postman_collection.json b/docs/passende-vorschlaege-europace.postman_collection.json deleted file mode 100644 index bf3882e..0000000 --- a/docs/passende-vorschlaege-europace.postman_collection.json +++ /dev/null @@ -1,909 +0,0 @@ -{ - "info": { - "_postman_id": "d9028313-b92c-4b17-9a27-c5277ea2bd9c", - "name": "passende-vorschlaege-europace", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "Create Access Token", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setGlobalVariable(\"ps_jwt_access_token\", jsonData.access_token);", - "pm.collectionVariables.set('mode', '');" - ], - "type": "text/javascript" - } - } - ], - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "{{ps-client-secret}}", - "type": "string" - }, - { - "key": "username", - "value": "{{ps-client-id}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "grant_type", - "value": "client_credentials", - "type": "text" - } - ] - }, - "url": { - "raw": "https://service.auth.api.europace.de/token", - "protocol": "https", - "host": [ - "service", - "auth", - "api", - "europace", - "de" - ], - "path": [ - "token" - ] - } - }, - "response": [] - }, - { - "name": "Request Vorschlaege Synchron", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store anfrageId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - " ", - " const resultAnfrageId = pm.response.json().anfrageId;", - " pm.collectionVariables.set('anfrageId', resultAnfrageId);", - "})" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "var faelligkeitsdatum = new Date();\r", - "faelligkeitsdatum.setMonth(faelligkeitsdatum.getMonth() + 3);\r", - "postman.setEnvironmentVariable(\"faelligkeitsdatum\", faelligkeitsdatum.toISOString());\r", - "\r", - "var kreditEntscheidungsZeit = new Date();\r", - "kreditEntscheidungsZeit.setDate(kreditEntscheidungsZeit.getDate() + 28);\r", - "postman.setEnvironmentVariable(\"kreditEntscheidungsZeit\", kreditEntscheidungsZeit.toISOString());" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"metadaten\": {\n \"datenkontext\": \"TEST_MODUS\",\n \"extKundenId\": \"\",\n \"extClientId\": \"\"\n },\n \"kundenangaben\": {\n \"haushalte\": [\n {\n \"kunden\": [\n {\n \"beschaeftigtSeit\": \"2010-01-26\",\n \"arbeitBefristet\": false,\n \"einkommenNetto\": 5000,\n \"geburtsdatum\": \"1999-05-26\",\n \"beschaeftigungsArt\": \"ANGESTELLTER\"\n }\n ],\n \"finanzielleSituation\": {\n \"eigenKapital\": 100000,\n \"sonstigeEinnahmen\": 0,\n \"nichtAbgeloestePrivateDarlehenRestschuld\": 0,\n \"nichtAbgeloesteRatenkrediteRestschuld\": 0\n }\n }\n ],\n \"finanzierungsbedarf\": {\n \"finanzierungszweck\": \"KAUF\",\n \"grundstueckKaufpreis\": 380000,\n \"kaufpreis\": 250000,\n \"modernisierungsKostenInklEigenleistungen\": 25000,\n \"modernisierungEigenleistung\": 15000,\n \"praeferenzen\": {\n \"rate\": 900,\n \"faelligkeitsdatum\": \"{{faelligkeitsdatum}}\",\n \"kreditEntscheidungsZeit\": \"{{kreditEntscheidungsZeit}}\",\n \"laufzeit\": 60\n }\n },\n \"finanzierungsobjekt\": {\n \"objektArt\": \"EINFAMILIENHAUS\",\n \"vermietet\": false,\n \"baujahr\": 2000,\n \"gewerblicheNutzung\": false,\n \"anschrift\": {\n \"plz\": \"10179\",\n \"ort\": \"Berlin\",\n \"strasse\": \"Klosterstrasse\",\n \"hausnummer\": \"8\"\n },\n \"wohnflaeche\": 150\n }\n}\n}" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege/ermitteln", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "ermitteln" - ] - }, - "description": "Triggert die Ermittlung von Vorschlaegen und erhaelt eine anfrageId zum Abholen der Daten" - }, - "response": [] - }, - { - "name": "Request Prolo-Vorschlaege", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store anfrageId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - " ", - " const resultAnfrageId = pm.response.json().anfrageId;", - " pm.collectionVariables.set('anfrageId', resultAnfrageId);", - "})" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "var faelligkeitsdatum = new Date();", - "faelligkeitsdatum.setMonth(faelligkeitsdatum.getMonth() + 3);", - "postman.setEnvironmentVariable(\"faelligkeitsdatum\", faelligkeitsdatum.toISOString());", - "", - "var kreditEntscheidungsZeit = new Date();", - "kreditEntscheidungsZeit.setDate(kreditEntscheidungsZeit.getDate() + 28);", - "postman.setEnvironmentVariable(\"kreditEntscheidungsZeit\", kreditEntscheidungsZeit.toISOString());" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "type": "text", - "value": "Bearer {{ps_jwt_access_token}}" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"metadaten\": {\n \"datenkontext\": \"TEST_MODUS\",\n \"extKundenId\": \"\",\n \"extClientId\": \"\"\n },\n \"kundenangaben\": {\n \"haushalte\": [\n {\n \"kunden\": [\n {\n \"beschaeftigtSeit\": \"2010-01-26\",\n \"arbeitBefristet\": false,\n \"einkommenNetto\": 5000,\n \"geburtsdatum\": \"1999-05-26\",\n \"beschaeftigungsArt\": \"ANGESTELLTER\"\n }\n ],\n \"finanzielleSituation\": {\n \"eigenKapital\": 100000,\n \"sonstigeEinnahmen\": 0,\n \"nichtAbgeloestePrivateDarlehenRestschuld\": 0,\n \"nichtAbgeloesteRatenkrediteRestschuld\": 0\n }\n }\n ],\n \"finanzierungsbedarf\": {\n \"finanzierungszweck\": \"ANSCHLUSSFINANZIERUNG\",\n \"grundstueckKaufpreis\": 380000,\n \"kaufpreis\": 250000,\n \"modernisierungsKostenInklEigenleistungen\": 25000,\n \"modernisierungEigenleistung\": 15000,\n \"sonderzahlungZumZinsbindungsEnde\" : 20000,\n \"praeferenzen\": {\n \"rate\": 900,\n \"faelligkeitsdatum\": \"{{faelligkeitsdatum}}\",\n \"kreditEntscheidungsZeit\": \"{{kreditEntscheidungsZeit}}\",\n \"laufzeit\": 15,\n \"zinsbindungInJahren\": 10,\n \"bereitstellungszinsfreieZeit\": 3,\n \"tilgung\": 2.00\n },\n \"darlehenswunsch\": 250000\n },\n \"finanzierungsobjekt\": {\n \"objektArt\": \"EINFAMILIENHAUS\",\n \"vermietet\": false,\n \"baujahr\": 2000,\n \"gewerblicheNutzung\": false,\n \"anschrift\": {\n \"plz\": \"10179\",\n \"ort\": \"Berlin\",\n \"strasse\": \"Klosterstrasse\",\n \"hausnummer\": \"8\"\n },\n \"wohnflaeche\": 150,\n \"marktwert\": 1000000,\n \"darlehensliste\": [\n {\n \"wirdAbgeloest\": false,\n \"darlehensgeber\": \"MUSTERBANK\",\n \"grundschuld\": 500000,\n \"restschuld\": {\n \"aktuell\": 45879.81\n }\n },\n {\n \"wirdAbgeloest\": true,\n \"darlehensgeber\": \"SPARDA_BW\",\n \"grundschuld\": 125867.85,\n \"zinsbindungBis\": \"2021-12-31\",\n \"laufzeitende\": \"2054-09-30\",\n \"restschuld\": {\n \"zumAbloeseTermin\": 125867.85\n },\n \"darlehenskontonummer\": \"Abloesedarlehen\"\n }\n ]\n }\n }\n}\n" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "" - ] - }, - "description": "Triggert die Ermittlung von Prolongations-Vorschlaegen und erhaelt eine anfrageId zum Abholen der Daten" - }, - "response": [] - }, - { - "name": "Request Vorschlaege", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "var faelligkeitsdatum = new Date();", - "faelligkeitsdatum.setMonth(faelligkeitsdatum.getMonth() + 3);", - "postman.setEnvironmentVariable(\"faelligkeitsdatum\", faelligkeitsdatum.toISOString());", - "", - "var kreditEntscheidungsZeit = new Date();", - "kreditEntscheidungsZeit.setDate(kreditEntscheidungsZeit.getDate() + 28);", - "postman.setEnvironmentVariable(\"kreditEntscheidungsZeit\", kreditEntscheidungsZeit.toISOString());" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store anfrageId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - " ", - " const resultAnfrageId = pm.response.json().anfrageId;", - " pm.collectionVariables.set('anfrageId', resultAnfrageId);", - "})" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"metadaten\": {\n \"datenkontext\": \"TEST_MODUS\",\n \"extKundenId\": \"\",\n \"extClientId\": \"\"\n },\n \"kundenangaben\": {\n \"haushalte\": [\n {\n \"kunden\": [\n {\n \"beschaeftigtSeit\": \"2010-01-26\",\n \"arbeitBefristet\": false,\n \"einkommenNetto\": 5000,\n \"geburtsdatum\": \"1999-05-26\",\n \"beschaeftigungsArt\": \"ANGESTELLTER\"\n }\n ],\n \"finanzielleSituation\": {\n \"eigenKapital\": 100000,\n \"sonstigeEinnahmen\": 0,\n \"nichtAbgeloestePrivateDarlehenRestschuld\": 0,\n \"nichtAbgeloesteRatenkrediteRestschuld\": 0\n }\n }\n ],\n \"finanzierungsbedarf\": {\n \"finanzierungszweck\": \"KAUF\",\n \"grundstueckKaufpreis\": 380000,\n \"kaufpreis\": 250000,\n \"modernisierungsKostenInklEigenleistungen\": 25000,\n \"modernisierungEigenleistung\": 15000,\n \"praeferenzen\": {\n \"rate\": 900,\n \"faelligkeitsdatum\": \"{{faelligkeitsdatum}}\",\n \"kreditEntscheidungsZeit\": \"{{kreditEntscheidungsZeit}}\",\n \"laufzeit\": 60\n }\n },\n \"finanzierungsobjekt\": {\n \"objektArt\": \"EINFAMILIENHAUS\",\n \"vermietet\": false,\n \"baujahr\": 2000,\n \"gewerblicheNutzung\": false,\n \"anschrift\": {\n \"plz\": \"10179\",\n \"ort\": \"Berlin\",\n \"strasse\": \"Klosterstrasse\",\n \"hausnummer\": \"8\"\n },\n \"wohnflaeche\": 150\n }\n}\n}" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "" - ] - }, - "description": "Triggert die Ermittlung von Vorschlaegen und erhaelt eine anfrageId zum Abholen der Daten" - }, - "response": [] - }, - { - "name": "GET Vorschlaege", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store finanzierungsVorschlagId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - " ", - " let responseData = pm.response.json();", - " pm.environment.set(\"finanzierungsVorschlagId\", responseData.vorschlaege[0].finanzierungsVorschlagId);", - "})", - "" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - }, - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege/{{anfrageId}}", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "{{anfrageId}}" - ] - }, - "description": "Holt die passenden Vorschlaege für die angegebene anfrageId" - }, - "response": [] - }, - { - "name": "Bookmark eines Vorschlages", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store anfrageId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - "", - " const resultVorgangId = pm.request.toJSON().vorgangId;", - " pm.collectionVariables.set('vorgangId', resultVorgangId);", - "})" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"anfrageId\": \"{{anfrageId}}\",\n \"finanzierungsVorschlagId\": \"{{finanzierungsVorschlagId}}\",\n \"vorgangId\": \"TESTID\"\n\n}" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlag/bookmark", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlag", - "bookmark" - ] - } - }, - "response": [] - }, - { - "name": "GET list all Vorschlaege", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - }, - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege/list/{{vorgangId}}", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "list", - "{{vorgangId}}" - ] - }, - "description": "Holt die bookmarked Vorschlaege für die gegebene VorgangId" - }, - "response": [] - }, - { - "name": "GET list bookmarked Vorschlaege", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - }, - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege/list/{{vorgangId}}?vorschlagStatus=bookmarked", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "list", - "{{vorgangId}}" - ], - "query": [ - { - "key": "vorschlagStatus", - "value": "bookmarked" - } - ] - }, - "description": "Holt die bookmarked Vorschlaege für die gegebene VorgangId" - }, - "response": [] - }, - { - "name": "GET list accepted Vorschlaege", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - }, - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege/list/{{vorgangId}}?vorschlagStatus=accepted", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "list", - "{{vorgangId}}" - ], - "query": [ - { - "key": "vorschlagStatus", - "value": "accepted" - } - ] - }, - "description": "Holt die bookmarked Vorschlaege für die gegebene VorgangId" - }, - "response": [] - }, - { - "name": "Accept Vorschlag", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"finanzierungsVorschlagId\": \"{{finanzierungsVorschlagId}}\",\n \"vorgangId\": \"TESTID\"\n}" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlag/accept", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlag", - "accept" - ] - }, - "description": "Triggert die Akzeptieren von Vorschlaegen schiebt das Angebot auf S3 in accepted" - }, - "response": [] - }, - { - "name": "Delete Vorschlag", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"finanzierungsVorschlagId\": \"{{finanzierungsVorschlagId}}\",\n \"vorgangId\": \"TESTID\"\n}" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlag/delete", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlag", - "delete" - ] - }, - "description": "Triggert die Akzeptieren von Vorschlaegen schiebt das Angebot auf S3 in accepted" - }, - "response": [] - }, - { - "name": "Request Vorschlaege Kaufpreisegrenze", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "var faelligkeitsdatum = new Date();", - "faelligkeitsdatum.setMonth(faelligkeitsdatum.getMonth() + 3);", - "postman.setEnvironmentVariable(\"faelligkeitsdatum\", faelligkeitsdatum.toISOString());", - "", - "var kreditEntscheidungsZeit = new Date();", - "kreditEntscheidungsZeit.setDate(kreditEntscheidungsZeit.getDate() + 28);", - "postman.setEnvironmentVariable(\"kreditEntscheidungsZeit\", kreditEntscheidungsZeit.toISOString());" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store anfrageId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - " ", - " const resultAnfrageId = pm.response.json().anfrageId;", - " pm.collectionVariables.set('anfrageId', resultAnfrageId);", - " pm.collectionVariables.set('mode', 'maximum-offer')", - "})" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - } - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "type": "text", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"metadaten\": {\n \"datenkontext\": \"TEST_MODUS\",\n \"extClientId\": \"TestKaufpreisgrenze\",\n \"extKundenId\": \"NFR60\",\n \"mode\": \"maximum-offer\"\n },\n \"kundenangaben\": {\n \"haushalte\": [\n {\n \"kunden\": [\n {\n \"einkommenNetto\": 3000\n }\n ],\n \"finanzielleSituation\": {\n \"eigenKapital\": 50000\n }\n }\n ],\n \"finanzierungsbedarf\": {\n \"finanzierungszweck\": \"KAUF\",\n \"kaufpreis\": 1\n },\n \"finanzierungsobjekt\": {\n \"anschrift\": {\n \"bundesland\": \"03\"\n }\n }\n }\n}" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "" - ] - }, - "description": "Triggert die Ermittlung von Vorschlaegen und erhaelt eine anfrageId zum Abholen der Daten" - }, - "response": [] - }, - { - "name": "GET Vorschlaege Kaufpreisgrenze", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test('Store finanzierungsVorschlagId as Collection Variable', function () {", - " pm.expect(pm.response.code).to.eql(200);", - " ", - " let responseData = pm.response.json();", - " pm.environment.set(\"finanzierungsVorschlagId\", responseData.vorschlaege[0].finanzierungsVorschlagId);", - "})", - "", - "pm.test('Check if purchase price limit is desired and maximum purchase price is set', function () {", - " let responseData = pm.response.json();", - "", - " pm.expect(pm.collectionVariables.get(\"mode\")).to.eql('maximum-offer');", - " pm.expect(responseData.maximalKaufpreis).not.equal(null);", - "", - "})" - ], - "type": "text/javascript" - } - } - ], - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "content-type": true - }, - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - }, - { - "key": "Authorization", - "value": "Bearer {{ps_jwt_access_token}}", - "type": "text" - }, - { - "key": "User-Agent", - "value": "{{passt_user_agent}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "{{psUrlGateway}}v1/vorschlaege/{{anfrageId}}", - "host": [ - "{{psUrlGateway}}v1" - ], - "path": [ - "vorschlaege", - "{{anfrageId}}" - ] - }, - "description": "Holt die passenden Vorschlaege für die angegebene anfrageId" - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "anfrageId", - "value": "passende-vorschlaege-56199fa8-e0d0-489b-bc73-8960f4f82629", - "disabled": true - }, - { - "key": "anfrageId", - "value": "" - }, - { - "key": "vorgangId", - "value": "TESTID" - } - ] -} \ No newline at end of file