{
  "openapi": "3.0.1",
  "info": {
    "title": "Amplia Reg API",
    "description": "<!--------------------------------------------------------------------------------------------------------------------->\r\n\r\n<h2>Authentication</h2>\r\n\r\n<p>\r\n\tIn order to call this APIs, you will need an <strong>API key</strong>. Set the API key in the header <span class=\"code\">X-Api-Key</span>:\r\n</p>\r\n\r\n<pre>X-Api-Key: your-app|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</pre>\r\n\r\n<p>\r\n\tAlternatively, the API key can be placed on the <span class=\"code\">Authorization</span> header with scheme <span class=\"code\">ApiKey</span>:\r\n</p>\r\n\r\n<pre>Authorization: ApiKey your-app|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</pre>\r\n\r\n<!--------------------------------------------------------------------------------------------------------------------->\r\n\r\n<br />\r\n\r\n<h2>HTTP Codes</h2>\r\n\r\n<p>\r\n\tThe APIs will return the following HTTP codes:\r\n</p>\r\n\r\n<table>\r\n\t<thead>\r\n\t\t<tr>\r\n\t\t\t<th>Code</th>\r\n\t\t\t<th>Description</th>\r\n\t\t</tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr>\r\n\t\t\t<td><strong class=\"model-title\">200 (OK)</strong></td>\r\n\t\t\t<td>Request processed successfully. The response is different for each API, please refer to the operation's documentation</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td><strong class=\"model-title\">400 (Bad Request)</strong></td>\r\n\t\t\t<td>Syntax error. For instance, when a required field was not provided</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td><strong class=\"model-title\">401 (Unauthorized)</strong></td>\r\n\t\t\t<td>API key not provided or invalid</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td><strong class=\"model-title\">403 (Forbidden)</strong></td>\r\n\t\t\t<td>API key is valid, but the application has insufficient permissions to complete the requested operation</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td><strong class=\"model-title\">422 (Unprocessable Entity)</strong></td>\r\n\t\t\t<td>API error. The response is as defined in <a href=\"#model-ErrorModel\">ErrorModel</a></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n\r\n<br />\r\n\r\n<!--------------------------------------------------------------------------------------------------------------------->\r\n",
    "version": "4.12.0 RTM"
  },
  "paths": {
    "/api/bio-enrollment-check": {
      "post": {
        "tags": [
          "BioEnrollmentCheck"
        ],
        "summary": "Triggers a biometry lookup on the PSBio service",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CheckBioEnrollmentRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckBioEnrollmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckBioEnrollmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CheckBioEnrollmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckBioEnrollmentResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckBioEnrollmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/brazil/orders": {
      "post": {
        "tags": [
          "BrazilOrders"
        ],
        "summary": "Creates an order",
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/BrazilOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrazilOrderCreateParametersOrderCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BrazilOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BrazilOrderCreateParametersOrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/cabo-verde/orders": {
      "post": {
        "tags": [
          "CaboVerdeOrders"
        ],
        "summary": "Creates an order",
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CaboVerdeOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaboVerdeOrderCreateParametersOrderCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CaboVerdeOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CaboVerdeOrderCreateParametersOrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/certificate-types": {
      "get": {
        "tags": [
          "CertificateTypes"
        ],
        "summary": "Get list of all the certificate types",
        "parameters": [
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "KeyMediaType",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/KeyMediaTypes"
            }
          },
          {
            "name": "Code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IsDisabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "StartDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "EndDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CertificateTypeSummary"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CertificateTypeSummary"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/orders/status-transitions": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Returns the list of status transitions of orders created by the caller",
        "description": "It is possible to filter by start and/or end date, thus enabling the implementation of a recurring job that obtains the \"latest transitions\" since the previous\r\nexecution of the job.\r\n\r\nThe query parameters `Q` and `Cursor` are ignored.",
        "parameters": [
          {
            "name": "StartDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "EndDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Order",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PaginationOrders"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStatusTransitionModelPaginatedSearchResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStatusTransitionModelPaginatedSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/paraguay/orders": {
      "post": {
        "tags": [
          "ParaguayOrders"
        ],
        "summary": "Creates an order",
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ParaguayOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParaguayOrderCreateParametersOrderCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ParaguayOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ParaguayOrderCreateParametersOrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/rfb-query": {
      "post": {
        "tags": [
          "RfbQuery"
        ],
        "summary": "Performs a query on RFB's \"consulta prévia\" service",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RfbQueryRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RfbQueryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RfbQueryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RfbQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RfbQueryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RfbQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    },
    "/api/ssl/orders": {
      "post": {
        "tags": [
          "SslOrders"
        ],
        "summary": "Creates an order",
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SslOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SslOrderCreateParametersOrderCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SslOrderCreateParametersOrderCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SslOrderCreateParametersOrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error, for instance when a required field is not specified"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Semantic error, for instance when a given entity ID is not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AppendStateNameTypes": {
        "enum": [
          "Omit",
          "Name",
          "Abbreviation"
        ],
        "type": "string"
      },
      "AuthorityReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "organizationIdentifier": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BrazilCertificateTypeParameters": {
        "type": "object",
        "properties": {
          "brazilType": {
            "$ref": "#/components/schemas/PkiBrazilCertificateTypes"
          },
          "appendIdentifierToCommonName": {
            "type": "boolean"
          },
          "dnOrganization": {
            "type": "string",
            "nullable": true
          },
          "organizationalUnits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrazilOrganizationalUnitFieldModel"
            },
            "nullable": true
          },
          "appendLocality": {
            "type": "boolean"
          },
          "appendStateNameType": {
            "$ref": "#/components/schemas/AppendStateNameTypes"
          }
        },
        "additionalProperties": false
      },
      "BrazilOrderCreateParameters": {
        "required": [
          "birthDate",
          "cpf",
          "name"
        ],
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/CertificateFormats"
          },
          "cpf": {
            "maxLength": 11,
            "minLength": 1,
            "type": "string",
            "description": "CPF of the subject (or of the responsible for the PJ certificate) with leading zeroes (if any) and without punctuations"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string",
            "description": "Name of the subject (or of the responsible for the PJ certificate)"
          },
          "birthDate": {
            "minLength": 1,
            "type": "string",
            "description": "Birth date of the subject (or of the responsible for the PJ certificate) in ISO 8601 date format i.e. `yyyy-mm-dd`"
          },
          "cnpj": {
            "type": "string",
            "description": "CNPJ of the organization of the certificate with leading zeroes (if any) and without punctuations (omit for PF certificates)",
            "nullable": true
          },
          "organizationName": {
            "maxLength": 200,
            "type": "string",
            "description": "Legal name (*razão social*) of the organization (omit for PF certificates)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BrazilOrderCreateParametersOrderCreateRequest": {
        "required": [
          "certificateType",
          "parameters",
          "validity"
        ],
        "type": "object",
        "properties": {
          "number": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "registrationAuthority": {
            "$ref": "#/components/schemas/AuthorityReference"
          },
          "certificateType": {
            "$ref": "#/components/schemas/CertificateTypeReference"
          },
          "issueType": {
            "$ref": "#/components/schemas/IssueTypes"
          },
          "parameters": {
            "$ref": "#/components/schemas/BrazilOrderCreateParameters"
          },
          "startValidation": {
            "type": "boolean"
          },
          "validity": {
            "$ref": "#/components/schemas/PeriodModel"
          },
          "saleNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Sale number referring to order",
            "nullable": true
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentTypes"
          }
        },
        "additionalProperties": false
      },
      "BrazilOrganizationalUnitFieldModel": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/BrazilOrganizationalUnitFieldTypes"
          },
          "value": {
            "maxLength": 200,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BrazilOrganizationalUnitFieldTypes": {
        "enum": [
          "RAIdentifier",
          "IssueType",
          "CASubjectCN",
          "Value",
          "OrderAnnotation"
        ],
        "type": "string"
      },
      "CaboVerdeCertificateTypeParameters": {
        "type": "object",
        "properties": {
          "caboVerdeType": {
            "$ref": "#/components/schemas/PkiCaboVerdeCertificateTypes"
          },
          "isFaturaEletronica": {
            "type": "boolean"
          },
          "customTypeDenominator": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CaboVerdeOrderCreateParameters": {
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/CertificateFormats"
          },
          "nif": {
            "maxLength": 20,
            "minLength": 4,
            "pattern": "^[0-9]*$",
            "type": "string",
            "nullable": true
          },
          "identification": {
            "maxLength": 20,
            "minLength": 4,
            "pattern": "^[0-9a-zA-Z]*$",
            "type": "string",
            "nullable": true
          },
          "identificationCountryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CaboVerdeOrderCreateParametersOrderCreateRequest": {
        "required": [
          "certificateType",
          "parameters",
          "validity"
        ],
        "type": "object",
        "properties": {
          "number": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "registrationAuthority": {
            "$ref": "#/components/schemas/AuthorityReference"
          },
          "certificateType": {
            "$ref": "#/components/schemas/CertificateTypeReference"
          },
          "issueType": {
            "$ref": "#/components/schemas/IssueTypes"
          },
          "parameters": {
            "$ref": "#/components/schemas/CaboVerdeOrderCreateParameters"
          },
          "startValidation": {
            "type": "boolean"
          },
          "validity": {
            "$ref": "#/components/schemas/PeriodModel"
          },
          "saleNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Sale number referring to order",
            "nullable": true
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentTypes"
          }
        },
        "additionalProperties": false
      },
      "CertificateFieldModes": {
        "enum": [
          "Disabled",
          "Optional",
          "Required"
        ],
        "type": "string"
      },
      "CertificateFormats": {
        "enum": [
          "PkiBrazil",
          "Ssl",
          "Cnb",
          "CnbCA",
          "Cie",
          "Arisp",
          "Custom",
          "PrivateID",
          "EcuadorBce",
          "Latinus",
          "PkiParaguay",
          "BRLaboral",
          "PkiCaboVerde"
        ],
        "type": "string"
      },
      "CertificateTypeReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CertificateTypeSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the certificate type",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the certificate type",
            "nullable": true
          },
          "format": {
            "$ref": "#/components/schemas/CertificateFormats"
          },
          "code": {
            "type": "string",
            "description": "Code of the certificate type",
            "nullable": true
          },
          "keyMediaType": {
            "$ref": "#/components/schemas/KeyMediaTypes"
          },
          "canIssueByAgentBeforeApproval": {
            "type": "boolean"
          },
          "isDisabled": {
            "type": "boolean"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "validationsStepEnabled": {
            "type": "boolean"
          },
          "biometricsStepEnabled": {
            "type": "boolean"
          },
          "documentsStepEnabled": {
            "type": "boolean"
          },
          "nonExportableKey": {
            "type": "boolean"
          },
          "paraguayParameters": {
            "$ref": "#/components/schemas/ParaguayCertificateTypeParameters"
          },
          "brazilParameters": {
            "$ref": "#/components/schemas/BrazilCertificateTypeParameters"
          },
          "caboVerdeParameters": {
            "$ref": "#/components/schemas/CaboVerdeCertificateTypeParameters"
          },
          "sslParameters": {
            "$ref": "#/components/schemas/SslCertificateTypeParameters"
          },
          "keySize": {
            "type": "integer",
            "format": "int32"
          },
          "issueByCsr": {
            "type": "boolean"
          },
          "canFillFromCsr": {
            "type": "boolean"
          },
          "certificationAuthorityId": {
            "type": "string",
            "format": "uuid"
          },
          "allowVideoConference": {
            "type": "boolean"
          },
          "validityOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeriodModel"
            },
            "description": "Validities allowed for the certificate type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CheckBioEnrollmentRequest": {
        "required": [
          "cpf"
        ],
        "type": "object",
        "properties": {
          "cpf": {
            "minLength": 1,
            "type": "string",
            "description": "CPF referring to the person to be checked for biometric enrollment"
          }
        },
        "additionalProperties": false
      },
      "CheckBioEnrollmentResponse": {
        "type": "object",
        "properties": {
          "isEnrolled": {
            "type": "boolean",
            "description": "Whether the given person is enrolled on the server's biometric database"
          }
        },
        "additionalProperties": false
      },
      "ErrorModel": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExtendedKeyUsages": {
        "enum": [
          "ClientAuth",
          "ServerAuth",
          "CodeSigning",
          "EmailProtection",
          "TimeStamping",
          "OcspSigning",
          "IpsecEndSystem",
          "IpsecTunnel",
          "IpsecUser",
          "Any"
        ],
        "type": "string"
      },
      "IssueTypes": {
        "enum": [
          "Presential",
          "VideoConference",
          "PreApproved"
        ],
        "type": "string"
      },
      "KeyMediaTypes": {
        "enum": [
          "PC",
          "CryptoDevice",
          "Cloud",
          "Adss"
        ],
        "type": "string"
      },
      "KeyUsages": {
        "enum": [
          "CrlSign",
          "DataEncipherment",
          "DecipherOnly",
          "DigitalSignature",
          "EncipherOnly",
          "KeyAgreement",
          "KeyCertSign",
          "KeyEncipherment",
          "NonRepudiation"
        ],
        "type": "string"
      },
      "OrderCreateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the created order",
            "format": "uuid"
          },
          "number": {
            "type": "string",
            "description": "Number of the created order",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderDeclineReasons": {
        "enum": [
          "SubjectDataChanged",
          "KeyGenFailed",
          "ExpiredDocuments",
          "OfficialDocumentsMismatch",
          "ExtemporaneousQuery",
          "BryPSBioFraud",
          "Other"
        ],
        "type": "string"
      },
      "OrderPendencyReasons": {
        "enum": [
          "DataMismatch",
          "TypingError",
          "BadFiles",
          "BryPSBioFraudSuspected",
          "Other"
        ],
        "type": "string"
      },
      "OrderRevocationReasons": {
        "enum": [
          "RequestedBySubject",
          "ViolationOrImproperUse",
          "JudicialOrder",
          "DeathOrExtinction",
          "ActivityCessation",
          "DiscoveryOfFalsityOrInaccuracyOfData",
          "BryPSBioFraud",
          "Other"
        ],
        "type": "string"
      },
      "OrderStatus": {
        "enum": [
          "WaitingValidation",
          "InValidation",
          "WaitingResources",
          "WaitingConfirmation",
          "InConfirmation",
          "Canceled",
          "Pending",
          "Declined",
          "WaitingIssue",
          "Issued",
          "Revoked"
        ],
        "type": "string"
      },
      "OrderStatusTransitionModel": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string",
            "nullable": true
          },
          "orderSaleNumber": {
            "type": "string",
            "nullable": true
          },
          "previousStatus": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "validationAgent": {
            "$ref": "#/components/schemas/UserDisplayModel"
          },
          "confirmationAgent": {
            "$ref": "#/components/schemas/UserDisplayModel"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "pendencyReason": {
            "$ref": "#/components/schemas/OrderPendencyReasons"
          },
          "declineReason": {
            "$ref": "#/components/schemas/OrderDeclineReasons"
          },
          "revocationReason": {
            "$ref": "#/components/schemas/OrderRevocationReasons"
          },
          "reasonDesc": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderStatusTransitionModelPaginatedSearchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderStatusTransitionModel"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaginationOrders": {
        "enum": [
          "Asc",
          "Desc"
        ],
        "type": "string"
      },
      "ParaguayCertificateTypeParameters": {
        "type": "object",
        "properties": {
          "paraguayType": {
            "$ref": "#/components/schemas/PkiParaguayCertificateTypes"
          }
        },
        "additionalProperties": false
      },
      "ParaguayDocumentTypes": {
        "enum": [
          "CedulaDeIdentidad",
          "Pasaporte"
        ],
        "type": "string"
      },
      "ParaguayOrderCreateParameters": {
        "required": [
          "holderIdentification"
        ],
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/CertificateFormats"
          },
          "holderIdentification": {
            "maxLength": 20,
            "minLength": 1,
            "pattern": "[0-9a-zA-ZñÑ]*",
            "type": "string"
          },
          "holderIdentificationType": {
            "$ref": "#/components/schemas/ParaguayDocumentTypes"
          }
        },
        "additionalProperties": false
      },
      "ParaguayOrderCreateParametersOrderCreateRequest": {
        "required": [
          "certificateType",
          "parameters",
          "validity"
        ],
        "type": "object",
        "properties": {
          "number": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "registrationAuthority": {
            "$ref": "#/components/schemas/AuthorityReference"
          },
          "certificateType": {
            "$ref": "#/components/schemas/CertificateTypeReference"
          },
          "issueType": {
            "$ref": "#/components/schemas/IssueTypes"
          },
          "parameters": {
            "$ref": "#/components/schemas/ParaguayOrderCreateParameters"
          },
          "startValidation": {
            "type": "boolean"
          },
          "validity": {
            "$ref": "#/components/schemas/PeriodModel"
          },
          "saleNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Sale number referring to order",
            "nullable": true
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentTypes"
          }
        },
        "additionalProperties": false
      },
      "PaymentTypes": {
        "enum": [
          "CreditCard",
          "PrepaidCredit",
          "BillingAR",
          "Voucher",
          "Pix",
          "Cash",
          "Others"
        ],
        "type": "string"
      },
      "PeriodModel": {
        "type": "object",
        "properties": {
          "years": {
            "type": "integer",
            "format": "int32"
          },
          "months": {
            "type": "integer",
            "format": "int32"
          },
          "days": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PkiBrazilCertificateTypes": {
        "enum": [
          "PessoaFisica",
          "PessoaJuridica"
        ],
        "type": "string"
      },
      "PkiCaboVerdeCertificateTypes": {
        "enum": [
          "AssinaturaDigital",
          "AutenticacaoIndividual",
          "SeloElectronico",
          "FaturaEletronica"
        ],
        "type": "string"
      },
      "PkiParaguayCertificateTypes": {
        "enum": [
          "Firma",
          "Sello",
          "Tributario"
        ],
        "type": "string"
      },
      "QualifiedCertificateTypes": {
        "enum": [
          "ElectronicSignature",
          "ElectronicSeal",
          "WebsiteAuthentication"
        ],
        "type": "string"
      },
      "RfbQueryRequest": {
        "required": [
          "birthDate",
          "cpf"
        ],
        "type": "object",
        "properties": {
          "cpf": {
            "minLength": 1,
            "type": "string",
            "description": "CPF of the person to be queried"
          },
          "birthDate": {
            "minLength": 1,
            "type": "string",
            "description": "Birth date of the person to be queried in ISO 8601 date format i.e. `yyyy-mm-dd`"
          },
          "cnpj": {
            "type": "string",
            "description": "CNPJ of the organization to be queried (omit for a PF query)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RfbQueryResponse": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "description": "Whether the certificate can be issued with the information queried"
          },
          "returnCode": {
            "type": "string",
            "description": "Code returned by RFB's query API",
            "nullable": true
          },
          "failure": {
            "type": "string",
            "description": "Message in Portuguese suitable for displaying to the end-user detailing why the information queried was not approved for certificate issuance",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name referring to the CPF queried (or holder's CPF in case of CNPJ)",
            "nullable": true
          },
          "organizationName": {
            "type": "string",
            "description": "Organization legal name (*razão social*) referring to the CNPJ queried",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SslCertificateTypeParameters": {
        "type": "object",
        "properties": {
          "keyUsages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyUsages"
            },
            "nullable": true
          },
          "extendedKeyUsages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtendedKeyUsages"
            },
            "nullable": true
          },
          "includeComplianceStatement": {
            "type": "boolean"
          },
          "qualifiedType": {
            "$ref": "#/components/schemas/QualifiedCertificateTypes"
          },
          "maxAlternativeDnsNames": {
            "type": "integer",
            "format": "int32"
          },
          "serialNumberMode": {
            "$ref": "#/components/schemas/CertificateFieldModes"
          },
          "evCountryMode": {
            "$ref": "#/components/schemas/CertificateFieldModes"
          },
          "registrationSchemeIdentifier": {
            "type": "string",
            "nullable": true
          },
          "legislationCountryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SslOrderCreateParameters": {
        "required": [
          "primaryDnsName"
        ],
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/CertificateFormats"
          },
          "primaryDnsName": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SslOrderCreateParametersOrderCreateRequest": {
        "required": [
          "certificateType",
          "parameters",
          "validity"
        ],
        "type": "object",
        "properties": {
          "number": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "registrationAuthority": {
            "$ref": "#/components/schemas/AuthorityReference"
          },
          "certificateType": {
            "$ref": "#/components/schemas/CertificateTypeReference"
          },
          "issueType": {
            "$ref": "#/components/schemas/IssueTypes"
          },
          "parameters": {
            "$ref": "#/components/schemas/SslOrderCreateParameters"
          },
          "startValidation": {
            "type": "boolean"
          },
          "validity": {
            "$ref": "#/components/schemas/PeriodModel"
          },
          "saleNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Sale number referring to order",
            "nullable": true
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentTypes"
          }
        },
        "additionalProperties": false
      },
      "UserDisplayModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookEventModel": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/WebhookEventTypes"
          },
          "orderStatusTransitionModel": {
            "$ref": "#/components/schemas/OrderStatusTransitionModel"
          }
        },
        "additionalProperties": false
      },
      "WebhookEventTypes": {
        "enum": [
          "OrderStatusChanged"
        ],
        "type": "string"
      }
    }
  }
}