Notification/send

From Safe Stamper API
Jump to: navigation, search

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
  • recipientPhoneN: (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": ""
   }
]