List Templates
Copied
https://api.ocamba.com/v1/hood/templates
Copied
https://api.ocamba.com/v1/hood/templates
Returns a list of Templates
Name
Descriptionfieldsstring
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
sortstring
Sorts the response by specified field(s) with the option to specify sorting order (ascending by default, add prefix "-" for descending).Examples:
GET /VERSION/hood/RESOURCE_NAME?sort=name → sorts per name, ascending
GET /VERSION/hood/RESOURCE_NAME?sort=-id → sorts per id descending
GET /VERSION/hood/RESOURCE_NAME?sort=id,-name → sorts per id ascending, then name descending
See tips for the list of sortable fields.
Example: sort=-field1,field2
pagestring
The page number indicates which set of items will be returned in the response. The format of request is "page=N,M" where 'N' (required) represents page number and 'M' (optional) is number of items per page.Examples:
N=1, M=20 → returns page 1 with 20 items
N=2, M=20 → returns page 2 with 20 items (items 21-40)
N=3 → returns page 3. The number of objects returned depends on the resource settings.
Example: page=1,10
200 - OK
Name
Descriptionitems[ template ]
An array of all items.Template
Name
DescriptionAdex message object.
Adex Message
Name
Descriptionaccount_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 clickExample: 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
Descriptioncontentstring
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 TemplateExample: Template Example
Push message object.
Push Message
Name
Descriptionactionspush-message-action
An array of action objects.Push Message Action
Name
Descriptioniconstring
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
Descriptionkeystring
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
Descriptionkeystring
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
Descriptionkeystring
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
Descriptioncontentobject
Name
Descriptionkeystring
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.Shorten Link
Name
Descriptionexpires_innumber (integer)
The amount of time in days in which the shortened link will expire. Minimum is 1 maximum is 60. Default value is 7.Example: 4
placeholderstring
Placeholder for the url in content. It must also be present in content of the sms. Maximum length is 20.Example: URL_1
urlstring
A valid url that will be shortened. The shortened version will replace the placeholder when sending sms. Maximum length is 1000.Example: https://ocamba.com
telegramtemplate-telegram-message
Telegram Message
Name
Descriptioncontentstring
Content of the telegram message.Example: Hello from Ocamba!
update_timestring
Timezone: GMT.Example: 2021-10-30 14:27:26
totalinteger
A total number of items.Example: 32
tip
1 Sortable fields are: name, create_time and update_time.
2 Searchable fields is: name.
3 Filterable fields are: id, name, channels, create_time and update_time.
4 If you're trying to see templates by type, please apply the type filter, adding 'sms' or 'email' as a value, according to your needs.