openapi: 3.2.0
info:
title: Pagopa Manage API
version: 4.1.1
contact:
name: PagoPA S.p.A.
url: https://docs.pagopa.it/io-guida-tecnica/
x-logo:
url: https://io.italia.it/assets/img/io-logo-blue.svg
description: 'Operations tagged manage across 2 of this provider''s published API definitions: io-functions-services.yaml, pagopa-io-services-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.io.pagopa.it/api/v1
tags:
- name: Manage
paths:
/manage/services:
post:
tags:
- Manage
summary: Create a new service
description: Create a new Service with the attributes provided in the request payload
operationId: cmsCreateService
security:
- ManageSubscriptionKey: []
responses:
'201':
description: Service created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServiceLifecycle'
'400':
description: Invalid payload.
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'401':
description: Unauthorized
'403':
description: Forbidden
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServicePayload'
description: A service body payload
required: true
get:
tags:
- Manage
summary: Retrieve all services
description: Retrieve all services owned by the calling user
operationId: cmsGetServices
security:
- ManageSubscriptionKey: []
parameters:
- name: limit
in: query
description: The number of services to return
required: false
schema:
type: integer
default: 20
maximum: 100
minimum: 1
- name: offset
in: query
description: The number of services to skip before starting to collect the result set
required: false
schema:
type: integer
default: 0
minimum: 0
responses:
'200':
description: Services fetched successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServicePagination'
'401':
description: Unauthorized
'403':
description: Forbidden
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
servers:
- url: https://api.io.pagopa.it/api/v1
/manage/services/{serviceId}:
get:
tags:
- Manage
summary: Retrieve service
description: Retrieve a service by ID
operationId: cmsGetService
security:
- ManageSubscriptionKey: []
parameters:
- name: serviceId
in: path
description: ID of the service
required: true
schema:
type: string
responses:
'200':
description: Service fetched successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServiceLifecycle'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not found
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
put:
tags:
- Manage
summary: Update service
description: Update an existing service by ID
operationId: cmsUpdateService
security:
- ManageSubscriptionKey: []
parameters:
- name: serviceId
in: path
description: ID of the service
required: true
schema:
type: string
responses:
'200':
description: Service updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServiceLifecycle'
'400':
description: Invalid payload.
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not found
'409':
description: Service status is incompatible with update action
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServicePayload'
description: Updated service payload
required: true
delete:
tags:
- Manage
summary: Delete service
description: Delete a service by ID
operationId: cmsDeleteService
security:
- ManageSubscriptionKey: []
parameters:
- name: serviceId
in: path
description: ID of the service
required: true
schema:
type: string
responses:
'204':
description: Service deleted successfully
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not found
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
servers:
- url: https://api.io.pagopa.it/api/v1
/manage/services/{serviceId}/logo:
put:
tags:
- Manage
summary: Upload service logo
description: Upload service logo by service ID
operationId: cmsUpdateServiceLogo
security:
- ManageSubscriptionKey: []
parameters:
- name: serviceId
in: path
description: ID of the service
required: true
schema:
type: string
responses:
'204':
description: Service logo updated successfully
'400':
description: Invalid payload.
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not found
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Logo'
description: Updated service payload
required: true
servers:
- url: https://api.io.pagopa.it/api/v1
/manage/services/{serviceId}/history:
get:
tags:
- Manage
summary: Retrieve service history
description: Retrieve service history by service ID
operationId: cmsGetServiceHistory
parameters:
- name: serviceId
in: path
description: ID of the service
required: true
schema:
type: string
- name: order
in: query
description: Order direction
required: false
schema:
type: string
enum:
- ASC
- DESC
default: DESC
- name: limit
in: query
description: The number of services to return
required: false
schema:
type: integer
default: 10
maximum: 100
minimum: 1
- name: continuationToken
in: query
description: Token to retrieve the next page of results
required: false
schema:
type: string
responses:
'200':
description: Service history retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CmsServiceHistory'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not found
'429':
description: Too many requests
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
servers:
- url: https://api.io.pagopa.it/api/v1
components:
schemas:
CmsServiceData:
type: object
description: Service basic data
properties:
name:
type: string
minLength: 1
description:
type: string
minLength: 1
organization:
$ref: '#/components/schemas/CmsOrganization'
require_secure_channel:
type: boolean
authorized_recipients:
type: array
items:
$ref: '#/components/schemas/FiscalCode'
authorized_cidrs:
description: 'Allowed source IPs or CIDRs for this service.
When empty, every IP address it''s authorized to call the IO API on behalf of the service.'
type: array
items:
$ref: '#/components/schemas/CIDR'
max_allowed_payment_amount:
type: integer
format: int32
minimum: 0
maximum: 9999999999
default: 0
required:
- name
- description
- organization
CmsPaginationResultSet:
type: object
properties:
offset:
type: number
description: result set offset
limit:
type: number
description: result set size
count:
type: number
description: total record count
CmsServicePagination:
type: object
properties:
value:
type: array
items:
$ref: '#/components/schemas/CmsServiceLifecycle'
pagination:
$ref: '#/components/schemas/CmsPaginationResultSet'
CmsServiceHistoryStatusKind:
description: 'Status kind for Service History
- publication: Indicates the status is related to a service-publication event
- lifecycle: Indicates the status is related to a service-lifecycle event
'
type: string
enum:
- publication
- lifecycle
CmsServiceHistoryItem:
description: Service History model data
allOf:
- type: object
properties:
id:
type: string
status:
$ref: '#/components/schemas/CmsServiceHistoryItemStatus'
last_update:
$ref: '#/components/schemas/Timestamp'
metadata:
$ref: '#/components/schemas/CmsServiceMetadata'
required:
- id
- status
- last_update
- metadata
- $ref: '#/components/schemas/CmsServiceData'
CmsServiceLifecycle:
description: Service Lifecycle model data
allOf:
- type: object
properties:
id:
type: string
status:
$ref: '#/components/schemas/CmsServiceLifecycleStatus'
last_update:
$ref: '#/components/schemas/Timestamp'
metadata:
$ref: '#/components/schemas/CmsServiceMetadata'
- $ref: '#/components/schemas/CmsServiceData'
required:
- id
- status
- last_update
CmsServiceMetadata:
description: A set of service metadata properties
allOf:
- $ref: '#/components/schemas/CmsServiceBaseMetadata'
- type: object
properties:
topic:
$ref: '#/components/schemas/CmsServiceTopic'
CIDR:
type: string
description: Describes a single IP or a range of IPs.
pattern: ^([0-9]{1,3}[.]){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$
CmsServiceHistoryItemStatus:
type: object
properties:
kind:
$ref: '#/components/schemas/CmsServiceHistoryStatusKind'
value:
$ref: '#/components/schemas/CmsServiceHistoryStatusType'
reason:
description: Reason for status value
type: string
required:
- value
Logo:
type: object
properties:
logo:
type: string
format: byte
minLength: 1
required:
- logo
CmsServicePayload:
description: A payload used to create or update a service.
allOf:
- type: object
properties:
metadata:
$ref: '#/components/schemas/CmsServicePayloadMetadata'
required:
- metadata
- $ref: '#/components/schemas/CmsServiceData'
ProblemJson:
type: object
properties:
type:
type: string
format: uri
description: 'An absolute URI that identifies the problem type. When dereferenced,
it SHOULD provide human-readable documentation for the problem type
(e.g., using HTML).'
default: about:blank
example: https://example.com/problem/constraint-violation
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:
type: integer
format: int32
description: The HTTP status code generated by the origin server for this occurrence of the problem.
minimum: 100
example: 200
exclusiveMaximum: 600
detail:
type: string
description: 'A human readable explanation specific to this occurrence of the
problem.'
example: There was an error processing the request
instance:
type: string
format: uri
description: 'An absolute URI that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.'
CmsServiceTopic:
type: object
properties:
id:
type: number
description: The topic id
example: 3
name:
type: string
description: The topic name
example: Benessere sociale
required:
- id
- name
CmsServiceHistory:
type: object
description: Service basic data
properties:
continuationToken:
type: string
description: Continuation token for pagination
items:
type: array
items:
$ref: '#/components/schemas/CmsServiceHistoryItem'
CmsServiceHistoryStatusType:
description: 'A Service History record contains either publication or lifecycle items, so can have a combination of Service lifecycle status and publication status
'
type: string
enum:
- draft
- submitted
- approved
- rejected
- deleted
- published
- unpublished
Timestamp:
type: string
format: UTCISODateFromString
description: A date-time field in ISO-8601 format and UTC timezone.
x-import: '@pagopa/ts-commons/lib/dates'
example: '2018-10-13T00:00:00.000Z'
CmsServicePayloadMetadata:
description: A set of service metadata properties on request payload
allOf:
- $ref: '#/components/schemas/CmsServiceBaseMetadata'
- type: object
properties:
topic_id:
type: number
description: The topic id
example: 3
required:
- topic_id
CmsOrganization:
type: object
properties:
name:
type: string
minLength: 1
fiscal_code:
$ref: '#/components/schemas/OrganizationFiscalCode'
department_name:
type: string
minLength: 1
required:
- name
- fiscal_code
OrganizationFiscalCode:
type: string
description: Organization fiscal code.
format: OrganizationFiscalCode
x-import: '@pagopa/ts-commons/lib/strings'
example: '12345678901'
CmsServiceLifecycleStatus:
type: object
properties:
value:
$ref: '#/components/schemas/CmsServiceLifecycleStatusType'
reason:
description: Reason for status value
type: string
required:
- value
FiscalCode:
type: string
description: User's fiscal code.
format: FiscalCode
x-import: '@pagopa/ts-commons/lib/strings'
example: SPNDNL80R13C555X
CmsServiceBaseMetadata:
type: object
description: A set of service metadata properties
properties:
web_url:
type: string
minLength: 1
app_ios:
type: string
minLength: 1
app_android:
type: string
minLength: 1
tos_url:
type: string
minLength: 1
privacy_url:
type: string
minLength: 1
address:
type: string
minLength: 1
phone:
type: string
minLength: 1
email:
type: string
minLength: 1
pec:
type: string
minLength: 1
cta:
type: string
minLength: 1
token_name:
type: string
minLength: 1
description: This field is deprecated and it will be removed soon. See https://developer.pagopa.it/app-io/guides/io-guida-tecnica/funzionalita/pubblicare-un-servizio/dati-obbligatori/service-metadata#token_name for more details on the removal date
support_url:
type: string
minLength: 1
scope:
type: string
enum:
- LOCAL
- NATIONAL
required:
- scope
CmsServiceLifecycleStatusType:
description: 'Service lifecycle status
- _draft_: A new draft of the service has been created, filled in completely or partially and saved by the system.
- _submitted_: The draft has been sent for internal validation to PagoPA and the response is awaited. In this state, the service is
immutable and is frozen in the shipped version.
- _approved_: The service has been approved by the _PagoPA S.p.A._ internal validation process, it is correct and suitable for publication.
- _rejected_: The service goes back to the draft but cannot be resubmitted for validation unless it is modified by the institution in
at least one of its fields.
- _deleted_: The service is permanently deleted from the Back-Office.
'
type: string
enum:
- draft
- submitted
- approved
- rejected
- deleted
securitySchemes:
SubscriptionKey:
type: apiKey
name: Ocp-Apim-Subscription-Key
in: header
description: The API key obtained through the Backoffice IO or both getService or cmsGetServiceKeys operation.
ManageSubscriptionKey:
type: apiKey
name: Ocp-Apim-Subscription-Key
in: header
description: The `manage` API key obtained through the Backoffice IO.
x-refined-from:
- io-functions-services.yaml
- pagopa-io-services-openapi.yml