> ## Documentation Index
> Fetch the complete documentation index at: https://trustos.telefonicatech.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Download Signature

> Retrieves the qualified signature of a previously signed certificate.



## OpenAPI

````yaml get /certificates/{type}/{id}/signature
openapi: 3.0.1
info:
  title: TrustOS EVM Cert API
  description: >-
    TrustOS EVM Cert API is used to interact with EVM based blockchain networks.
    In case you have some questions or need more about the use of this API,
    don't hesitate to contact B-Team:
  contact:
    name: Blockchain Team
    email: soporte-bteam@telefonica.com
  version: 2.6.0
servers:
  - url: https://lab.trustos.telefonicatech.com/cert/v2
    description: Lab
security: []
tags:
  - name: Certificate Generation
    description: Methods for generating certificates.
  - name: Certificate Management
    description: Basic methods about certificates.
  - name: Qualified Signature
    description: Methods for generating qualified signatures.
  - name: Utils
    description: Methods for specific use cases.
paths:
  /certificates/{type}/{id}/signature:
    get:
      tags:
        - Qualified Signature
      summary: Qualified sign a TrustOS certificate.
      parameters:
        - name: type
          in: path
          description: Type of the certificate identifier.
          required: true
          schema:
            type: string
            enum:
              - certID
              - externalId
              - fileHash
              - hash
        - name: id
          in: path
          description: Identifier of the certificate.
          required: true
          schema:
            type: string
            example: 1
        - name: pin
          in: query
          description: PIN of the certificate (if the certificate is private).
          required: false
          schema:
            type: string
            example: '1234'
      responses:
        '200':
          $ref: '#/components/responses/200-CertificateSignatureDownload'
        '401':
          $ref: '#/components/responses/401-AuthenticationError'
        '403':
          $ref: '#/components/responses/403-ForbiddenError'
        '404':
          $ref: '#/components/responses/404-NotFoundError'
        '422':
          $ref: '#/components/responses/422-UnsignedCertificateError'
        '500':
          $ref: '#/components/responses/500-InternalServerError'
      security:
        - bearerAuth: []
components:
  responses:
    200-CertificateSignatureDownload:
      description: Successful certificate signature retrieval.
      content:
        application/xml:
          schema:
            type: string
            description: XML file with the qualified certificate signature.
            example: >-
              <?xml version="1.0" encoding="UTF-8" standalone="no"?> <root>
              <badge> <name>Certificate</name> <description>Certificate
              description</description> <content> <key>val1213ue</key>
              </content> </badge> <issuedOn>1695286575991</issuedOn>
              <datetime>21-09-2023 10:56:15 GMT+02:00</datetime> <expires/>
              <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
              Id="id-71309bda9649683e3717a459fd783ca2"> </ds:Signature> </root>
            x-swagger-router-controller: exampleController
    401-AuthenticationError:
      description: Authentication error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 401
              type:
                type: string
                description: Type of the error.
                example: Authentication Error
              message:
                type: string
                description: Message returned by the request.
                enum:
                  - User credentials are wrong
                  - Token is invalid
                  - Token is expired
                  - Token is not provided
    403-ForbiddenError:
      description: Forbidden error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 403
              type:
                type: string
                description: Type of the error.
                example: Forbidden Error
              message:
                type: string
                description: Message returned by the request.
                enum:
                  - >-
                    User is not qualified, please try again with a qualified
                    user
                  - This certificate requires a PIN, please provide it
                  - >-
                    Provider not available in your plan. Please, contact B-Team
                    to include it
    404-NotFoundError:
      description: Not found error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: integer
                description: Request status code.
                example: 404
              type:
                type: string
                description: Type of the error.
                example: Not Found Error
              message:
                type: string
                description: Message returned by the request.
                enum:
                  - Certificate with certId {certId} not found
                  - Certificate with externalId {externalId} not found
                  - Certificate with fileHash {fileHash} not found
    422-UnsignedCertificateError:
      description: Unsigned certificate error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: integer
                description: Request status code.
                example: 422
              type:
                type: string
                description: Type of the error.
                example: Unsigned Certificate Error
              message:
                type: string
                description: Message returned by the request.
                enum:
                  - >-
                    Certificate with certId {certId} is not signed, you cannot
                    download it
                  - >-
                    Certificate with externalId {externalId} is not signed, you
                    cannot download it
                  - >-
                    Certificate with fileHash {fileHash} is not signed, you
                    cannot download it
    500-InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 500
              type:
                type: string
                description: Type of the error.
                example: Internal Server Error
              message:
                type: string
                description: Message returned by the request.
                example: Oops! Something went wrong, please try again later
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````