Login and Newoperator: Difference between pages
(Difference between pages)
m (1 revision imported) |
api>Admin (Created page with "This operation creates an authorized operator for the subscription. The operator can use the suscription account but just allow manage the own data and certificates = URL = <...") |
||
Line 1: | Line 1: | ||
This operation | This operation creates an authorized operator for the subscription. The operator can use the suscription account but just allow manage the own data and certificates | ||
= URL = | = URL = | ||
<nowiki>https:// | <nowiki>https://www.safestamper.com/api/newoperator</nowiki> | ||
= Parameters = | = Parameters = | ||
* '''authkey''': Authkey of main user | |||
* '''sharedkey''': Your API client shared key | * '''sharedkey''': Your API client shared key | ||
* '''signature''': Parameters signature, as explained in [[Signature parameter]] | * '''signature''': Parameters signature, as explained in [[Signature parameter]] | ||
* '''mail:''' user mail | |||
* '''firstName?:''' first name of the user | |||
* '''lastName?:''' last name of the user | |||
= Returns = | |||
A JSON object with the authkey status, as returned in [[authstate]]: | |||
* '''authkey''': Authkey value | |||
* '''authorized''': State of authkey (true|false). | |||
* '''state''': State of Safe Stamper operator (ACTIVE|DISABLED) | |||
* '''userCode''': Safe Stamper code of the authorizing operator. | |||
* '''userMail''': Mail of the authorizing operator. | |||
* '''userName''': Full name of the authorizing operator. | |||
* '''accountType''': Account type of the main user (PREMIUM). | |||
* '''userType''': User type of the authorizing operator (OPERATOR). | |||
* '''mainUserAuthkey''': Authkey of main user for authorized operator. | |||
* '''availableCertificates''': Available certification credits to use web static, mail, file and photo services. | |||
* '''availableNavigations''': Available certification credits to use browsing session services. | |||
* '''availableTimestamps''': Available timestamp credits to use tsa services. | |||
* '''maxCertificateSize''': Máx size in bytes for certificates | |||
* '''maxCertificateSizeMb''': Máx size in MB for certificates | |||
= HTTP Errors = | = HTTP Errors = | ||
* ''' | * '''400''' Bad Request: the countrycode or accounttype are not valid, or firstname and lastname are empty | ||
* '''401''' | * '''401''' Unauthorized: accounttype is sended but you are not a partner | ||
* '''403''' Forbidden: the sharedkey is not valid, is mail exists in Safe Stamper and user is deleted | |||
* '''429''' Forbidden: user doesn't have quota available for create new operator | |||
* '''432''' Forbidden: user doesn't have professional subscription enabled | |||
= Example = | = Example = | ||
Line 20: | Line 42: | ||
REQUEST: | REQUEST: | ||
<pre> | <pre> | ||
https:// | https://www.safestamper.com/api/newoperator | ||
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec& | ?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec | ||
&mail=api.operator@safecreative.org | |||
&firstname=Api%2C+Operator | |||
&lastname=1 | |||
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh | |||
&signature=35e157d8539fd66ca385fabb8967d4e8f180056f | |||
</pre> | |||
RESPONSE (actual response has no line breaks or indentation): | |||
<pre> | |||
{ | |||
"accountType": "PREMIUM", | |||
"authkey": "22644c3d-668c-492f-bef9-6ecf0fa8e495", | |||
"authorized": true, | |||
"state": "ACTIVE", | |||
"availableCertificates": 50, | |||
"availableNavigations": 6, | |||
"availableTimestamps": 0, | |||
"maxCertificateSize": 7500000, | |||
"maxCertificateSizeMb": 5, | |||
"userCode": "1812100000748", | |||
"userName": "Api Operator 1", | |||
"userMail": "api.operator@safecreative.org", | |||
"userType": "OPERATOR", | |||
"mainUserAuthkey": "0021d81c-e4a5-4869-8384-2fd70cdb58ec" | |||
} | |||
</pre> | </pre> |
Revision as of 16:34, 11 December 2018
This operation creates an authorized operator for the subscription. The operator can use the suscription account but just allow manage the own data and certificates
URL
https://www.safestamper.com/api/newoperator
Parameters
- authkey: Authkey of main user
- sharedkey: Your API client shared key
- signature: Parameters signature, as explained in Signature parameter
- mail: user mail
- firstName?: first name of the user
- lastName?: last name of the user
Returns
A JSON object with the authkey status, as returned in authstate:
- authkey: Authkey value
- authorized: State of authkey (true|false).
- state: State of Safe Stamper operator (ACTIVE|DISABLED)
- userCode: Safe Stamper code of the authorizing operator.
- userMail: Mail of the authorizing operator.
- userName: Full name of the authorizing operator.
- accountType: Account type of the main user (PREMIUM).
- userType: User type of the authorizing operator (OPERATOR).
- mainUserAuthkey: Authkey of main user for authorized operator.
- availableCertificates: Available certification credits to use web static, mail, file and photo services.
- availableNavigations: Available certification credits to use browsing session services.
- availableTimestamps: Available timestamp credits to use tsa services.
- maxCertificateSize: Máx size in bytes for certificates
- maxCertificateSizeMb: Máx size in MB for certificates
HTTP Errors
- 400 Bad Request: the countrycode or accounttype are not valid, or firstname and lastname are empty
- 401 Unauthorized: accounttype is sended but you are not a partner
- 403 Forbidden: the sharedkey is not valid, is mail exists in Safe Stamper and user is deleted
- 429 Forbidden: user doesn't have quota available for create new operator
- 432 Forbidden: user doesn't have professional subscription enabled
Example
REQUEST:
https://www.safestamper.com/api/newoperator ?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec &mail=api.operator@safecreative.org &firstname=Api%2C+Operator &lastname=1 &sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh &signature=35e157d8539fd66ca385fabb8967d4e8f180056f
RESPONSE (actual response has no line breaks or indentation):
{ "accountType": "PREMIUM", "authkey": "22644c3d-668c-492f-bef9-6ecf0fa8e495", "authorized": true, "state": "ACTIVE", "availableCertificates": 50, "availableNavigations": 6, "availableTimestamps": 0, "maxCertificateSize": 7500000, "maxCertificateSizeMb": 5, "userCode": "1812100000748", "userName": "Api Operator 1", "userMail": "api.operator@safecreative.org", "userType": "OPERATOR", "mainUserAuthkey": "0021d81c-e4a5-4869-8384-2fd70cdb58ec" }