NotificationTemplate

In this document:

GraphViz

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "NotificationTemplate",
  "id": "http://com.odin.platform/inhouse-products/notificationTemplate/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "access": {
    "global": true
  },
  "properties": {
    "templateName": {
      "type": "string",
      "title": "Notification Template Name"
    },
    "content": {
      "type": "string",
      "title": "Content of email template"
    },
    "templateType": {
      "type": "string",
      "title": "Notification Type",
      "enum": [
        "welcome_email",
        "expiration_email"
      ]
    }
  },
  "structures": {
    "TemplateType": {
      "type": "object"
    }
  }
}

The APS type is used to manage a collection of APS resources. To get a list of resources from that collection, use the following API call:

GET  /aps/2/collections/notification-templates?<RQL-filter>

Properties

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

templateName

String

Not Required

content

String

Not Required

templateType

Enum

Not Required

Structures

TemplateType

welcome_email - The Welcome Email type
expiration_email - The Expiration Email type

Examples

List of Notification Templates

To get a list of all notification templates in BSS, the management system must issue the following request:

GET /aps/2/collections/notification-templates

A response will look similar to this:

HTTP/1.1 200 OK

[
   {
      "aps": {
         "type": "http://www.odin.com/billing/NotificationTemplate/1.0",
         "id": "f4e88d66-fbaf-407b-947b-9ac687d96f37",
         "status": "aps:ready",
         "revision": 2,
         "modified": "2017-08-03T13:12:03Z"
      },
      "name": "Credit Memo"
   },
   /* ... */
]

Notification Template Details

If the management system knows the APS ID of a notification template it can request its full JSON representation as in the following example:

GET /aps/2/resources/f4e88d66-fbaf-407b-947b-9ac687d96f37

The notification template representation will look like in the following response:

HTTP/1.1 200 OK

{
   "aps": {
      "type": "http://www.odin.com/billing/NotificationTemplate/1.0",
      "id": "f4e88d66-fbaf-407b-947b-9ac687d96f37",
      "status": "aps:ready",
      "revision": 2,
      "modified": "2017-08-03T13:12:03Z",
      "schema": "/aps/2/types/103",
      "package": {
         "id": "4bfbda2d-8e71-45ba-b3b6-ff7a2485a178",
         "href": "/aps/2/packages/4bfbda2d-8e71-45ba-b3b6-ff7a2485a178"
      }
   },
   "name": "Credit Memo"
}