Notifications and Operators: Difference between pages

From SafeStamper API documentation
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
api>Admin
 
Line 1: Line 1:
This operation lists the notifications of the authorizing user.
This operation lists the authorized operators that can use the subscription account


= URL =
= URL =
<nowiki>https://www.safestamper.com/api/notifications</nowiki>
<nowiki>https://www.safestamper.com/api/operators</nowiki>


= Parameters =
= Parameters =
* '''sharedkey''': Your API client shared key
* '''sharedkey''': Your API client shared key
* '''authkey''': Authorization key
* '''authkey''': Authkey of main user to list the authorized operators
* '''fromDate''': Return notifications sent from this date on (optional, format yyyy-MM-dd)
* '''toDate''': Return notifications sent up to this date (optional, format yyyy-MM-dd)
* '''filter''': Text for searching notifications (optional)
* '''page''': Page number to return (optional, defaults to 1)
* '''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:
= Returns =
 
A JSON list object with the following fields:
 
* '''authkey''': Authkey value
* '''authorized''': State of authkey (true|false).
* '''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.
* '''availableTimestamps''': Available timestamp credits to use tsa services.
* '''maxCertificateSize''': Máx size in bytes for certificates
* '''maxCertificateSizeMb''': Máx size in MB for certificates


* '''pageSize''': Maximum number of notifications per page
* '''count''': Total number of notifications
* '''pageTotal''': Total number of pages
* '''list''': array of JSON with the notification data
** '''entryDate''': Date of notification
** '''code''': Notification code
** '''subject''': Subject of notification
** '''body''': Body content of notification
** '''recipientType''': Send type of the notification
** '''recipientMail''': E-mail address of the notification recipient
** '''recipientPhone''': Phone of the notification recipient
** '''recipientName''': Name of the notification recipient
** '''attachmentName''': Attachment name of notification
** '''state''': State of notification
*** ''PENDING'' The notification is pending to read
*** ''READ'' The notificaction has been read
** '''certificates''': List of certificates generated from this notification
*** '''entryDate''': Date of certificate
*** '''code''': Certificate code
*** '''url''': Public URL for certificate download
** '''readings''': List of readings of this notification
*** '''ip''': IP from which the notification was read
*** '''country''': Country code from which the notification was read
*** '''city''': City from which the notification was read
*** '''date''': Date read
*** '''downloadAttachment''': Indicates if the attachment was downloaded


= HTTP Errors =
= HTTP Errors =


* '''403''' Forbidden: the sharedkey or signature are not valid
 
* '''401''' Unauthorized: authkey is not valid or not authorized
* '''401''' Unauthorized: the authkey is not valid
* '''403''' Forbidden: the sharedkey is not valid


= Example =
= Example =
Line 53: Line 41:
REQUEST:
REQUEST:
<pre>
<pre>
https://www.safestamper.com/api/notifications
https://www.safestamper.com/api/operators
?authkey=0dbb406d-cc0c-4ef8-ae80-971ed108c2f9
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77
&signature=f9e0222c2fcacbea7923552128a9d395d122e963
</pre>
</pre>


RESPONSE (actual response has no line breaks or indentation):
RESPONSE:
<pre>
{
  "pageSize": 50,
  "count": 1,
  "pageTotal": 1,
  "list": [
    {
      "entryDate": "2017-03-16T12:59:08Z",
      "code": "170316-6K5D2Q",
      "state": "READ",
      "subject": "Example notification",
      "body": "Notification text",
      "recipientType": "EMAIL",
      "recipientMail": "jdoe@example.com",
      "recipientPhone": "",
      "recipientName": "John Doe",
      "certificates": [
        {
          "entryDate": "2017-03-16T12:59:44Z",
          "code": "170316-WMZMFS",
          "url": "http:\/\/www.safestamper.com\/certificate\/170316-WMZMFS",
        }],
      "readings": [
        {
          "ip": "127.0.0.1",
          "date": "2017-03-16T12:59:34Z",
          "downloadAttachment": "false"
        }]
    }}


}
[
</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"
  },
  {
    "accountType": "PREMIUM",
    "authkey": "b25dde02-2376-4af0-bf0f-f8be600b0028",
    "authorized": true,
    "state": "DISABLED",
    "availableCertificates": 50,
    "availableNavigations": 6,
    "availableTimestamps": 0,
    "maxCertificateSize": 7500000,
    "maxCertificateSizeMb": 5,
    "userCode": "1812100000762",
    "userName": "Api Operator 2",
    "userMail": "api.operator2@safecreative.org",
    "userType": "OPERATOR",
    "mainUserAuthkey": "0021d81c-e4a5-4869-8384-2fd70cdb58ec"
  }
]

Revision as of 16:32, 11 December 2018

This operation lists the authorized operators that can use the subscription account

URL

https://www.safestamper.com/api/operators

Parameters

  • sharedkey: Your API client shared key
  • authkey: Authkey of main user to list the authorized operators
  • signature: Parameters signature, as explained in Signature parameter

Returns

Returns

A JSON list object with the following fields:

  • authkey: Authkey value
  • authorized: State of authkey (true|false).
  • 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.
  • 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

  • 401 Unauthorized: the authkey is not valid
  • 403 Forbidden: the sharedkey is not valid

Example

REQUEST:

https://www.safestamper.com/api/operators
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&signature=f9e0222c2fcacbea7923552128a9d395d122e963

RESPONSE:

[

 {
   "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"
 },
 {
   "accountType": "PREMIUM",
   "authkey": "b25dde02-2376-4af0-bf0f-f8be600b0028",
   "authorized": true,
   "state": "DISABLED",
   "availableCertificates": 50,
   "availableNavigations": 6,
   "availableTimestamps": 0,
   "maxCertificateSize": 7500000,
   "maxCertificateSizeMb": 5,
   "userCode": "1812100000762",
   "userName": "Api Operator 2",
   "userMail": "api.operator2@safecreative.org",
   "userType": "OPERATOR",
   "mainUserAuthkey": "0021d81c-e4a5-4869-8384-2fd70cdb58ec"
 }

]