Notification/delete and Notification/send: Difference between pages

From SafeStamper API documentation
(Difference between pages)
Jump to navigation Jump to search
api>Admin
 
api>Admin
No edit summary
 
Line 1: Line 1:
This operation deletes a notification from Safe Stamper
This operation sends a notification to destinataries


= URL =
= URL =
<nowiki>https://www.safestamper.com/api/notification/delete</nowiki>
<nowiki>https://web.safestamper.com/api/notification/send</nowiki>


= Parameters =
= Parameters =
* '''sharedkey''': Your API client shared key
* '''sharedkey''': Your API client shared key
* '''authkey''': Authkey of notification owner
* '''authkey''': Authkey of notification owner
* '''code''': Code of notification to delete
* '''recipientTypeN''': (multivalue) Send type of notification.
* '''recipientNameN''': (multivalue) Name of recipient of notification
* '''recipientMailN''': (multivalue) Mail of recipient of notification. In recipientTypeN equals EMAIL
* '''recipientSmsN''': (multivalue) Phone of recipient of notification. In recipientTypeN equals SMS
* '''subject''': Subject of the notification
* '''body''': text of the notification
* '''attachment''': Attach file of notification
* '''signature''': Parameters signature, as explained in [[Signature parameter]]
* '''signature''': Parameters signature, as explained in [[Signature parameter]]
** '''NOTE''': When calculating the signature use the attachment file name as the value of file parameter


= Returns =
= Returns =


HTTP 200 OK
A JSON object with list of following fields:
 
* '''entryDate''': Date of notification
* '''code''': Notification code
* '''uuid''': Notification uuid
* '''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


= HTTP Errors =
= HTTP Errors =


* '''401''' Unauthorized: the authkey is not exist
* '''401''' Unauthorized: the authkey does not exist or is not authorized
* '''403''' Forbidden: the sharedkey or signature are not valid
* '''403''' Forbidden: the sharedkey or signature are not valid
* '''404''' Not found: the notification does not exist


= Example =
= Example =
Line 24: Line 44:
REQUEST:
REQUEST:
<pre>
<pre>
https://www.safestamper.com/api/notification/delete
https://web.safestamper.com/api/notification/send
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
&code=170316-6K5D2Q
&recipientType1=EMAIL
&recipientMail1=sample@mail.com
&recipientName1=Sample
&subject=Example+notification
&body=Notification+text
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77
</pre>
</pre>


RESPONSE:
RESPONSE (actual response has no line breaks or indentation):
 
<pre>
HTTP 200 OK
[
  {
      "entryDate": "2017-03-16T12:59:08Z",
      "code": "170316-6K5D2Q",
      "uuid": "a59e091e-2338-4037-b383-91235bc0f9f3",
      "state": "PENDING",
      "subject": "Example notification",
      "body": "Notification text"
      "recipientType": "EMAIL",
      "recipientMail": "sample@mail.com",
      "recipientName": "Sample"
      "recipientPhone": ""
  }
]
</pre>

Revision as of 13:28, 8 February 2022

This operation sends a notification to destinataries

URL

https://web.safestamper.com/api/notification/send

Parameters

  • sharedkey: Your API client shared key
  • authkey: Authkey of notification owner
  • recipientTypeN: (multivalue) Send type of notification.
  • recipientNameN: (multivalue) Name of recipient of notification
  • recipientMailN: (multivalue) Mail of recipient of notification. In recipientTypeN equals EMAIL
  • recipientSmsN: (multivalue) Phone of recipient of notification. In recipientTypeN equals SMS
  • subject: Subject of the notification
  • body: text of the notification
  • attachment: Attach file of notification
  • signature: Parameters signature, as explained in Signature parameter
    • NOTE: When calculating the signature use the attachment file name as the value of file parameter

Returns

A JSON object with list of following fields:

  • entryDate: Date of notification
  • code: Notification code
  • uuid: Notification uuid
  • 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

HTTP Errors

  • 401 Unauthorized: the authkey does not exist or is not authorized
  • 403 Forbidden: the sharedkey or signature are not valid

Example

REQUEST:

https://web.safestamper.com/api/notification/send
?authkey=0021d81c-e4a5-4869-8384-2fd70cdb58ec
&recipientType1=EMAIL
&recipientMail1=sample@mail.com
&recipientName1=Sample
&subject=Example+notification
&body=Notification+text
&sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh
&signature=b1b22b34967fdf2eb67c3569a1e8b90f9fb63e77

RESPONSE (actual response has no line breaks or indentation):

[
   {
      "entryDate": "2017-03-16T12:59:08Z",
      "code": "170316-6K5D2Q",
      "uuid": "a59e091e-2338-4037-b383-91235bc0f9f3",
      "state": "PENDING",
      "subject": "Example notification",
      "body": "Notification text"
      "recipientType": "EMAIL",
      "recipientMail": "sample@mail.com",
      "recipientName": "Sample"
      "recipientPhone": ""
   }
]