View Template


                https://api.ocamba.com/v1/hood/templates/{id}
            

Retrieves the details of an Template if a valid identifier was provided.


Name
Description
idstringrequired
Unique resource identifier.


Example: 12345

Name
Description
fieldsstring
Fields parameter represents array of dimensions and measures. Dimensions are used to categorize, segment, and reveal the details of the data. Measures contain numeric, quantitative values that can be measured. At least one measure is required.


Example: fields=field1,field2,field3

viewstring
Hood API returns full representation of the resource using the "view=full" query parameter. If not specified, the default view will be used.

Note that the "fields" parameter has precedence over the "view" parameter.


Example: view=full/default


200 - OK
Arrow
Name
Description
Template
Name
Description
Adex message object.
Adex Message
Name
Description
account_idarray
Array of account ids created on Ocamba platform.


Example: 123456,654321

campaign_idarray
Array of campaign ids created on Ocamba platform.


Example: 1367890,1098763

default_campaign_idinteger
Campaign id created on Ocamba platform.


Example: 1036975

group_idarray
Array of group ids created on Ocamba platform.


Example: 113,22,374

number_of_messagesinteger
Minimal value is 1, maximal value is 10.


Example: 4

Default: 1

repeat_on_clickinteger
Repeats action on click


Example: 1

Possible values: 0 | 1

zone_idinteger
Push zone id created on Ocamba platform.


Example: 1000321

channels[ string ]
List of channel types defined in template.


Example: email,sms,push,adex

Possible values: adex | push | email | sms

company_idstring
The ID of the Company, generated by the Ocamba.


Example: 1000001

create_timestring
Timezone: GMT.


Example: 2021-10-29 12:47:00

descriptionstring
The description of the Template.


Example: This is an example of description.

Email object.
Email message
Name
Description
contentstring
The email content. string[1 .. 65535] characters.


Example: 60% Off One Item Just Added to the Sale! Click here!

preheaderstring
The preheader is the text to the right of the subject line that gives a brief preview of the email. string[1 .. 100] characters.


Example: 60% Off One Item Just Added to the Sale!

subjectstring
The subject of the email. string[1 .. 78] characters.


Example: My first email with Ocamba.

idstring
The ID of the Template, generated by the Ocamba.


Example: 1000

namestring
Name of the Template


Example: Template Example

Push message object.
Push Message
Name
Description
An array of action objects.
Push Message Action
Name
Description
iconstring
Visual attribute presented to the user. Must be a valid url.


Example: https://www.iconexample.com

titleobject
The main textual aspect as pairs of keys and values, where key represents language and value title in that language.


Example: { "en": "en_title" "de": "de_title" }

urlstring
The landing url of the action.


Example: https://www.urlexample.com

badgestring
Monochromatic mini-icon which portrays to user source where he subscribed in the first place.


Example: https://www.badgeexample.com

bodyobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 120 characters.


Example: Hello world

iconstring
Secondary visual attribute presented to the user. Must be a valid url.


Example: https://www.iconexample.com

imageobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 1000 characters.


Example: https://www.exampleimage.com/

landing_urlstring
The url of the site the user is redirected to when clicking on the notification.


Example: https://www.landingurl.com/

renotifystring
Replacing old notification with the new one using the silent method. Applicable only with tag option.


Example: 0

Possible values: 0 | 1

require_interactionstring
Demand action execution from the user. Applicable only for desktop users. Acts like a boolean.


Example: 1

Possible values: 0 | 1

silentstring
Serving notification without sound and vibration. Applicable only to mobile devices.


Example: 0

Possible values: 0 | 1

tagstring
This option enables the removal of notifications with the same tag which were delivered earlier.


Example: tag

titleobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 70 characters.


Example: Title example

vibrationstring
Two vibration pulses with customizable length and pause between them, described in milliseconds (200,100,200 formats), will start when a notification is displayed. Applicable only for Android users.


Example: 100,100,200

Sms message object.
Sms Message
Name
Description
contentobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 160 characters.


Example: Content example

shorten_links[ shorten-link ]
Array of shorten link objects, maximum length is limited by content length. If a placeholder in content has less than 23 characters it will count as 23 characters.

Telegram Message
Name
Description
contentstring
Content of the telegram message.


Example: Hello from Ocamba!

update_timestring
Timezone: GMT.


Example: 2021-10-30 14:27:26
tip
1 If you don't know the template id, list the templates to find it.
200 Arrow
{
  "id": "1001",
  "company_id": "123456",
  "name": "Template example",
  "channels": [
    "adex",
    "push"
  ],
  "push": {
    "title": {
      "en": "first title"
    },
    "landing_url": "https://example.com",
    "actions": [
      {
        "title": {
          "en": "first title"
        }
      }
    ]
  },
  "adex": {
    "zone_id": "30303030",
    "account_id": [
      "1001001",
      "2002002",
      "3003003"
    ],
    "number_of_messages": 3,
    "repeat_on_click": 0
  }
}
{}