diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml
index edbdf30..882204d 100644
--- a/helm/values-dev.yaml
+++ b/helm/values-dev.yaml
@@ -2,12 +2,10 @@ microservice-chart:
namespace: "gps"
nameOverride: ""
fullnameOverride: ""
-
image:
repository: pagopadcommonacr.azurecr.io/pagopaspontaneouspayments
- tag: "latest" #improve
+ tag: "0.0.3-18" #improve
pullPolicy: Always
-
livenessProbe:
httpGet:
path: /actuator/health/liveness
@@ -15,7 +13,6 @@ microservice-chart:
initialDelaySeconds: 90
failureThreshold: 6
periodSeconds: 10
-
readinessProbe:
httpGet:
path: /actuator/health/readiness
@@ -23,34 +20,26 @@ microservice-chart:
initialDelaySeconds: 90
failureThreshold: 6
periodSeconds: 10
-
deployment:
create: true
-
service:
create: true
type: ClusterIP
port: 8080
-
ingress:
create: true
host: "weudev.gps.internal.dev.platform.pagopa.it"
path: /pagopa-spontaneous-payments-service/(.*)
-
serviceAccount:
create: false
annotations: {}
name: ""
-
podAnnotations: {}
-
podSecurityContext:
seccompProfile:
type: RuntimeDefault
-
securityContext:
allowPrivilegeEscalation: false
-
resources:
requests:
memory: "500Mi"
@@ -58,7 +47,6 @@ microservice-chart:
limits:
memory: "500Mi"
cpu: "350m"
-
autoscaling:
minReplica: 1
maxReplica: 2
@@ -77,7 +65,6 @@ microservice-chart:
# metricAggregationInterval: "-1:1:0"
metricAggregationType: Count
targetValue: "30"
-
envConfig:
COSMOS_URI: https://pagopa-d-weu-gps-cosmos-account.documents.azure.com:443/
COSMOS_DATABASE: "db"
@@ -95,17 +82,11 @@ microservice-chart:
RETRY_EXT_SERVICE_MAX_ATTEMPTS: "1"
RETRY_EXT_SERVICE_MAX_DELAY: "200"
LOGGING_LEVEL: "INFO"
-
envSecret:
COSMOS_KEY: cosmos-gps-weu-d-pkey
-
keyvault:
name: "pagopa-d-gps-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
-
nodeSelector: {}
-
tolerations: []
-
affinity: {}
-
diff --git a/openapi/openapi.json b/openapi/openapi.json
index efa979f..becd4bb 100644
--- a/openapi/openapi.json
+++ b/openapi/openapi.json
@@ -1,1758 +1,1758 @@
{
- "openapi": "3.0.1",
- "info": {
- "title": "PagoPA API Spontaneous Payment",
- "description": "Progetto Gestione Pagamenti Spontanei",
- "termsOfService": "https://www.pagopa.gov.it/",
- "version": "0.0.1"
- },
- "servers": [
- {
- "url": "http://localhost:9090",
- "description": "Generated server url"
- }
- ],
- "paths": {
- "/organizations/{organizationFiscalCode}": {
- "get": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "Return all enrollments for a creditor institution.",
- "operationId": "getECEnrollments",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Obtained all enrollments for the creditor institution.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationModelResponse"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the creditor institution.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
- },
- "put": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "The organization updates the creditor institution.",
- "operationId": "updateEC",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationModel"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "Request updated.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationModelResponse"
- }
- }
- }
- },
- "400": {
- "description": "Malformed request.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the creditor institution.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "openapi": "3.0.1",
+ "info": {
+ "title": "PagoPA API Spontaneous Payment",
+ "description": "Progetto Gestione Pagamenti Spontanei",
+ "termsOfService": "https://www.pagopa.gov.it/",
+ "version": "0.0.3-18"
+ },
+ "servers": [
+ {
+ "url": "http://localhost:9090",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/organizations/{organizationFiscalCode}": {
+ "get": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "Return all enrollments for a creditor institution.",
+ "operationId": "getECEnrollments",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Obtained all enrollments for the creditor institution.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "post": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "The organization creates a creditor institution with possible enrollments to services.",
- "operationId": "createEC",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationEnrollmentModel"
- }
- }
- },
- "required": true
- },
- "responses": {
- "201": {
- "description": "Request created.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationModelResponse"
- }
- }
- }
- },
- "400": {
- "description": "Malformed request.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "409": {
- "description": "The organization to create already exists.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationModelResponse"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the creditor institution.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "delete": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "The organization deletes the creditor institution.",
- "operationId": "deleteEC",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Request deleted.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the creditor institution.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "parameters": [
- {
- "name": "X-Request-Id",
- "in": "header",
- "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
- ]
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "put": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "The organization updates the creditor institution.",
+ "operationId": "updateEC",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationModel"
+ }
+ }
+ },
+ "required": true
},
- "/organizations/{organizationFiscalCode}/services/{serviceId}": {
- "get": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "Return the single enrollment to a service.",
- "operationId": "getSingleEnrollment",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "serviceId",
- "in": "path",
- "description": "The service id to enroll.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Obtained single enrollment.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/EnrollmentModelResponse"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the enroll service.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "responses": {
+ "200": {
+ "description": "Request updated.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "put": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "The organization update an enrollment to a service for the creditor institution.",
- "operationId": "updateECEnrollment",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "serviceId",
- "in": "path",
- "description": "The service id to enroll.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/EnrollmentModel"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "Request updated.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationModelResponse"
- }
- }
- }
- },
- "400": {
- "description": "Malformed request.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the creditor institution or the enroll service.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationModelResponse"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Malformed request.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "post": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "The organization creates an enrollment to a service for the creditor institution.",
- "operationId": "createECEnrollment",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "serviceId",
- "in": "path",
- "description": "The service id to enroll.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/EnrollmentModel"
- }
- }
- },
- "required": true
- },
- "responses": {
- "201": {
- "description": "Request created.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrganizationModelResponse"
- }
- }
- }
- },
- "400": {
- "description": "Malformed request.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the creditor institution or the enroll service.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "409": {
- "description": "The enrollment to the service already exists.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the creditor institution.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "delete": {
- "tags": [
- "Enrollments API"
- ],
- "summary": "The organization deletes the enrollment to service for the creditor institution.",
- "operationId": "deleteECEnrollment",
- "parameters": [
- {
- "name": "organizationFiscalCode",
- "in": "path",
- "description": "The fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "serviceId",
- "in": "path",
- "description": "The service id to enroll.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Request deleted.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Not found the creditor institution or the enroll service.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "parameters": [
- {
- "name": "X-Request-Id",
- "in": "header",
- "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
- ]
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "post": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "The organization creates a creditor institution with possible enrollments to services.",
+ "operationId": "createEC",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationEnrollmentModel"
+ }
+ }
+ },
+ "required": true
},
- "/organizations/{organizationfiscalcode}/spontaneouspayments": {
- "post": {
- "tags": [
- "Payments API"
- ],
- "summary": "The Organization creates a spontaneous payment.",
- "operationId": "createSpontaneousPayment",
- "parameters": [
- {
- "name": "organizationfiscalcode",
- "in": "path",
- "description": "Organization fiscal code, the fiscal code of the Organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SpontaneousPaymentModel"
- }
- }
- },
- "required": true
- },
- "responses": {
- "201": {
- "description": "Request created.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/PaymentPositionModel"
- }
- }
- }
- },
- "400": {
- "description": "Malformed request.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "409": {
- "description": "Conflict: duplicate debt position found.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "responses": {
+ "201": {
+ "description": "Request created.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "parameters": [
- {
- "name": "X-Request-Id",
- "in": "header",
- "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationModelResponse"
}
- ]
- },
- "/services": {
- "get": {
- "tags": [
- "Services API"
- ],
- "summary": "Return all services.",
- "operationId": "getServices",
- "responses": {
- "200": {
- "description": "Obtained all services.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ServiceModelResponse"
- }
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ }
+ }
+ },
+ "400": {
+ "description": "Malformed request.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "parameters": [
- {
- "name": "X-Request-Id",
- "in": "header",
- "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
- ]
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "The organization to create already exists.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ }
},
- "/services/{serviceId}": {
- "get": {
- "tags": [
- "Services API"
- ],
- "summary": "Return the single service details.",
- "operationId": "getServiceDetails",
- "parameters": [
- {
- "name": "serviceId",
- "in": "path",
- "description": "The service id for which to have the details.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Obtained single service details.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ServiceDetailModelResponse"
- }
- }
- }
- },
- "401": {
- "description": "Wrong or missing function key.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "No service found.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- },
- "500": {
- "description": "Service unavailable.",
- "headers": {
- "X-Request-Id": {
- "description": "This header identifies the call",
- "schema": {
- "type": "string"
- }
- }
- },
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemJson"
- }
- }
- }
- }
- },
- "security": [
- {
- "ApiKey": []
- },
- {
- "Authorization": []
- }
- ]
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "delete": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "The organization deletes the creditor institution.",
+ "operationId": "deleteEC",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Request deleted.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "parameters": [
- {
- "name": "X-Request-Id",
- "in": "header",
- "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string"
}
- ]
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the creditor institution.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "X-Request-Id",
+ "in": "header",
+ "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
+ "schema": {
+ "type": "string"
+ }
}
+ ]
},
- "components": {
- "schemas": {
- "OrganizationModel": {
- "type": "object",
- "properties": {
- "companyName": {
- "type": "string"
- },
- "status": {
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- }
+ "/organizations/{organizationFiscalCode}/services/{serviceId}": {
+ "get": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "Return the single enrollment to a service.",
+ "operationId": "getSingleEnrollment",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "serviceId",
+ "in": "path",
+ "description": "The service id to enroll.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Obtained single enrollment.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EnrollmentModelResponse"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the enroll service.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
},
- "ProblemJson": {
- "type": "object",
- "properties": {
- "title": {
- "type": "string",
- "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable"
- },
- "status": {
- "maximum": 600,
- "minimum": 100,
- "type": "integer",
- "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
- "format": "int32",
- "example": 200
- },
- "detail": {
- "type": "string",
- "description": "A human readable explanation specific to this occurrence of the problem.",
- "example": "There was an error processing the request"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "put": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "The organization update an enrollment to a service for the creditor institution.",
+ "operationId": "updateECEnrollment",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "serviceId",
+ "in": "path",
+ "description": "The service id to enroll.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EnrollmentModel"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Request updated.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationModelResponse"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Malformed request.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "EnrollmentModelResponse": {
- "required": [
- "iban",
- "serviceId"
- ],
- "type": "object",
- "properties": {
- "serviceId": {
- "type": "string"
- },
- "iban": {
- "type": "string"
- },
- "officeName": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the creditor institution or the enroll service.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "post": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "The organization creates an enrollment to a service for the creditor institution.",
+ "operationId": "createECEnrollment",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "serviceId",
+ "in": "path",
+ "description": "The service id to enroll.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EnrollmentModel"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "201": {
+ "description": "Request created.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
},
- "OrganizationModelResponse": {
- "required": [
- "companyName",
- "fiscalCode",
- "status"
- ],
- "type": "object",
- "properties": {
- "fiscalCode": {
- "type": "string"
- },
- "companyName": {
- "type": "string"
- },
- "status": {
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "enrollments": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/EnrollmentModelResponse"
- }
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationModelResponse"
}
+ }
+ }
+ },
+ "400": {
+ "description": "Malformed request.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "EnrollmentModel": {
- "type": "object",
- "properties": {
- "iban": {
- "type": "string"
- },
- "officeName": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the creditor institution or the enroll service.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "DebtorModel": {
- "required": [
- "fiscalCode",
- "fullName",
- "type"
- ],
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "F",
- "G"
- ]
- },
- "fiscalCode": {
- "type": "string"
- },
- "fullName": {
- "type": "string"
- },
- "streetName": {
- "type": "string"
- },
- "civicNumber": {
- "type": "string"
- },
- "postalCode": {
- "type": "string"
- },
- "city": {
- "type": "string"
- },
- "province": {
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "country": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "phone": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "The enrollment to the service already exists.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
},
- "ServiceModel": {
- "required": [
- "id",
- "properties"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "properties": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ServicePropertyModel"
- }
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
},
- "ServicePropertyModel": {
- "required": [
- "name"
- ],
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "delete": {
+ "tags": [
+ "Enrollments API"
+ ],
+ "summary": "The organization deletes the enrollment to service for the creditor institution.",
+ "operationId": "deleteECEnrollment",
+ "parameters": [
+ {
+ "name": "organizationFiscalCode",
+ "in": "path",
+ "description": "The fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "serviceId",
+ "in": "path",
+ "description": "The service id to enroll.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Request deleted.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "SpontaneousPaymentModel": {
- "required": [
- "debtor",
- "service"
- ],
- "type": "object",
- "properties": {
- "debtor": {
- "$ref": "#/components/schemas/DebtorModel"
- },
- "service": {
- "$ref": "#/components/schemas/ServiceModel"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
+ }
+ },
+ "404": {
+ "description": "Not found the creditor institution or the enroll service.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "PaymentOptionModel": {
- "required": [
- "amount",
- "dueDate",
- "isPartialPayment",
- "iuv"
- ],
- "type": "object",
- "properties": {
- "iuv": {
- "type": "string"
- },
- "amount": {
- "type": "integer",
- "format": "int64"
- },
- "description": {
- "type": "string"
- },
- "isPartialPayment": {
- "type": "boolean"
- },
- "dueDate": {
- "type": "string",
- "format": "date-time"
- },
- "retentionDate": {
- "type": "string",
- "format": "date-time"
- },
- "fee": {
- "type": "integer",
- "format": "int64"
- },
- "transfer": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/TransferModel"
- }
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
},
- "PaymentPositionModel": {
- "required": [
- "companyName",
- "fiscalCode",
- "fullName",
- "iupd",
- "type"
- ],
- "type": "object",
- "properties": {
- "iupd": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": [
- "F",
- "G"
- ]
- },
- "fiscalCode": {
- "type": "string"
- },
- "fullName": {
- "type": "string"
- },
- "streetName": {
- "type": "string"
- },
- "civicNumber": {
- "type": "string"
- },
- "postalCode": {
- "type": "string"
- },
- "city": {
- "type": "string"
- },
- "province": {
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "country": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "phone": {
- "type": "string"
- },
- "switchToExpired": {
- "type": "boolean",
- "description": "feature flag to enable the debt position to expire after the due date",
- "example": false,
- "default": false
- },
- "companyName": {
- "type": "string"
- },
- "officeName": {
- "type": "string"
- },
- "validityDate": {
- "type": "string",
- "format": "date-time"
- },
- "status": {
- "type": "string",
- "readOnly": true,
- "enum": [
- "DRAFT",
- "PUBLISHED",
- "VALID",
- "INVALID",
- "EXPIRED",
- "PARTIALLY_PAID",
- "PAID",
- "REPORTED"
- ]
- },
- "paymentOption": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/PaymentOptionModel"
- }
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "X-Request-Id",
+ "in": "header",
+ "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ "/organizations/{organizationfiscalcode}/spontaneouspayments": {
+ "post": {
+ "tags": [
+ "Payments API"
+ ],
+ "summary": "The Organization creates a spontaneous payment.",
+ "operationId": "createSpontaneousPayment",
+ "parameters": [
+ {
+ "name": "organizationfiscalcode",
+ "in": "path",
+ "description": "Organization fiscal code, the fiscal code of the Organization.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SpontaneousPaymentModel"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "201": {
+ "description": "Request created.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "TransferModel": {
- "required": [
- "amount",
- "category",
- "iban",
- "idTransfer",
- "remittanceInformation"
- ],
- "type": "object",
- "properties": {
- "idTransfer": {
- "type": "string",
- "enum": [
- "1",
- "2",
- "3",
- "4",
- "5"
- ]
- },
- "amount": {
- "type": "integer",
- "format": "int64"
- },
- "remittanceInformation": {
- "type": "string"
- },
- "category": {
- "type": "string"
- },
- "iban": {
- "type": "string"
- },
- "postalIban": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PaymentPositionModel"
}
+ }
+ }
+ },
+ "400": {
+ "description": "Malformed request.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "CreateEnrollmentModel": {
- "required": [
- "iban",
- "serviceId"
- ],
- "type": "object",
- "properties": {
- "serviceId": {
- "type": "string"
- },
- "iban": {
- "type": "string"
- },
- "officeName": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "Conflict: duplicate debt position found.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
},
- "OrganizationEnrollmentModel": {
- "required": [
- "companyName"
- ],
- "type": "object",
- "properties": {
- "companyName": {
- "type": "string"
- },
- "enrollments": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/CreateEnrollmentModel"
- }
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "ServiceModelResponse": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "X-Request-Id",
+ "in": "header",
+ "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ "/services": {
+ "get": {
+ "tags": [
+ "Services API"
+ ],
+ "summary": "Return all services.",
+ "operationId": "getServices",
+ "responses": {
+ "200": {
+ "description": "Obtained all services.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "ServiceDetailModelResponse": {
- "required": [
- "id",
- "remittanceInformation",
- "status",
- "transferCategory"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "transferCategory": {
- "type": "string"
- },
- "remittanceInformation": {
- "type": "string"
- },
- "status": {
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "properties": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ServicePropertyModelResponse"
- }
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ServiceModelResponse"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
}
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "ServicePropertyModelResponse": {
- "required": [
- "name"
- ],
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "required": {
- "type": "boolean"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
}
+ }
}
+ }
},
- "securitySchemes": {
- "ApiKey": {
- "type": "apiKey",
- "description": "The API key to access this function app.",
- "name": "Ocp-Apim-Subscription-Key",
- "in": "header"
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "X-Request-Id",
+ "in": "header",
+ "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ "/services/{serviceId}": {
+ "get": {
+ "tags": [
+ "Services API"
+ ],
+ "summary": "Return the single service details.",
+ "operationId": "getServiceDetails",
+ "parameters": [
+ {
+ "name": "serviceId",
+ "in": "path",
+ "description": "The service id for which to have the details.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Obtained single service details.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ServiceDetailModelResponse"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Wrong or missing function key.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "No service found.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "Authorization": {
- "type": "http",
- "description": "JWT token get after Azure Login",
- "scheme": "bearer",
- "bearerFormat": "JWT"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Service unavailable.",
+ "headers": {
+ "X-Request-Id": {
+ "description": "This header identifies the call",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemJson"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "ApiKey": []
+ },
+ {
+ "Authorization": []
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "X-Request-Id",
+ "in": "header",
+ "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ },
+ "components": {
+ "schemas": {
+ "OrganizationModel": {
+ "type": "object",
+ "properties": {
+ "companyName": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ }
+ }
+ },
+ "ProblemJson": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable"
+ },
+ "status": {
+ "maximum": 600,
+ "minimum": 100,
+ "type": "integer",
+ "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
+ "format": "int32",
+ "example": 200
+ },
+ "detail": {
+ "type": "string",
+ "description": "A human readable explanation specific to this occurrence of the problem.",
+ "example": "There was an error processing the request"
+ }
+ }
+ },
+ "EnrollmentModelResponse": {
+ "required": [
+ "iban",
+ "serviceId"
+ ],
+ "type": "object",
+ "properties": {
+ "serviceId": {
+ "type": "string"
+ },
+ "iban": {
+ "type": "string"
+ },
+ "officeName": {
+ "type": "string"
+ }
+ }
+ },
+ "OrganizationModelResponse": {
+ "required": [
+ "companyName",
+ "fiscalCode",
+ "status"
+ ],
+ "type": "object",
+ "properties": {
+ "fiscalCode": {
+ "type": "string"
+ },
+ "companyName": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ },
+ "enrollments": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/EnrollmentModelResponse"
+ }
+ }
+ }
+ },
+ "EnrollmentModel": {
+ "type": "object",
+ "properties": {
+ "iban": {
+ "type": "string"
+ },
+ "officeName": {
+ "type": "string"
+ }
+ }
+ },
+ "DebtorModel": {
+ "required": [
+ "fiscalCode",
+ "fullName",
+ "type"
+ ],
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "F",
+ "G"
+ ]
+ },
+ "fiscalCode": {
+ "type": "string"
+ },
+ "fullName": {
+ "type": "string"
+ },
+ "streetName": {
+ "type": "string"
+ },
+ "civicNumber": {
+ "type": "string"
+ },
+ "postalCode": {
+ "type": "string"
+ },
+ "city": {
+ "type": "string"
+ },
+ "province": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "country": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ }
+ }
+ },
+ "ServiceModel": {
+ "required": [
+ "id",
+ "properties"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "properties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ServicePropertyModel"
+ }
+ }
+ }
+ },
+ "ServicePropertyModel": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "SpontaneousPaymentModel": {
+ "required": [
+ "debtor",
+ "service"
+ ],
+ "type": "object",
+ "properties": {
+ "debtor": {
+ "$ref": "#/components/schemas/DebtorModel"
+ },
+ "service": {
+ "$ref": "#/components/schemas/ServiceModel"
+ }
+ }
+ },
+ "PaymentOptionModel": {
+ "required": [
+ "amount",
+ "dueDate",
+ "isPartialPayment",
+ "iuv"
+ ],
+ "type": "object",
+ "properties": {
+ "iuv": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "description": {
+ "type": "string"
+ },
+ "isPartialPayment": {
+ "type": "boolean"
+ },
+ "dueDate": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "retentionDate": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "fee": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "transfer": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TransferModel"
+ }
+ }
+ }
+ },
+ "PaymentPositionModel": {
+ "required": [
+ "companyName",
+ "fiscalCode",
+ "fullName",
+ "iupd",
+ "type"
+ ],
+ "type": "object",
+ "properties": {
+ "iupd": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "F",
+ "G"
+ ]
+ },
+ "fiscalCode": {
+ "type": "string"
+ },
+ "fullName": {
+ "type": "string"
+ },
+ "streetName": {
+ "type": "string"
+ },
+ "civicNumber": {
+ "type": "string"
+ },
+ "postalCode": {
+ "type": "string"
+ },
+ "city": {
+ "type": "string"
+ },
+ "province": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "country": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "switchToExpired": {
+ "type": "boolean",
+ "description": "feature flag to enable the debt position to expire after the due date",
+ "example": false,
+ "default": false
+ },
+ "companyName": {
+ "type": "string"
+ },
+ "officeName": {
+ "type": "string"
+ },
+ "validityDate": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "status": {
+ "type": "string",
+ "readOnly": true,
+ "enum": [
+ "DRAFT",
+ "PUBLISHED",
+ "VALID",
+ "INVALID",
+ "EXPIRED",
+ "PARTIALLY_PAID",
+ "PAID",
+ "REPORTED"
+ ]
+ },
+ "paymentOption": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PaymentOptionModel"
+ }
+ }
+ }
+ },
+ "TransferModel": {
+ "required": [
+ "amount",
+ "category",
+ "iban",
+ "idTransfer",
+ "remittanceInformation"
+ ],
+ "type": "object",
+ "properties": {
+ "idTransfer": {
+ "type": "string",
+ "enum": [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ]
+ },
+ "amount": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "remittanceInformation": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
+ "iban": {
+ "type": "string"
+ },
+ "postalIban": {
+ "type": "string"
+ }
+ }
+ },
+ "CreateEnrollmentModel": {
+ "required": [
+ "iban",
+ "serviceId"
+ ],
+ "type": "object",
+ "properties": {
+ "serviceId": {
+ "type": "string"
+ },
+ "iban": {
+ "type": "string"
+ },
+ "officeName": {
+ "type": "string"
+ }
+ }
+ },
+ "OrganizationEnrollmentModel": {
+ "required": [
+ "companyName"
+ ],
+ "type": "object",
+ "properties": {
+ "companyName": {
+ "type": "string"
+ },
+ "enrollments": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/CreateEnrollmentModel"
}
+ }
}
+ },
+ "ServiceModelResponse": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ }
+ },
+ "ServiceDetailModelResponse": {
+ "required": [
+ "id",
+ "remittanceInformation",
+ "status",
+ "transferCategory"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "transferCategory": {
+ "type": "string"
+ },
+ "remittanceInformation": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ },
+ "properties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ServicePropertyModelResponse"
+ }
+ }
+ }
+ },
+ "ServicePropertyModelResponse": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "required": {
+ "type": "boolean"
+ }
+ }
+ }
+ },
+ "securitySchemes": {
+ "ApiKey": {
+ "type": "apiKey",
+ "description": "The API key to access this function app.",
+ "name": "Ocp-Apim-Subscription-Key",
+ "in": "header"
+ },
+ "Authorization": {
+ "type": "http",
+ "description": "JWT token get after Azure Login",
+ "scheme": "bearer",
+ "bearerFormat": "JWT"
+ }
}
+ }
}
diff --git a/pom.xml b/pom.xml
index 6ec3d61..ae24ff1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
it.gov.pagopa
spontaneouspayment
- 0.0.3-17
+ 0.0.3-18
Gestione Pagamenti Spontanei
Progetto Gestione Pagamenti Spontanei