openapi: 3.2.0 info: title: Pagopa Activations 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 Activations 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: Activations paths: /activations/: post: operationId: getServiceActivationByPOST summary: Get a Service Activation for a User description: Returns the current Activation for a couple Service/User security: - SubscriptionKey: [] responses: '200': description: Found. content: application/json: schema: $ref: '#/components/schemas/Activation' example: serviceId: AAAAAAAAAAAAAAA fiscalCode: AAAAAA00B00C000D status: ACTIVE version: 1 '401': description: Unauthorized '403': description: Forbidden. '404': description: No user activation found for the provided fiscal code. content: application/json: schema: $ref: '#/components/schemas/ProblemJson' '429': description: Too many requests '500': description: Internal server error retrieving the Activation content: application/json: schema: $ref: '#/components/schemas/ProblemJson' requestBody: content: application/json: schema: $ref: '#/components/schemas/FiscalCodePayload' tags: - Activations put: operationId: upsertServiceActivation summary: Upsert a Service Activation for a User description: Create or update an Activation for a couple Service/User security: - SubscriptionKey: [] responses: '200': description: Found. content: application/json: schema: $ref: '#/components/schemas/Activation' example: serviceId: AAAAAAAAAAAAAAA fiscalCode: AAAAAA00B00C000D status: ACTIVE version: 1 '401': description: Unauthorized '403': description: Forbidden. '404': description: No user activation found for the provided fiscal code. content: application/json: schema: $ref: '#/components/schemas/ProblemJson' '429': description: Too many requests '500': description: The activation cannot be created or updated content: application/json: schema: $ref: '#/components/schemas/ProblemJson' requestBody: content: application/json: schema: $ref: '#/components/schemas/ActivationPayload' tags: - Activations servers: - url: https://api.io.pagopa.it/api/v1 components: schemas: ServiceId: type: string description: 'The ID of the Service. Equals the subscriptionId of a registered API user.' minLength: 1 FiscalCodePayload: type: object properties: fiscal_code: $ref: '#/components/schemas/FiscalCode' required: - fiscal_code ActivationPayload: type: object properties: fiscal_code: $ref: '#/components/schemas/FiscalCode' status: $ref: '#/components/schemas/ActivationStatus' required: - fiscal_code - status ActivationStatus: type: string x-extensible-enum: - ACTIVE - INACTIVE - PENDING FiscalCode: type: string description: User's fiscal code. format: FiscalCode x-import: '@pagopa/ts-commons/lib/strings' example: SPNDNL80R13C555X 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.' Activation: type: object properties: service_id: $ref: '#/components/schemas/ServiceId' fiscal_code: $ref: '#/components/schemas/FiscalCode' status: $ref: '#/components/schemas/ActivationStatus' version: type: integer minimum: 0 required: - service_id - fiscal_code - status - version 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