{"id":8970,"date":"2024-04-07T21:19:12","date_gmt":"2024-04-07T21:19:12","guid":{"rendered":"https:\/\/certillion.com\/online-api\/"},"modified":"2024-09-25T18:40:44","modified_gmt":"2024-09-25T18:40:44","slug":"online-api","status":"publish","type":"page","link":"https:\/\/certillion.com\/en\/api\/online-api\/","title":{"rendered":"Online API"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"8970\" class=\"elementor elementor-8970 elementor-3233\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-893797c elementor-section-boxed elementor-section-height-default elementor-section-height-default wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no\" data-id=\"893797c\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"aux-parallax-section elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-02470b5\" data-id=\"02470b5\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9e2c601 elementor-widget__width-initial elementor-widget elementor-widget-aux_modern_heading\" data-id=\"9e2c601\" data-element_type=\"widget\" data-widget_type=\"aux_modern_heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<section class=\"aux-widget-modern-heading\">\n            <div class=\"aux-widget-inner\"><h5 class=\"aux-modern-heading-primary\">Documentation<\/h5><div class=\"aux-modern-heading-divider\"><\/div><h4 class=\"aux-modern-heading-secondary\"><span class=\"aux-head-before\">Online API<\/span><\/h4><\/div>\n        <\/section>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-41f9d4c elementor-widget elementor-widget-text-editor\" data-id=\"41f9d4c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Flow that runs through the entire Certillion API structure, from the initial request steps to response delivery.<\/p>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t<div class=\"elementor-element elementor-element-1d17512 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-parent\" data-id=\"1d17512\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-d9e4292 e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-child\" data-id=\"d9e4292\" data-element_type=\"container\">\n\t\t\t\t<div class=\"aux-sticky-piece elementor-element elementor-element-7ee8b07 elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents\" data-boundaries=\"1\" data-use-transform=\"1\" data-sticky-margin=\"30\" data-sticky-off=\"\" data-id=\"7ee8b07\" data-element_type=\"widget\" data-settings=\"{&quot;headings_by_tags&quot;:[&quot;h1&quot;],&quot;exclude_headings_by_selector&quot;:[],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"table-of-contents.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-toc__header\">\n\t\t\t<h4 class=\"elementor-toc__header-title\">\n\t\t\t\tDocumentation\t\t\t<\/h4>\n\t\t\t\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--expand\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__7ee8b07\" aria-expanded=\"true\" aria-label=\"Open table of contents\"><i aria-hidden=\"true\" class=\"fas fa-chevron-down\"><\/i><\/div>\n\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--collapse\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__7ee8b07\" aria-expanded=\"true\" aria-label=\"Close table of contents\"><i aria-hidden=\"true\" class=\"fas fa-chevron-up\"><\/i><\/div>\n\t\t\t\t\t<\/div>\n\t\t<div id=\"elementor-toc__7ee8b07\" class=\"elementor-toc__body\">\n\t\t\t<div class=\"elementor-toc__spinner-container\">\n\t\t\t\t<i class=\"elementor-toc__spinner eicon-animation-spin eicon-loading\" aria-hidden=\"true\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-13d569a e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-child\" data-id=\"13d569a\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b7cec54 elementor-widget elementor-widget-text-editor\" data-id=\"b7cec54\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h1>Online API<\/h1>\n<p><span style=\"font-weight: 400;\">Full description, parameters and<\/span> return codes of all Certillion API methods.<\/p>\n<h1>authorize<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/authorize<\/span><\/p>\n<p><span style=\"letter-spacing: -0.7px; text-align: var(--text-align);\">The first step is to create an authorization request containing the parameters necessary for the PSC to identify the client application. Next, it is important to request authorization from the user, according to the requested usage permission.<\/span><span style=\"font-weight: 400;\"> Oauth2 Standard<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The authorization request is made, including parameters such as response type, application identification, code challenge, challenge method, PSC, redirect URI, scope and other optional parameters. If successful, the response includes an authorization code.<\/span><\/p>\n<p><b>Method: GET<\/b><\/p>\n<p><span style=\"font-weight: 400;\">PARAMETERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">code_challenge<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Value used to protect the authorization code grant, ensuring that the person who initiated the request will be the one who exchanges the authorization code for the access token.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">code_challenge_method<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">fixed value \u201cS256\u201d<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Value corresponding to the method used in the proof key (code_verifier) to derive the challenge (code_challenge).<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">manager_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Token that identifies the application that wants to use the API (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">psc<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">PSC that will be used.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">response_type<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The fixed value &#8220;code&#8221;<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">lifetime<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Indicates the desired lifetime for the token to be generated. Integer, in seconds.<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">login_hint<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">User identifier<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">redirect_uri<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Must have the URI to redirect the user back to the originating application.<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">state<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Code for identifying the application state.<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">scope<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Available values: single_signature, multi_signature, signature_session<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Code HTTP<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td>404 (NOT_FOUND)<\/td>\n<td>Returned when the Certillion API was unable to communicate with the PSC.<\/td>\n<td>First, it is necessary to redo the request; additionally, it is crucial to ensure that the credentials are correct.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">In this method, it is necessary to provide a code_challenge.<\/span><span style=\"font-weight: 400;\">The code_challenge is a SHA256 hash of the code_verifier, encoded in URL Base64. <\/span>First, the code_verifier is stored in the application for later use, while the code_challenge is sent along with the authorization request.<span style=\"font-weight: 400;\"> For more information, see the <\/span><a href=\"https:\/\/oauth.net\/2\/pkce\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">PKCE RFC<\/span><\/a><span style=\"font-weight: 400;\"> .<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example, for the Java platform, this information can be generated using the code below, or equivalent:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">var crypto = require('crypto')<\/span>\n<span style=\"font-weight: 400;\">function base64URLEncode(str) {<\/span>\n<span style=\"font-weight: 400;\">    return str.toString('base64')<\/span>\n<span style=\"font-weight: 400;\">        .replace(\/\\+\/g, '-')<\/span>\n<span style=\"font-weight: 400;\">        .replace(\/\\\/\/g, ' _')<\/span>\n<span style=\"font-weight: 400;\">        .replace(\/=\/g, '');<\/span><br class=\"xliff-newline\"><span style=\"font-weight: 400;\">}<\/span>\n<span style=\"font-weight: 400;\"> var verifier = base64URLEncode(crypto.randomBytes(32));<\/span>\n<span style=\"font-weight: 400;\">console.log(\"verifier: \" + verifier);<\/span>\n<span style=\"font-weight: 400;\">function sha256(buffer) {<\/span>\n<span style=\"font-weight: 400;\">    return crypto.createHash('sha256').update(buffer).digest();<\/span>\n<span style=\"font-weight: 400;\">}&lt;\/span &gt;\n<span style=\"font-weight: 400;\">var challenge = base64URLEncode(sha256(verifier));<\/span><br class=\"xliff-newline\"><span style=\"font-weight: 400;\">console.log(\"challenge: \" + challenge);<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>certificate-discovery<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/certificate-discovery<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Recovers the certificate authorized by the user to perform digital signature .<\/span><\/p>\n<p><b>Method: GET<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The parameters returned by the request are:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Status<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Object containing the request status code, name and details&lt;\/span &gt;<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Certificates<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Array containing the certificates found, contains you fields serial_number, subject_dn, issuer_dn, not_before, not_after, alias, status, certificate, issuer_certificate<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Error Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">249 (TOKEN_VALIDITY_INVALID)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">250 (INVALID_ACCESS_TOKEN)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">209 (BAD_AUTHENTICATION)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when the Authorization field passed is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Redo the request ensuring that the Authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span>&lt;\/ td&gt;<\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">218 (USERS_EXCEEDED_MAXIMUM_ALLOWED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the accesses contracted to the PSC in question have been exhausted.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check the status of your account with the PSC.<\/span>&lt;\/ td&gt;<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td>\n<p><span style=\"font- weight: 400;\">205<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(REQUEST_BAD_DATA)<\/span><\/p>\n<\/td>\n<td>&lt; span style=&#8221;font-weight: 400;&#8221;&gt;Returned when there is a problem executing the request.<\/td>\n<td><span style=\"font-weight: 400;\">Redo the request after review it ensuring that it is in accordance with what is expected by method.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">404 (NOT_FOUND)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">620 (CERTIFICATE_NOT_FOUND)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span>&lt; \/p&gt;<\/p>\n<p><span style=\"font-weight: 400;\">&#8211; There is no certificate in the PSC slot;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The Alias provided does not match any certificate in the PSC slot.<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Remake the request, providing an alias correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">224<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(ERROR_DURING_AUTHENTICATION)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it, ensuring that it is in accordance with the method&#8217;s expectations.&lt;\/span &gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">504 (GATEWAY_TIMEOUT)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">301 (TIMEOUT)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a timeout in communication with the PSC. This may be caused by some unavailability or slowness on the part of the PSC.<\/span><\/td>\n<td><span style=\"font -weight: 400;\">Wait a few minutes and redo the request.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Receives the value of the access_token generated by the 2.2 token call.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>client_maintenance<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/client_maintenance<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The method allows the maintenance of information of an application. Developers can register or update essential data, such as name and callback addresses, using tokens provided by e-Sec. The server responds with appropriate codes in cases of incorrect authorization or malformed request. Essential for effective application administration in Certillion, the method facilitates secure and reliable integration.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Parameter description:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Token that identifies the API user application (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_secret<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Application secret token (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">comments<\/span><\/td>\n<td><span style=\"font-weight: 400;\">General observations on the use of the application being registered<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">email<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Email for support in case of unavailability, change of version, among others<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Name\/description of the application<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">redirect_uris<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Application server callback addresses that the Certillion API should call when the signature is completed<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Possible errors returned by the server: <\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Codes <\/b><\/td>\n<td><b>Description <\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the authorization field passed is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">It is necessary to redo the request to ensure that the authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the JSON request sent is malformed.<\/span><\/td>\n<td>It is necessary to first redo the request after reviewing it, also ensuring that its format is as expected by the method.<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Review the submitted request ensuring that its structure is correct. If the error persists, contact Certillion support.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\"><br>HEADERS: <\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td>\n<p>{{token: }}<\/p>\n<p><span style=\"font-weight: 400;\">Receives the value of the access_token that could have been generated by either the 1.1 client_token call or the 2.2 token call.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The content of the request body must be in JSON format. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">{<\/span><br><span style=\"font-weight: 400;\"> &#8220;client_id&#8221;: &#8220;{CLIENT_ID}&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u201cname\u201d: &#8220;{NAME}&#8221;&nbsp; <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u201c{REDIRECT_URIS}<br><\/span><span style=\"font-weight: 400;\">],<\/span><br><span style=\"font-weight: 400;\"> &#8220;email&#8221;: &#8220;{EMAIL}&#8221;<\/span><br><span style=\"font-weight: 400;\">}<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>client_token<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/client_token<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The method is used to obtain a client token, essential for querying users and preparing signatures to be performed by the signer. The request response includes the access_token, required to use other system resources, along with the token&#8217;s validity (expires_in), the token type (token_type &#8211; fixed as &#8216;Bearer&#8217;), and the desired lifetime for the generated token (lifetime in seconds), allowing secure and authorized interaction with other system resources.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The request response contains the following data:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td>access_token<\/td>\n<td>Access token required to use other system resources<\/td>\n<\/tr>\n<tr>\n<td>expires_in<\/td>\n<td>Token validity returned<\/td>\n<\/tr>\n<tr>\n<td>token_type<\/td>\n<td>Token type, fixed value &#8216;Bearer&#8217;<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">lifetime<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Indicates the desired lifetime for the generated token. Integer, in seconds.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description <\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the credentials passed are incorrect (client_id and\/or client_secret)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the credentials are correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure while processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it and ensuring that its format is as expected by the method.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/x-www-form-urlencoded<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The body of the request when sent has the format of a query string separated by &amp;.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{  <\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_id\u201d: \"{CLIENT_ID}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_secret\u201d: \"{CLIENT_SECRET}\",<\/span><br><span style=\"font-weight: 400;\">  \u201cgrant_type\u201d: \"{GRANT_TYPE}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201clifetime\u201d: \"{LIFETIME}\"<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>document (download)<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/document\/{transaction}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This method of the Certillion API is used to download the signature in attached format. The transaction ID that was returned in the call must be informed in the call<\/span><span style=\"font-weight: 400;\">\/<\/span><span style=\"font-weight: 400;\">signature<\/span><span style=\"font-weight: 400;\"> in order to download the signed file.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the operation is successful, the request returns a byte[].<\/span><\/p>\n<p><b>Method: GET<\/b><\/p>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Receives the value of the access_token that may have been generated by either the call 1.1 client_token and by the 2.2 token call.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the Authorization field passed is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the Authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">404 (NOT_FOUND)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; There is no transaction associated with the passed transaction id;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The transaction ndoes not belong to the company that made the request;<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the transaction id passed is valid and that it is linked to a transaction of your company.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; There is no valid signature to perform the download;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The signature pattern used in the transaction does not accept the download;<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Remake the request using another id transaction.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure while processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it to ensure that it complies with the method&#8217;s expectations.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>document (upload)<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/document<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This method allows you to request the signing of a batch of documents to the Certillion API, first requiring the upload of all the files that make up the batch. When sending the files to the server, the call returns the status of the operation, including the code, name and details in the status field, in addition to the hash of the uploaded document. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If errors occur, such as problems reading the file, the server returns corresponding HTTP codes with specific descriptions, suggesting actions to correct the identified problems, such as ensuring the authorization is correct or reviewing and resending the request.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Parameters returned by the request:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">document_hash<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Base64 encoded string of the hash of the document<\/span><\/td>\n<\/tr>\n<tr>\n<td>file<\/td>\n<td><span style=\"font-weight: 400;\">Must receive as value the document or documents to be sent to the Certillion API for signature.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">status<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Operation status, object containing the code, name and detail pairs.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the passed Authorization field is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Redo the request ensuring that the authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a problem reading the sent file.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Redo the request ensuring that the file is not corrupted.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request. Possibly caused by the failure to complete the authorization form or the attempt to upload an empty file.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it, ensuring that it complies with the method&#8217;s expectations.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>Accept<\/td>\n<td><span style=\"font-weight: 400;\">application\/json<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Receives the value of the access_token that may have been generated by either the 1.1 client_token call or the 2.2 token call.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">multipart\/form-data<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Allows the sending of large amounts of binary data, useful for sending large batches of files<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>BODY:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">{<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8220;file&#8221;: &#8220;{FILE}&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">}<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>find-psc-accounts<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/find-psc-accounts<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certillion API method that finds PSC accounts by legal identifier, can be a CPF or CNPJ.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the parameters present in the body of the request:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Token that identifies the application that wants to use the API (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_secret<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Application secret token (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">user_cpf_cnpj<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Must be filled in according to the search, CPF for CPF search and CNPJ for CNPJ search<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">val_cpf_cnpj<\/span><\/td>\n<td><span style=\"font-weight: 400;\">CPF or CNPJ number to be searched<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the Authorization field passed is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the Authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the val_cpf_cnpj field is not filled in.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Redo the request after reviewing it, ensuring that it complies with the method&#8217;s expectations.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td>&nbsp;<\/td>\n<td>\n<p><span style=\"font-weight: 400;\"> method.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">504 (GATEWAY_TIMEOUT)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a timeout in communication with the PSC. It may be caused by some unavailability or slowness on the part of the PSC.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Wait a few minutes and redo the request.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Receives the value of the access_token generated by the 1.1 client_token call.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_id\u201d: \"{CLIENT_ID}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_secret\": \"{CLIENT_SECRET}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cuser_cpf_cnpj\": \"{CPF}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cval_cpf_cnpj\": \"{USERNAME}\"<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>psc-info<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/psc-info<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certillion API method that allows querying the Certification Service Providers (PSC) accepted by Certillion. Users can obtain a complete list of the PSCs that the application recognizes and accepts for digital certification and authentication processes, ensuring that users can easily identify and use the digital certification services compatible with Certillion. <\/span><\/p>\n<p><b>Method: GET<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Parameter description:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Step<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\/psc-info<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Call that fetches all PSCs compatible with the Certillion API<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>otp_authorize<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/otp_authorize<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Cer API Method Tillion for request the generation of a system access token based on the OTP for using the certificate provided by the Certillion application (available for MacOS, Windows, Linux, Android)and iOS).<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the parameters present in the request body:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Token that identifies the application that wants to use the API (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_secret<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Application secret token (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">lifetime<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Desired expiration time for the requested access token, in seconds. OTP code for using the certificate provided by the Certillion application<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">scope<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&#8220;signature_session&#8221;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">user: name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Recipient&#8217;s CPF or CNPJ<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The credentials passed are incorrect;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; There is no OTP for the user;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The OTP passed is invalid.<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Redo the request ensuring that the OTP and authorization credentials are correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it ensuring that it is in accordance with what is expected by the method.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact support. Certillion.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"fon t-weight: 400;\">The body content of the request must be in JSON format.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{<\/span>\n<span style=\"font-weight: 4 00;\">  \u201cclient_id\u201d: \"{CLIENT_ID},<\/span><\/pre>\n<pre>  \u201cotp\u201d: \"{OTP}\",<\/pre>\n<pre>  \u201cscope\u201d: \"{SCOPE}\",<\/pre>\n<pre><span style=\"font-weight: 400;\">  \u201clifetime\u201d: \"{LIFETIME}\"<\/span><br><span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>pwd_authorize<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/pwd_authorize<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certillion API method that requests the generation of an access token to the system, it is not supported by all PSCs.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the parameters present in the body of the request:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Available values: single_signature, multi_signature, signature_session<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Token that identifies the application that wants to use the API (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_secret<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Application secret token (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td>lifetime<\/td>\n<td><span style=\"font-weight: 400;\">Desired validity time for the requested access token, in seconds<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">password<\/span><\/td>\n<td><span style=\"font-weight: 400;\">OTP code of the recipient<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">psc_id<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Requester identifier provided by PSC.<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">psc_secret<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Applicant password to access PSC<\/span><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">psc&lt;\/ span&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Name of the psc desired by the requester<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">scope<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">username<\/span><\/td>\n<td><span style=\"font-weight: 400;\">CPF or Recipient&#8217;s CNPJ<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action&lt; \/b&gt;<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The PSC you want to use is disabled;&lt;\/ span&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The signature pattern used in the transaction does not accept the download;<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Remake the request using another transaction ID.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the credentials passed are incorrect.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the authorization credentials (both of the company and the user) are correct. <\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it, ensuring that it is in accordance with the method&#8217;s expectations.&lt;\/span &gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">501 (NOT_IMPLEMENTED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the pwd_authorize method is not supported by the PSC;<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request using another PSC.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">504 (GATEWAY_TIMEOUT<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a timeout in communication with the PSC. It may be caused by some unavailability or slowness on the part of the PSC.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Wait a few minutes and redo the request.<\/span>&lt; \/td&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<p>Content-Type<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The content of the request body must be in JSON format.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_id\u201d: \"{CLIENT_ID}\", <\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_secret\u201d: \"{CLIENT_SECRET}\",<\/span><br class=\"xliff-newline \"><span style=\"font-weight: 400;\">  \u201cusername\u201d: \"{USERNAME}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cpassword\u201d: \"{PASSWORD}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cscope\u201d: \"{SCOPE} \",<\/span>\n<span style=\"font-weight: 400;\">  \"lifetime\":\"{LIFETIME}\",<\/span>\n<span style=\"font-weight: 400;\">  \"psc\": \"{PSC}\"<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>signature<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/signature<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certillion API method used to sign a batch of documents (one or more). This way the user can sign all the documents in a single step, providing your credentials only once. You must upload the files to be signed beforehand. This method is ideal for signing large documents in PDF (simple and PAdES), XML, DOC, and other formats.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the parameters present in the body of the request. The values in bold are the default:&nbsp;<\/span><span style=\"letter-spacing: -0.7px; text-align: var(--text-align);\">signature_standard<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400;\">certificate_alias<\/span><\/p>\n<p><span style=\"font- weight: 400;\">[optional]<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\"> Identifier of the certificate corresponding to the key used in the signature.&lt;\/span &gt;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">detached<\/span><\/td>\n<td><span style=\"font-weight: 400;\">true for detached or <\/span><b>false<\/b><span style=\"font-weight: 400;\"> for attached<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">hashes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Hashes of documents previously uploaded to the Certillion server, each document has an id, an alias, a calculated hash, an [optional] hash_algorithm that defines the type of hash generation and, finally, [optional] signature_standard_options that defines more signature options (detailed in the table below)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">pki_name<\/span><\/td>\n<td><b>ICP_BR<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">signature_policy<\/span><\/td>\n<td><span style=\"font-weight: 400;\"><b>AD-RB<\/b>, AD-RT, AD-RV, AD-RC or AD-RA<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">PADES, PADES_ICP_BR, <\/span><b>CADES<\/b><span style=\"font-weight: 400;\"> or XADESj<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Note<\/b><span style=\"font-weight: 400;\">: The signature_standard PADES does not require signature_policy.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">signature_standard_options parameters<\/span><span style=\"font-weight: 400;\">:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font- weight: 400;\">digest_method<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SHA1, SHA512, SHA256 (Default)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">pdf_options<\/span><\/td>\n<td>Defines parameters: for signature visible on pdf.<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">xml_options<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Defines parameters for xml signature.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">visible_signature_options parameters:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">distance_x<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Position on the x-axis from the left margin.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: 0<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">distance_y<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Position on the y-axis from the bottom margin.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: 0<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">height<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Signature field height.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: 100<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">image_data<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Signature image encoded in Base64. If an image is not provided, the information passed in the image_zoom and image_position fields will be disregarded.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">image_position<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Position of the signature image on the PDF document page. Possible values: LEFT, RIGHT, TOP, BOTTOM, BACKGROUND<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: LEFT<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">image_zoom<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Increases or decreases the size of the signature image.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default 1.0<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">page_number<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">The page on which the visual signature will be inserted.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: 1<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">position_on_page<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Signature position on the page.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Possible values: TOP_LEFT, TOP_CENTER<\/span><\/p>\n<p>&lt; span style=&#8221;font-weight: 400;&#8221;&gt;TOP_RIGHT, CENTER_LEFT, MIDDLE, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT.<\/p>\n<p><span style=\"font-weight: 400;\">Default: TOP_LEFT<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">signature_field_name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Name of the PDF field where the visible signature will be inserted. If this property is filled in, all fields above it in this table will be disregarded.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">text<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Signature text. If this property is not filled in, all other properties in this table will be disregarded.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">text_alignment<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Alignment of the signature text.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Possible values: LEFT, RIGHT, CENTER.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: LEFT<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">text_font<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Font that will be used in the signature text.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Possible values: HELVETICA, TIMES_ROMAN, COURIER.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: HELVETICA<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">text_font_size<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Font size used in the text signature.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: 10<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">text_padding<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Signature text padding.<\/span><\/p>\n<p><span style=\"font-weight: 40 0;\">Default: 0<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">visual_rotation<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Signature rotation angle. Possible values: NONE, ROTATION_90 , ROTATION_180 , ROTATION_270<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Default: NONE<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">width<\/span><\/td>\n<td>\n<p>Signature field width.<\/p>\n<p><span style=\"font-weight: 400;\">Default: 200<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Signature parameters xml_options:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">add_key_val<\/span><\/td>\n<td><span style=\"font-weight: 400;\">true\/false &#8211; To add a key value.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">add_subject_name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">true\/false &#8211; To add a subject.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">attribute_id_name<\/span><\/td>\n<td><span style=\"font-weight: 4 00;\">ID attribute name, ex: id, Id or ID (mutually exclusive with elements_id<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">elements_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">List of element IDs to be signed.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">elements_name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">List of element names to be signed (used in conjunction with attribute_id_name)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">multiple_signatures<\/span><\/td>\n<td><span style=\"font-weight: 400;\">true\/false &#8211; Indicates whether an additional transformation should be applied.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">remove_signature_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">true\/false &#8211; Removes signature.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Parameters returned by the request:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">policy_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">ID of the policy used in the signature<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">signatures<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Array containing the details of the signatures performed<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">signer_certificate<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Object containing the details of the certificate used in the signatures<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">signer_indentifier<\/span><\/td>\n<td><span style=\"font-weight: 400;\">CPF or CNPJ of the signer<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">status<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Object containing the status code returned by the request, the name and details<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Status codes error:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Error Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">249 (TOKEN_VALIDITY_INVALID)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">250 (INVALID_ACCESS_TOKEN)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">209 (BAD_AUTHENTICATION)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">807 (INVALID_CREDENTIALS)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when the Authorization field passed is incorrect or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the Authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">218 (USERS_EXCEEDED_MAXIMUM_ALLOWED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the accesses contracted to the PSC in question have been exhausted.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check the status with the PSC of your account.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">620 (CERTIFICATE_NOT_FOUND)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is no valid certificate to use for signing.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request using a PSC that has a valid certificate.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">711 (DOCUMENT_NOT_FOUND)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the document was not found. Possibly caused by the document not having been uploaded previously.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Reupload the document and redo the signature request.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">713 (WRONG_DOCUMENT_TYPE)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when the type of document sent does not match the requested signature standard<\/span><\/p>\n<p><span style=\"font-weight: 400;\">e.g.: XML document sent for a PAdES signature that requires PDF.<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Redo the request using the appropriate document type for the requested signature pattern.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">600 (CERTIFICATE_INVALID)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the certificate used is not supported by the signature policy or its chain is invalid.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Remake the request using a valid certificate for the requested policy.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">obs: ICP-Br policies only accept ICP-Br certificates<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">702 (ERROR_ON_PREPARE_SIGNATURE)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a problem with the document hash.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request after checking if the hash of the document being passed as a parameter is correct<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">200 (REQUEST_MISSING_PARAM)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when any mandatory parameter is empty.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request filling in the mandatory parameters.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">224<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(ERROR_DURING_AUTHENTICATION)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure while processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it to ensure that it is as expected by the method.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">504 (GATEWAY_TIMEOUT)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">301 (TIMEOUT)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a timeout in communication with the PSC. It may be caused by some unavailability or slowness on the part of the PSC.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Wait a few minutes and redo the request.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Finally, it is worth noting that, in addition, for the document to be downloaded, it is necessary that the value of the transaction field be passed to the URL of the download request.<\/p>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>Authorization<\/td>\n<td>\n<p><span style=\"font-weight: 400;\">{{token}}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Receives the value of the access_token that may have been generated by either call 1.1 client_token or call 2.2 token.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The content of the request body must be in JSON format.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8220;signature_policy&#8221;: &#8220;SIGNATURE_POLICY&#8221;,<\/span><br><span style=\"font-weight: 400;\"> \u201cpki_name\u201d: &#8220;{PKI_NAME}&#8221;,<\/span><br><span style=\"font-weight: 400;\"> \u201cdetached\u201d: {DETACHED},<\/span><br><span style=\"font-weight: 400;\"> &#8220;hashes&#8221;: [<\/span><br><span style=\"font-weight: 400;\"> {<\/span><br><span style=\"font-weight: 400;\"> &#8220;id&#8221;:<\/span> &#8220;{ID}&#8221;,<\/p>\n<p>&#8220;alias&#8221;: &#8220;{ALIAS}&#8221;,<\/p>\n<p>&#8220;hash&#8221;: &#8220;{DOCUMENTO_HASH}&#8221;<\/p>\n<pre>}<br>]<br>}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>token<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/token<\/span><\/p>\n<p>Second stage of Oauth2. Request for an application to obtain an access token.<\/p>\n<p><span style=\"font-weight: 400;\">The code from step 1 is exchanged for an access token through a POST request to the URL \/oauth\/token. The response contains the access token, its expiration time, scope, authorized identification type, and possible associated HTTP error messages, thus providing the basis for secure authentication and authorization in a system, with optional support for different scopes of operation.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The parameters returned by the call are as follows:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">access_token<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Access token required to use other system resources<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">authorized_identification<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Value corresponding to the CPF or CNPJ associated with the certificate holder<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">authorized_identification_type<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Must contain &#8220;CPF&#8221; for individuals or &#8220;CNPJ&#8221; for legal entities<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">error<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Represents the error code. Possible values for the HTTP Status Code error parameter: <\/span><span style=\"font-weight: 400;\">invalid_request<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\">invalid_grant<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\">invalid_client<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\">unsupported_grant_type<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\">server_error<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">error_description<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Error description<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">error_uri<\/span><\/td>\n<td><span style=\"font-weight: 400;\">URI of the documentation describing the error<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">expires_in<\/span><\/td>\n<td><span style=\"fon t-weight: 400;\">Token validity returned<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">scope<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Available values: single_signature(Signs only 1 document), multi_signature(Signs more than 1 document), signature_session(Creates a signature session. During the period in which the session is open, all signatures will be made without requiring new authorization)<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Below is an example of a response to a token request:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Error<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SERVER_ERROR<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The informed PSC is not valid;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The informed PSC is disabled.<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Remake the request after reviewing it, ensuring that it is in accordance with what is expected by the method.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">INVALID_REQUEST<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The manager_secret parameter cannot be empty.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Remake the request by correctly filling in the code or manager_secret parameter.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you do not have a callback URL registered, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">INVALID_GRANT<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The code parameter is wrong;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The manager_id parameter is invalid;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The company does not have a previously registered callback URL;<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Remake the request by correctly filling in the code or manager_secret parameter.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you do not have a registered callback URL, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">INVALID_REQUEST<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The manager_id, code or code_verifier parameter is empty;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The PSC does not have a valid certificate to use in a signature;<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Remake the request filling in the missing parameter.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the PSC does not have a valid certificate, it will be necessary to contact the PSC to obtain a new certificate.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SERVER_ERROR<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request, or when a mandatory parameter of the request is not sent.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it to ensure that it complies with the method&#8217;s expectations.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td><span style=\"font-weight: 400;\">application\/x-www-form-urlencoded<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY&lt; \/span&gt;<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{<\/span><br class=\"xliff-newline\"><span style=\"font-weight: 400;\">  \u201cclient_secret\u201d: \"{CLIENT_SECRET}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_id\": \"{CLIENT_ID}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201ccode\u201d: \"{CODE}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201c code_verifier\": \"{CODE_VERIFIER}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cgrant_type\u201d: \"{GRANT_TYPE}\",&lt;\/span &gt;\n<span style=\"font-weight: 400;\">  \u201cmanager_id\u201d: \"{MANAGER_ID}\",<\/span>\n <span style=\"font-weight: 400;\">  \u201cmanager_secret\u201d: \"{MANAGER_SECRET}\",<\/span>\n<span style=\"font-weight: 400;\">\"psc\": \"{PSC}\"<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">In this Certillion API method, it is necessary to provide a code_verifier.<\/span><\/p>\n<p>For example, for the Java platform, this information can be generated using the code below or, alternatively, an equivalent:<\/p>\n<table style=\"letter-spacing: -0.7 px; text-align: var(--text-align);\">\n<tbody>\n<tr>\n<td>\n<pre>var crypto = require('crypto')\nfunction base64URLEncode(str) {\n   return str.toString('base64')\n        .replace(\/\\+\/g, '-')&lt; br class=\"xliff-newline\" \/&gt;        .replace(\/\\\/\/g, '_')\n        .replace(\/=\/g, '');<br class=\"xliff-newline\">}\nvar verifier = base64URLEncode(crypto.randomBytes(32));\nconsole.log(\"verifier: \" + verifier); \nfunction sha256(buffer) {\n   return crypto.createHash('sha256').update(buffer).digest();<br class=\"xliff-newline\">}\nvar challenge = base64URLEncode(sha256(verifier));\nconsole.log(\"challenge: \" + challenge);<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>token-command<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/token-command<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certillion API method that allows tokenization management (creation, status query and revocation).<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the parameters passed in the request body:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">lifetime<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Desired validity time for the requested access token<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">operation<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Operation to be passed to the server<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">PSC<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PSC on which you want to perform the operation , currently supports the following PSCs: VAULTID and BIRDID<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">scope<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Available values: single_signature, multi_signature, signature_session<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font -weight: 400;\">user_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">CNPJ of the applicant<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">user_secret<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Requester password<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error Codes<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Error Code&lt;\/b &gt;<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">250 (INVALID_ACCESS_TOKEN)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">209 (BAD_AUTHENTICATION)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when the passed Authorization field is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Redo the request ensuring that the Authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">218 (USERS_EXCEEDED_MAXIMUM_ALLOWED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when contracted accesses to the PSC in question have been exhausted.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check the status of your account with the PSC.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\"> 205<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(REQUEST_BAD_DATA)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is a problem executing the token command.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request after reviewing it to ensure that it complies with the method&#8217;s expectations.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">224<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(ERROR_DURING_AUTHENTICATION)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Remake the request after reviewing it, ensuring that it complies with the method&#8217;s expectations.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<p>newline&#8221; \/&gt;<span style=\"font-weight: 400;\"> \u201coperation&#8221;: &#8220;{OPERATION}&#8221;,<\/span><br><span style=\"font-weight: 400;\"> \u201cpsc&#8221;: &#8220;{PSC}&#8221;<\/span><br><span style=\"font-weight: 400;\">}<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">{{token}}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Receives the value of the access_token that may have been generated by either the 1.1 client_token call as for the 2.2 token call.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The content of the request body must be in JSON format.<\/span><\/p>\n<p>&lt;\/ td&gt;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>user-discovery<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/oauth\/user-discovery<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This Certillion API method performs a query on the Certillion API service to verify the existence of a certificate associated with a CPF or CNPJ.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the request body parameters:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Token that identifies the application that wants to use the API (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">client_secret<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Secret token of the application (Provided by e-Sec)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">psc<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PSC for which you want to search for CPF\/CNPJ, the supported PSCs are: VAULTID, BIRDID, REMOTEID, NEOID, SAFEID, VIDAAS<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">user_cpf_cnpj<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Must be filled in according to the search, CPF for Individual search and CNPJ for Legal Entity search<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">val_cpf_cnpj<\/span><\/td>\n<td><span style=\"font-weight: 400;\">CPF or CNPJ number to be searched<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Action Suggested<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the authorization field passed is wrong or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the PSC is disabled or when an invalid PSC is used.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request using a PSC valid.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request. Possibly caused by the lack of completion of a mandatory parameter or its absence in the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it ensuring thatits format is as expected by the method.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>HEADERS<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The content of the request body must be in JSON format.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_id\u201d: \"{CLIENT_ID}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cclient_secret\": \"{CLIENT_SECRET}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cuser_cpf_cnpj\": \"{CPF}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cval_cpf_cnpj\": \"{USERNAME}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cpsc\": class=\"xliff-newline\" \/&gt;<span style=\"font-weight: 400;\">}<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>validate<\/h1>\n<p><span style=\"font-weight: 400;\">\/css\/restful\/application\/signature\/validate<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This Certillion API method validates CAdES and PAdES signatures made by another system (the signatures returned by Certillion are always valid), including checks according to the ICP-Brasil and PKIX standards specifications. The validation is comprehensive, covering the certification chain, certificate revocation lists (CRLs) and online certificate status protocol (OCSP). <\/span><\/p>\n<p><span style=\"font-weight: 400;\">To validate a PDF signature, it is necessary to send the signed PDF file in the &#8220;signature&#8221; field (in base64) without the need to send content and document_hash. Alternatively, the hash of the PDF file that is saved on the server can be sent in the same &#8220;signature&#8221; field.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For attached signatures where the file is not a PDF, you must send the file in base64 in the &#8220;signature&#8221; field.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the case of detached signatures, the signature must be in the &#8220;signature&#8221; field. In this call, the signed file can be in the content field (base64) or saved on the server and its hash sent in the &#8220;document_hash&#8221; field.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The header must contain the access token generated by the 1.1 client_token or 2.2 token calls, and the body must be in JSON format, containing the parameters required for validation.<\/span><\/p>\n<p><b>Method: POST<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Description of the parameters passed in the body of the request:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Parameter<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Description<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">content<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Receives the file in base 64 for the case of detached signature validation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">document_hash<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Hash of the document to be validated<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">pki_name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Public Key Infrastructure used in the API request, the default value of the field is<\/span> <span style=\"font-weight: 400;\">ICP BR<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">signature<\/span><\/td>\n<td><span style=\"font-weight: 400;\">In this field you must send the file to be validated in base 64 for attached files that are not PDF, the file in base 64 together with the hash for PDF files or the signature for detached files. In the case of PDF attached it is possible to send the file in base 64 without the need to send content and document_hash.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Error codes:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>HTTP Code<\/b><\/td>\n<td><b>Error Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Suggested Action<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">250 (INVALID_ACCESS_TOKEN)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">209 (BAD_AUTHENTICATION)<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when the Authorization field passed is incorrect or expired.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Remake the request ensuring that the Authorization is correct.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">401 (UNAUTHORIZED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">218 (USERS_EXCEEDED_MAXIMUM_ALLOWED)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the contracted accesses to the PSC in question have been exhausted.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check the status of your account with the PSC.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\"> 400 (BAD_REQUEST)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">205<\/span><\/p>\n<p><span style=\"font- weight: 400;\">(REQUEST_BAD_DATA)<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Returned when:<\/span>&lt;\/p &gt;<\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The certificate chain is incomplete;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The certificate chain is invalid;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; There is a cryptographic error in the signature;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; There is an error in the signature encoding;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The algorithm used to perform the signature is not supported by Certillion;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; The file format is not supported;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; Signature verification failed;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; Signature policy verification failed;<\/span><\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Review the submitted signature based on the returned error.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">400 (BAD_REQUEST)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">711 (DOCUMENT_NOT_FOUND)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Returned when the Certillion API was unable to locate the original document to validate the signature.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Send signature in attached format.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">500 (INTERNAL_SERVER_ERROR)<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">205<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(REQUEST_BAD_DATA)<\/span>&lt;\/ p&gt;<\/p>\n<\/td>\n<td><span style=\"font-weight: 400;\">Returned when there is an unexpected failure in processing the request.<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">Redo the request after reviewing it, ensuring that it is in accordance with the method&#8217;s expectations.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, contact Certillion support.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">HEADERS<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Authorization<\/span><\/td>\n<td>\n<p><span style=\"font -weight: 400;\">{{token}}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Receives the value of the access_token that may have been generated by either the 1.1 client_token call or the 2.2 token call.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\"> Content-Type<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400;\">application\/json<\/span><\/p>\n<p><span style=\"font -weight: 400;\">The content of the request body must be in JSON format.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">BODY:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-weight: 400;\">{\n<span style=\"font-weight: 400;\">  \u201csignature\u201d: \u201c{SIGNATURE}\u201d,<\/span>\n<span style=\"font-weight: 400;\">  \u201ccontent\u201d: \"{CONTENT}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cdocument_hash\u201d: \"{DOCUMENTO_HASH}\",<\/span>\n<span style=\"font-weight: 400;\">  \u201cpki_name \": \"{PKI_NAME}\"<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>Status codes returned by Certillion calls<\/h1>\n<p><span style=\"font-weight: 400;\">Status codes error:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Name<\/b><\/td>\n<td><b>Code<\/b><\/td>\n<\/tr>\n<tr>\n<td>REQUEST_OK<\/td>\n<td>100<\/td>\n<td>Request accepted by the receiver.<\/td>\n<\/tr>\n<tr>\n<td>TRANSACTION_IN_PROGRESS<\/td>\n<td>110<\/td>\n<td>The message has been received and still being processed.<\/td>\n<\/tr>\n<tr>\n<td>REGISTRATION_VALID<\/td>\n<td>120<\/td>\n<td>You are registered in the system.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_VALID<\/td>\n<td>130<\/td>\n<td>The certificate is valid.<\/td>\n<\/tr>\n<tr>\n<td>CSR_VALID<\/td>\n<td>131<\/td>\n<td>The CSR is valid.<\/td>\n<\/tr>\n<tr>\n<td>REVOCATION_ACCEPTED<\/td>\n<td>132<\/td>\n<td>The certificate is marked as revoked, then enduser will be informed.<\/td>\n<\/tr>\n<tr>\n<td>SIGNATURE_VALID<\/td>\n<\/tr>\n<tr>\n<td>USER_ACTIVE<\/td>\n<td>150<\/td>\n<td>User account ready for signature.<\/td>\n<\/tr>\n<tr>\n<td>DEVICE_READY<\/td>\n<td>151<\/td>\n<td>Device ready for signature.<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_MISSING_PARAM<\/td>\n<td>200<\/td>\n<td>An argument in the request is missing: %S<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_WRONG_PARAM<\/td>\n<td>201<\/td>\n<td>Error among the arguments of the request.<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_WRONG_LENGTH<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_BAD_FORMAT<\/td>\n<td>203<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_BAD_FORMAT<\/td>\n<td>203<\/td>\n<td>Cannot handle given MIME-Type or encoding style.<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_BAD_PROFILE<\/td>\n<td>204<\/td>\n<td>The AP requested a key type, key usage or signing policy that the MSS does not support.<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_BAD_DATA<\/td>\n<td>205<\/td>\n<td>The enduser&#8217;s mobile equipment cannot handle this kind of data.<\/td>\n<\/tr>\n<tr>\n<td>REQUEST_DUPLICATED<\/td>\n<td>206<\/td>\n<td>The request or it&#8217;s parameters are duplicated.<\/td>\n<\/tr>\n<tr>\n<td>ACCOUNT_NO_BANDWIDTH<\/td>\n<td>210<\/td>\n<td>Insufficient bandwidth left to carry out the transaction.<\/td>\n<\/tr>\n<tr>\n<td>ACCOUNT_MAX_TRIES<\/td>\n<td>211<\/td>\n<td>Maximum number of tries exceeded.<\/td>\n<\/tr>\n<tr>\n<td>ACCOUNT_NO_CREDIT<\/td>\n<td>212<\/td>\n<td>The user must pay for the certificate usage, but he&#8217;s out of credit.<\/td>\n<\/tr>\n<tr>\n<td>ACCESS_NOT_AUTHORIZED<\/td>\n<td>220<\/td>\n<td>The AP is unknown or the authentication is wrong.<\/td>\n<\/tr>\n<tr>\n<td>ACCESS_NO_HANDSHAKE<\/td>\n<td>221<\/td>\n<td>The MSS wants prior to negotiating with the AP the use of XML signatures in the messages.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&lt; td&gt;This additional service is unknown.&lt;\/ tr&gt;&lt; td&gt;425The new key is not acceptable.&lt; td&gt;Unique identifier already registered.&lt; \/tbody&gt;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Name<\/b><\/td>\n<td><b>Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td>ACCESS_NO_SPECIFIED<\/td>\n<td>222<\/td>\n<td>The authentication mechanism was not specified.<\/td>\n<\/tr>\n<tr>\n<td>TRANSACTION_NOT_AUTHORIZED<\/td>\n<td>223<\/td>\n<td>The transaction was not authorized. The specific reason is informed in details.<\/td>\n<\/tr>\n<tr>\n<td>NETWORK_ERROR<\/td>\n<td>300<\/td>\n<td>The MSS could not contact the enduser&#8217;s mobile equipment.<\/td>\n<\/tr>\n<tr>\n<td>td&gt;<\/td>\n<\/tr>\n<tr>\n<td>This transaction is unknown.<\/td>\n<td>310<\/td>\n<td>This transaction is unknown.<\/td>\n<\/tr>\n<tr>\n<td>IDENTIFIER_NOT_FOUND<\/td>\n<td>311<\/td>\n<td>This enduser is unknown.<\/td>\n<\/tr>\n<tr>\n<td>SERVICE_NOT_FOUND<\/td>\n<td>312<\/td>\n<\/tr>\n<tr>\n<td>MOBILE_SIGNATURE_ERROR<\/td>\n<td>320<\/td>\n<td>Error during the signature process on the Mobile equipment.<\/td>\n<\/tr>\n<tr>\n<td>MOBILE_CERTIFICATE_ERROR<\/td>\n<td>321<\/td>\n<td>Error during the certificate generation on the mobile equipment.<\/td>\n<\/tr>\n<tr>\n<td>USER_CANCELED<\/td>\n<td>400<\/td>\n<td>The client has canceled the transaction.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_BAD_INTEGRITY<\/td>\n<td>410<\/td>\n<td>The integrity check failed.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_BAD_AUTHENTICATION<\/td>\n<td>411<\/td>\n<td>The authentication failed.<\/td>\n<td>td&gt;<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_BAD_ENCRYPTION<\/td>\n<td>412<\/td>\n<td>The decryption of the message failed.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_BAD_ENCODING<\/td>\n<td>413<\/td>\n<td>The message could not be decoded.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_EXPIRED<\/td>\n<td>414<\/td>\n<td>The message has expired.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_WRONG_VERSION<\/td>\n<td>420&lt;\/td &gt;<\/td>\n<td>The version of the message is inappropriate for the receiver.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_MISSING_KEY<\/td>\n<td>421<\/td>\n<td>The receiver was expecting a symmetric key.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_UNEXPECTED_KEY<\/td>\n<td>422<\/td>\n<td>The receiver was not expecting a symmetric key.<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_UNEXPECTED<\/td>\n<td>423<\/td>\n<td>This message is not supposed to be received at this time.<\/td>\n<\/tr>\n<tr>\n<td>KEY_EXPIRED<\/td>\n<td>424<\/td>\n<td>The authentication key is expired.<\/td>\n<\/tr>\n<tr>\n<td>KEY_REJECTED<\/td>\n<\/tr>\n<tr>\n<td>MESSAGE_NOT_FOUND<\/td>\n<td>430<\/td>\n<td>This message doesn&#8217;t &#8216;t exists on the mobile equipment or has been deleted.<\/td>\n<\/tr>\n<tr>\n<td>USER_NOT_FOUND<\/td>\n<td>431<\/td>\n<td>There&#8217;s no mobile user with this ID.<\/td>\n<\/tr>\n<tr>\n<td>INTERNAL_ERROR<\/td>\n<td>440<\/td>\n<td>Internal Error.<\/td>\n<\/tr>\n<tr>\n<td>SERVICE_CANT_ACTIVATE<\/td>\n<td>450<\/td>\n<td>This additional service cannot be activated to this mobile or this company.<\/td>\n<\/tr>\n<tr>\n<td>SERVICE_CANT_USE<\/td>\n<td>451<\/td>\n<td>This additional service is not allowed or not supported.<\/td>\n<\/tr>\n<tr>\n<td>SERVICE_WAS_ACTIVATED<\/td>\n<td>452<\/td>\n<td>This additional service was already activated.<\/td>\n<\/tr>\n<tr>\n<td>PLATFORM_NOT_FOUND<\/td>\n<td>500<\/td>\n<td>This platform is unknown.<\/td>\n<\/tr>\n<tr>\n<td>TOKEN_WRONG<\/td>\n<td>501<\/td>\n<td>The token is incorrect.<\/td>\n<\/tr>\n<tr>\n<td>IDENTIFIER_INVALID<\/td>\n<td>502<\/td>\n<td>Unique identifier is invalid.<\/td>\n<\/tr>\n<tr>\n<td>IDENTIFIER_DUPLICATED<\/td>\n<td>503<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_INVALID<\/td>\n<td>600<\/td>\n<td>The certificate is invalid, no further details.<\/td>\n<\/tr>\n<tr>\n<td>CSR_INVALID<\/td>\n<td>601<\/td>\n<td>The CSR is invalid, no further details.<\/td>\n<\/tr>\n<tr>\n<td>CRL_INVALID<\/td>\n<td>602<\/td>\n<td>The CRL is invalid, no further details.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&lt; \/tr&gt;&lt; td&gt;605The certificate is expired.&lt; tr&gt;CARD_PIN_BLOCKED631The PIN of the smartcard has been blocked.&lt; td&gt;632The smartcard is blocked and can never be used anymore.&lt; td&gt;CERTIFICATE_DUPLICATED&lt; td&gt;The public key in this certificate is different from the public key contained in the CSR.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Name<\/b><\/td>\n<td><b>Code<\/b><\/td>\n<td>&lt; b&gt;Description<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_MALFORMED<\/td>\n<td>603<\/td>\n<td>A X509 certificate could not be constructed.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_REVOKED<\/td>\n<td>604<\/td>\n<td>The certificate is revoked.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_EXPIRED<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_NOT_IN_EFFECT<\/td>\n<td>606<\/td>\n<td>The current date precedes the one in the NOT_BEFORE field of the certificate.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_BLOCKED<\/td>\n<td>607<\/td>\n<td>The certificate is blocked or in one of the pending operation statuses.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_NOT_TRUSTED<\/td>\n<td>608<\/td>\n<td>The certificate was issued by an unknown or untrusted CA.<\/td>\n<\/tr>\n<tr>\n<td>KEY_SIZE_INVALID<\/td>\n<td>609<\/td>\n<td>The certificate uses a key size that&#8217;s not supported.<\/td>\n<\/tr>\n<tr>\n<td>CRL_UNAVAILABLE<\/td>\n<td>\n<p>610&lt; \/td&gt;<\/p>\n<\/td>\n<td>The CRL wasn&#8217;t available at the time it was tried to download.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_NOT_FOUND<\/td>\n<td>620<\/td>\n<td>No certificate has been found.<\/td>\n<\/tr>\n<tr>\n<td>CHAIN_NOT_FOUND<\/td>\n<td>621<\/td>\n<td>Trust chain not found.<\/td>\n<\/tr>\n<tr>\n<td>KEY_NOT_FOUND<\/td>\n<td>622<\/td>\n<td>The private key of this certificate has not been found.<\/td>\n<\/tr>\n<tr>\n<td>CARD_ERROR<\/td>\n<td>630<\/td>\n<td>The smartcard found an error during the operation.<\/td>\n<\/tr>\n<tr>\n<td>CARD_BLOCKED<\/td>\n<\/tr>\n<tr>\n<td>CARD_NOT_PRESENT<\/td>\n<td>633<\/td>\n<td>The smartcard is not connected on the mobile equipment.<\/td>\n<\/tr>\n<tr>\n<td>PIN_WRONG<\/td>\n<td>640<\/td>\n<td>The pin is wrong.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_CANT_REVOKE<\/td>\n<td>650<\/td>\n<td>This certificate cannot be revoked.<\/td>\n<\/tr>\n<tr>\n<td>660<\/td>\n<td>This certificate already exists in the server database and cannot be duplicated.<\/td>\n<\/tr>\n<tr>\n<td>CERTIFICATE_WRONG_SUBJECT<\/td>\n<td>661<\/td>\n<td>The user isn&#8217;t the owner of the certificate.<\/td>\n<\/tr>\n<tr>\n<td>KEY_MISMATCH<\/td>\n<td>662<\/td>\n<\/tr>\n<tr>\n<td>SIGNATURE_INVALID<\/td>\n<td>700<\/td>\n<td>The signature is not valid.<\/td>\n<\/tr>\n<tr>\n<td>SIGNATURE_CANT_VALIDATE<\/td>\n<td>701<\/td>\n<td>Security parameters (certificate, policies, TSA) has a corruption or is wrong. td&gt;<\/td>\n<\/tr>\n<tr>\n<td>TEMPLATE_NOT_FOUND<\/td>\n<td>710<\/td>\n<td>The template does not exist.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td><b>Name<\/b><\/td>\n<td><b>Code<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td>DOCUMENT_NOT_FOUND<\/td>\n<td>711<\/td>\n<td>The document can not be found on internal storage.<\/td>\n<\/tr>\n<tr>\n<td>WRONG_DOCUMENT_HASH<\/td>\n<td>712<\/td>\n<td>The document downloaded on the url has another hash.<\/td>\n<\/tr>\n<tr>\n<td>WRONG_DOCUMENT_TYPE<\/td>\n<td>713<\/td>\n<td>The document type doesn&#8217;t match the requested standard ( XML or PDF)<\/td>\n<\/tr>\n<tr>\n<td>XMLDSIG_EMPTY_ELEMENT_LIST<\/td>\n<td>720<\/td>\n<td>Empty element list in XMLDSig<\/td>\n<\/tr>\n<tr>\n<td>XMLDSIG_ELEMENTS_WITHOUT_ATRIBUTE_ID<\/td>\n<td>721<\/td>\n<td>Element tags without attribute id in XMLDSig<\/td>\n<\/tr>\n<tr>\n<td>XMLDSIG_SAME_ID_FOR_MULTIPLE_ELEMENTS<\/td>\n<td>\n<p>722&lt; \/td&gt;<\/p>\n<\/td>\n<td>Same id in multiple elements in XMLDSig<\/td>\n<\/tr>\n<tr>\n<td>XMLDSIG_NO_ELEMENT_FOUND<\/td>\n<td>723<\/td>\n<td>No element tag in XMLDSig<\/td>\n<\/tr>\n<tr>\n<td>CONTRACT_NOT_FOUND<\/td>\n<td>800<\/td>\n<td>The contract could not be found.<\/td>\n<\/tr>\n<tr>\n<td>DUPLICATED_ACCOUNT<\/td>\n<td>801<\/td>\n<td>User CPF already exists in this list<\/td>\n<\/tr>\n<tr>\n<td>MAX_ACCOUNTS_REACHED<\/td>\n<td>802<\/td>\n<td>Contract reached max accounts available.<\/td>\n<\/tr>\n<tr>\n<td>ACCOUNT_NOT_REGISTERED<\/td>\n<td>803<\/td>\n<td>Account is not registered in company contract.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>&nbsp;<\/h1>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f5effed e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-parent\" data-id=\"f5effed\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-22286dd elementor-widget elementor-widget-spacer\" data-id=\"22286dd\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Documentation Online API Flow that runs through the entire Certillion API structure, from the initial request steps to response delivery. Documentation Online API Full description, parameters and return codes of all Certillion API methods. authorize \/css\/restful\/application\/oauth\/authorize The first step is to create an authorization request containing the parameters necessary for the PSC to identify the client application. Next, it is important to request authorization from the user, according to the requested usage permission. Oauth2 Standard The authorization request is made, including parameters such as response type, application identification, code challenge, challenge method, PSC, redirect URI, scope and other optional parameters. If successful, the response includes an authorization code. Method: GET PARAMETERS code_challenge Value used to protect the authorization code grant, ensuring that the person who initiated the request will be the one who exchanges the authorization code for the access token. code_challenge_method fixed value \u201cS256\u201d Value corresponding to the method used in the proof key (code_verifier) to derive the challenge (code_challenge). manager_id Token that identifies the application that wants to use the API (Provided by e-Sec) psc [optional] PSC that will be used. response_type The fixed value &#8220;code&#8221; lifetime [optional] Indicates the desired lifetime for the token to be generated. Integer, in seconds. login_hint [optional] User identifier redirect_uri [optional] Must have the URI to redirect the user back to the originating application. state [optional] Code for identifying the application state. scope [optional] Available values: single_signature, multi_signature, signature_session Error codes: Code HTTP Description Suggested Action 404 (NOT_FOUND) Returned when the Certillion API was unable to communicate with the PSC. First, it is necessary to redo the request; additionally, it is crucial to ensure that the credentials are correct. In this method, it is necessary to provide a code_challenge.The code_challenge is a SHA256 hash of the code_verifier, encoded in URL Base64. First, the code_verifier is stored in the application for later use, while the code_challenge is sent along with the authorization request. For more information, see the PKCE RFC . For example, for the Java platform, this information can be generated using the code below, or equivalent: var crypto = require(&#8216;crypto&#8217;) function base64URLEncode(str) { return str.toString(&#8216;base64&#8217;) .replace(\/+\/g, &#8216;-&#8216;) .replace(\/\/\/g, &#8216; _&#8217;) .replace(\/=\/g, &#8221;);} var verifier = base64URLEncode(crypto.randomBytes(32)); console.log(&#8220;verifier: &#8221; + verifier); function sha256(buffer) { return crypto.createHash(&#8216;sha256&#8242;).update(buffer).digest(); }&lt;\/span &gt; var challenge = base64URLEncode(sha256(verifier));console.log(&#8220;challenge: &#8221; + challenge); certificate-discovery \/css\/restful\/application\/certificate-discovery Recovers the certificate authorized by the user to perform digital signature . Method: GET The parameters returned by the request are: Parameter Description Status Object containing the request status code, name and details&lt;\/span &gt; Certificates Array containing the certificates found, contains you fields serial_number, subject_dn, issuer_dn, not_before, not_after, alias, status, certificate, issuer_certificate Error codes: HTTP Code Error Code Description Suggested Action 401 (UNAUTHORIZED) 249 (TOKEN_VALIDITY_INVALID) 250 (INVALID_ACCESS_TOKEN) 209 (BAD_AUTHENTICATION) Returned when the Authorization field passed is wrong or expired. Redo the request ensuring that the Authorization is correct. 401 (UNAUTHORIZED)&lt;\/ td&gt; 218 (USERS_EXCEEDED_MAXIMUM_ALLOWED) Returned when the accesses contracted to the PSC in question have been exhausted. Check the status of your account with the PSC.&lt;\/ td&gt; 400 (BAD_REQUEST) 205 (REQUEST_BAD_DATA) &lt; span style=&#8221;font-weight: 400;&#8221;&gt;Returned when there is a problem executing the request. Redo the request after review it ensuring that it is in accordance with what is expected by method. 404 (NOT_FOUND) 620 (CERTIFICATE_NOT_FOUND) Returned when:&lt; \/p&gt; &#8211; There is no certificate in the PSC slot; &#8211; The Alias provided does not match any certificate in the PSC slot. Remake the request, providing an alias correct. 500 (INTERNAL_SERVER_ERROR) 224 (ERROR_DURING_AUTHENTICATION) Returned when there is an unexpected failure in processing the request. Redo the request after reviewing it, ensuring that it is in accordance with the method&#8217;s expectations.&lt;\/span &gt; If the error persists, contact Certillion support. 504 (GATEWAY_TIMEOUT) 301 (TIMEOUT) Returned when there is a timeout in communication with the PSC. This may be caused by some unavailability or slowness on the part of the PSC. Wait a few minutes and redo the request. HEADERS Authorization Receives the value of the access_token generated by the 2.2 token call. client_maintenance \/css\/restful\/application\/oauth\/client_maintenance The method allows the maintenance of information of an application. Developers can register or update essential data, such as name and callback addresses, using tokens provided by e-Sec. The server responds with appropriate codes in cases of incorrect authorization or malformed request. Essential for effective application administration in Certillion, the method facilitates secure and reliable integration. Method: POST Parameter description: Parameter Description client_id Token that identifies the API user application (Provided by e-Sec) client_secret Application secret token (Provided by e-Sec) comments General observations on the use of the application being registered email Email for support in case of unavailability, change of version, among others name Name\/description of the application redirect_uris Application server callback addresses that the Certillion API should call when the signature is completed Possible errors returned by the server: HTTP Codes Description Suggested Action 401 (UNAUTHORIZED) Returned when the authorization field passed is wrong or expired. It is necessary to redo the request to ensure that the authorization is correct. 400 (BAD_REQUEST) Returned when the JSON request sent is malformed. It is necessary to first redo the request after reviewing it, also ensuring that its format is as expected by the method. 500 (INTERNAL_SERVER_ERROR) Returned when there is an unexpected failure in processing the request. Review the submitted request ensuring that its structure is correct. If the error persists, contact Certillion support. HEADERS: Authorization {{token: }} Receives the value of the access_token that could have been generated by either the 1.1 client_token call or the 2.2 token call. Content-Type application\/json The content of the request body must be in JSON format. { &#8220;client_id&#8221;: &#8220;{CLIENT_ID}&#8221; \u201cname\u201d: &#8220;{NAME}&#8221;&nbsp; \u201c{REDIRECT_URIS}], &#8220;email&#8221;: &#8220;{EMAIL}&#8221;} client_token \/css\/restful\/application\/oauth\/client_token The method is used to obtain a client token, essential for querying users and preparing signatures to be performed by the signer. The request response includes the access_token, required to use other system resources, along with the token&#8217;s validity (expires_in), the token type (token_type &#8211; fixed as &#8216;Bearer&#8217;), and the desired lifetime for the generated token (lifetime in seconds), allowing secure and<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":8994,"menu_order":12,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8970","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.5 (Yoast SEO v23.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Certillion API - Integration<\/title>\n<meta name=\"description\" content=\"Discover the Certillion API, your solution for fast and secure digital signatures. Integrate with our API and simplify processes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/certillion.com\/en\/api\/online-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Online API\" \/>\n<meta property=\"og:description\" content=\"Discover the Certillion API, your solution for fast and secure digital signatures. Integrate with our API and simplify processes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/certillion.com\/en\/api\/online-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Certillion\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/certillion\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-25T18:40:44+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"25 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/certillion.com\/en\/api\/online-api\/\",\"url\":\"https:\/\/certillion.com\/en\/api\/online-api\/\",\"name\":\"Certillion API - Integration\",\"isPartOf\":{\"@id\":\"https:\/\/certillion.com\/#website\"},\"datePublished\":\"2024-04-07T21:19:12+00:00\",\"dateModified\":\"2024-09-25T18:40:44+00:00\",\"description\":\"Discover the Certillion API, your solution for fast and secure digital signatures. Integrate with our API and simplify processes.\",\"breadcrumb\":{\"@id\":\"https:\/\/certillion.com\/en\/api\/online-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/certillion.com\/en\/api\/online-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/certillion.com\/en\/api\/online-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/certillion.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\",\"item\":\"https:\/\/certillion.com\/en\/api\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Online API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/certillion.com\/#website\",\"url\":\"https:\/\/certillion.com\/\",\"name\":\"Certillion - Certifica\u00e7\u00e3o Digital\",\"description\":\"Simples, R\u00e1pido e Seguro\",\"publisher\":{\"@id\":\"https:\/\/certillion.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/certillion.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/certillion.com\/#organization\",\"name\":\"E-sec Seguran\u00e7a Digital\",\"url\":\"https:\/\/certillion.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/certillion.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/certillion.com\/wp-content\/uploads\/2021\/07\/Certillion-Dark.svg\",\"contentUrl\":\"https:\/\/certillion.com\/wp-content\/uploads\/2021\/07\/Certillion-Dark.svg\",\"width\":218,\"height\":62,\"caption\":\"E-sec Seguran\u00e7a Digital\"},\"image\":{\"@id\":\"https:\/\/certillion.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/certillion\",\"https:\/\/www.linkedin.com\/company\/certillion\/\",\"https:\/\/www.instagram.com\/certillion\/\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Certillion API - Integration","description":"Discover the Certillion API, your solution for fast and secure digital signatures. Integrate with our API and simplify processes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/certillion.com\/en\/api\/online-api\/","og_locale":"en_US","og_type":"article","og_title":"Online API","og_description":"Discover the Certillion API, your solution for fast and secure digital signatures. Integrate with our API and simplify processes.","og_url":"https:\/\/certillion.com\/en\/api\/online-api\/","og_site_name":"Certillion","article_publisher":"https:\/\/www.facebook.com\/certillion","article_modified_time":"2024-09-25T18:40:44+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"25 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/certillion.com\/en\/api\/online-api\/","url":"https:\/\/certillion.com\/en\/api\/online-api\/","name":"Certillion API - Integration","isPartOf":{"@id":"https:\/\/certillion.com\/#website"},"datePublished":"2024-04-07T21:19:12+00:00","dateModified":"2024-09-25T18:40:44+00:00","description":"Discover the Certillion API, your solution for fast and secure digital signatures. Integrate with our API and simplify processes.","breadcrumb":{"@id":"https:\/\/certillion.com\/en\/api\/online-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/certillion.com\/en\/api\/online-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/certillion.com\/en\/api\/online-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/certillion.com\/en\/"},{"@type":"ListItem","position":2,"name":"API","item":"https:\/\/certillion.com\/en\/api\/"},{"@type":"ListItem","position":3,"name":"Online API"}]},{"@type":"WebSite","@id":"https:\/\/certillion.com\/#website","url":"https:\/\/certillion.com\/","name":"Certillion - Certifica\u00e7\u00e3o Digital","description":"Simples, R\u00e1pido e Seguro","publisher":{"@id":"https:\/\/certillion.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/certillion.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/certillion.com\/#organization","name":"E-sec Seguran\u00e7a Digital","url":"https:\/\/certillion.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/certillion.com\/#\/schema\/logo\/image\/","url":"https:\/\/certillion.com\/wp-content\/uploads\/2021\/07\/Certillion-Dark.svg","contentUrl":"https:\/\/certillion.com\/wp-content\/uploads\/2021\/07\/Certillion-Dark.svg","width":218,"height":62,"caption":"E-sec Seguran\u00e7a Digital"},"image":{"@id":"https:\/\/certillion.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/certillion","https:\/\/www.linkedin.com\/company\/certillion\/","https:\/\/www.instagram.com\/certillion\/"]}]}},"_links":{"self":[{"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/pages\/8970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/comments?post=8970"}],"version-history":[{"count":0,"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/pages\/8970\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/pages\/8994"}],"wp:attachment":[{"href":"https:\/\/certillion.com\/en\/wp-json\/wp\/v2\/media?parent=8970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}