openapi: 3.2.0 info: title: Pagopa Utility API version: 1.2.1 description: 'Operations tagged Utility across 2 of this provider''s published API definitions: io-sign-issuer.yaml, pagopa-firma-con-io-issuer-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.io.pagopa.it/api/v1/sign description: production - url: http://localhost:7071/api/v1/sign description: local security: - SubscriptionKey: [] tags: - name: Utility paths: /validate-document: post: operationId: validateDocument tags: - Utility summary: Validate a PDF document against a list of signature fields requestBody: content: multipart/form-data: schema: type: object properties: document: type: string format: binary signature_fields: type: array items: $ref: '#/components/schemas/SignatureField' required: - document encoding: document: contentType: application/pdf responses: '200': description: the validation result content: application/json: schema: $ref: '#/components/schemas/DocumentValidationResult' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '429': $ref: '#/components/responses/TooManyRequests' default: $ref: '#/components/responses/Unexpected' servers: - url: https://api.io.pagopa.it/api/v1/sign description: production - url: http://localhost:7071/api/v1/sign description: local components: schemas: ProblemDetail: 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. SignatureFieldToBeCreatedAttrs: type: object properties: coordinates: type: object properties: x: type: number y: type: number required: - x - y page: type: number minimum: 0 size: type: object properties: w: type: number minimum: 0 h: type: number minimum: 0 required: - w - h required: - coordinates - page - size Clause: type: object properties: title: type: string minLength: 5 maxLength: 80 type: type: string enum: - REQUIRED - UNFAIR - OPTIONAL required: - title - type DocumentValidationResult: type: object properties: is_valid: type: boolean violations: type: array items: type: string required: - is_valid SignatureFieldAttrs: oneOf: - $ref: '#/components/schemas/ExistingSignatureFieldAttrs' - $ref: '#/components/schemas/SignatureFieldToBeCreatedAttrs' ExistingSignatureFieldAttrs: type: object properties: unique_name: type: string required: - unique_name SignatureField: type: object properties: attrs: $ref: '#/components/schemas/SignatureFieldAttrs' clause: $ref: '#/components/schemas/Clause' required: - attrs - clause responses: Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ProblemDetail' Unexpected: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/ProblemDetail' Forbidden: description: You don't have enough privileges to perform this action content: application/json: schema: $ref: '#/components/schemas/ProblemDetail' BadRequest: description: Validation error on body content: application/json: schema: $ref: '#/components/schemas/ProblemDetail' TooManyRequests: description: Too Many Requests content: application/json: schema: $ref: '#/components/schemas/ProblemDetail' securitySchemes: SubscriptionKey: type: apiKey name: Ocp-Apim-Subscription-Key in: header description: The API key can be obtained from the reserved area x-refined-from: - io-sign-issuer.yaml - pagopa-firma-con-io-issuer-openapi.yml