Authstate and Certificate/delete: Difference between pages

From SafeStamper API documentation
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
m (1 revision imported)
 
Line 1: Line 1:
This operation checks the status of an authorization key.
This operation deletes a certificate from Safe Stamper
 
If the authkey is authorized, it also returns information about the authorizing user account.


= URL =
= URL =
<nowiki>https://www.safestamper.com/api/authstate</nowiki>
<nowiki>https://www.safestamper.com/api/certificate/delete</nowiki>


= Parameters =
= Parameters =
* '''sharedkey''': Your API client shared key
* '''sharedkey''': Your API client shared key
* '''authkey''': Authkey to check status
* '''authkey''': Authkey of certificate owner
* '''code''': Code of certificate to delete
* '''signature''': Parameters signature, as explained in [[Signature parameter]]
* '''signature''': Parameters signature, as explained in [[Signature parameter]]


= Returns =
= Returns =


A JSON object with the following fields:
HTTP 200 OK
 
* '''authkey''': Authkey value
* '''authorized''': State of authkey (true|false).
 
If authorized parameter is true the user info is added:
 
* '''state''': State of Safe Stamper user (ACTIVE|DISABLED)
* '''userCode''': Safe Stamper code of the authorizing user.
* '''userMail''': Mail of the authorizing user.
* '''userName''': Full name of the authorizing user.
* '''accountType''': Account type of the authorizing user (BASIC|PREMIUM).
* '''userType''': User type of the authorizing user (INDIVIDUAL|ORGANIZATION|OPERATOR).
* '''mainUserAuthkey''': Authkey of main user for authorized operators.
* '''availableCertificates''': Available certification credits to use web static, mail, file and photo services.
* '''availableNavigations''': Available certification credits to use browsing session services.
* '''availableSignedDocuments''': Available signature credits to create signed documents.
* '''availableTimestamps''': Available timestamp credits to use tsa services.
* '''availableDiskSpace''': Available disk space quota
* '''maxCertificateSize''': Máx size in bytes for certificates
* '''maxCertificateSizeMb''': Máx size in MB for certificates


= HTTP Errors =
= HTTP Errors =


* '''403''' Forbidden: sharedkey or signature are not valid, or the authkey does not belong to the sharedkey
* '''401''' Unauthorized: the authkey is not exist
* '''404''' Not found: the authkey does not exist
* '''403''' Forbidden: the sharedkey or signature are not valid
* '''404''' Not found: the certificate does not exist


= Example =
= Example =
Line 44: Line 24:
REQUEST:
REQUEST:
<pre>
<pre>
https://www.safestamper.com/api/authstate
https://www.safestamper.com/api/certificate/delete
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
&code=150121-6MY3TJ
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&signature=f9e0222c2fcacbea7923552128a9d395d122e963
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77
</pre>
</pre>


RESPONSE (actual response has no line breaks or indentation):
RESPONSE:
<pre>
 
{
HTTP 200 OK
    "accountType":"PREMIUM",
    "authkey":"0021d81c-e4a5-4869-8384-2fd70cdb58ec",
    "authorized":true,
    "availableCertificates":50,
    "availableNavigations":3,
    "availableTimestamps":10,
    "availableDiskSpace": 113435435
    "maxCertificateSize":"22500000"
    "maxCertificateSizemB":"15"
    "state":"ACTIVE",
    "userCode":"1612020000541",
    "userMail" : "apitest@safecreative.org",
    "userName":"Api User Test"
    "userType":"INDIVIDUAL"
}
</pre>

Latest revision as of 15:27, 17 October 2023

This operation deletes a certificate from Safe Stamper

URL

https://www.safestamper.com/api/certificate/delete

Parameters

  • sharedkey: Your API client shared key
  • authkey: Authkey of certificate owner
  • code: Code of certificate to delete
  • signature: Parameters signature, as explained in Signature parameter

Returns

HTTP 200 OK

HTTP Errors

  • 401 Unauthorized: the authkey is not exist
  • 403 Forbidden: the sharedkey or signature are not valid
  • 404 Not found: the certificate does not exist

Example

REQUEST:

https://www.safestamper.com/api/certificate/delete
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
&code=150121-6MY3TJ
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77

RESPONSE:

HTTP 200 OK