View Campaign
Copied
https://api.ocamba.com/v1/hood/campaigns/{id}
Copied
https://api.ocamba.com/v1/hood/campaigns/{id}
Retrieves the details of a Campaigns that has previously been created if a valid identifier was provided
Name
Descriptionidstringrequired
Unique resource identifier.Example: 12345
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
200 - OK
Name
Descriptionitems[ campaigns ]
An array of all created items.Campaigns
Name
Descriptionadexobject
Name
Descriptionadex_messages[ template-adex-message ]
Array of adex message objects.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
integration_idstring
Adex channel does not have integrations, automatiacally set to 0.template_ids[ string ]
Array of valid adex template ids.archivednumber (integer)
Marks when campaign is archived.Example: 1
company_idstring
A unique identifier generated by the Ocamba.Example: 2136950
create_timestring
Timezone: GMT.Example: 2021-10-29 12:47:00
creatorobject
Name
Descriptionidstring
Id of the creator, same as creator_id.Example: 1000202
imagestring
Image of the creator.Example: https://sm.ocmcore.com/share/2136950/adex/media/image_example.jpg
namestring
Name of the creator.Example: John Smith
statusstring
Status of the creator.Example: active
creator_idstring
A unique creator identifier generated by the Ocamba platform.Example: 1000202
deal_idstring
A unique identifier for the deal associated with the Campaign.Example: 1000251
effective_statusstring
The effective status of the Campaign.Example: active
Possible values: active | draft | inactive | paused | suspended | terminated
emailobject
Name
Descriptionemail_messages[ template-email-message ]
Array of email message objects.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.
integration_idstring
Valid email integration id.Example: 1524
template_ids[ string ]
Array of valid email template ids.end_timedateTime
Schedule a campaign end time. Timezone: GMT.Example: 2024-10-27 22:32:00
financial_performancecampaign-finance
Represents the cost and revenue associated with the campaign, providing insight into the campaign's financial performance.Financial performance
Name
Descriptionitems[ campaign-finance-items ]
Array of financial performance items.Financial performance array
Name
Descriptioncoststring
Cost amount added to the campaign.Example: 500
eventstring
Describes if the item shows cost or revenue.Example: cost
Possible values: cost | revenue
event_datedate
Date when cost or revenue is added.Example: 2024-10-01
event_namestring
Used to assign names to cost/revenue events.Example: Cost
revenuestring
Revenue amount added to the campaign.Example: 500
profitstring
Profit of the campaign.Example: 300
finishednumber (integer)
Marks when campaign is finished.Example: 1
idstring
A unique identifier generated by the Ocamba.Example: 1000248
is_runningboolean
Indicates whether the Campaign is currently in an active running state.Example: true
Possible values: true | false
labels[ string ]
Array of labels names.Example: cars,marketing
last_run_timedateTime
The last time the campaign was run. Timezone: GMT.Example: 2024-10-06 10:00:00
max_runsnumber (integer)
The maximum number of times a Campaign can be run.Example: 10
metadataobject
Name
Descriptionkeystring
Key for the metadata. Maximum 40 characters.Example: key
valuestring
Value for the metadata. Maximum 500 characters.Example: value
namestring
Name of the campaign, max 100 characters.Example: My first campaign
next_run_timedateTime
The time when campaign will be run next time. Timezone: GMT.Example: 2024-10-06 12:00:00
pushobject
Name
Descriptionadex_messages[ template-push-message ]
Array of push message objects.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
integration_idstring
Push channel does not have integrations, automatiacally set to 0.template_ids[ string ]
Array of valid push template ids.quiet_timequiet-time
Quiet time object.Quiet Time
Name
Descriptionfromnumber (integer)
An integer between 0 and 23 including those numbers. Describes the starting of quiet time.Example: 2
tonumber (integer)
An integer between 0 and 23 including those numbers. Describes the ending of quiet time.Example: 12
repeat_with_cron[ campaign-cron ]
Defines the campaign's schedule through an array of objects.RepeatWithCron
Name
Descriptioncronstring
A cron expression automatically generated based on the provided minute, hour, day of the month, month, and day of the week values.Example: 0 1,3 * 2 *
days_of_montharray
An array of unique values specifying the day(s) of the month the Campaign should run. Valid values range from 1 to 31.Example: 5
days_of_weekarray
An array of unique values specifying the day(s) of the week the Campaign should run. 0 represents Sunday and 6 represents Saturday.Example: 0,4
hoursarray
An array of unique values specifying the hour(s) of the day the Campaign should run. Valid values range from 0 to 23.Example: 10
minutesarray
An array of unique values specifying the minute(s) of the hour the Campaign should run. Valid values range from 0 to 59.Example: 5
monthsarray
An array of unique values specifying the month(s) the Campaign should run. Valid values range from 1 to 12.Example: 12
repeat_with_ticker[ campaign-ticker ]
Defines the campaign's schedule through an array of objects.Time interval
Name
Descriptiondays_of_weekarray
Specifies the days of the week when the campaign will run, using an array of values where each number represents a day (e.g., 0 for Sunday, 6 for Saturday). For example, 2,5 would represent Tuesday and Friday.Example: 2,5
hournumber (integer)
Specifies the time interval in hours at which the campaign will execute.Example: 2
start_fromdateTime
The starting date and time from which the time interval will begin.Example: 2024-10-02 15:00
repeat_with_timearray (date-time)
Specifies the exact dates and times when the Campaign is scheduled to run.Example: 2024-10-12 07:27:12,2024-10-12 07:27:12
scheduled_run_timesobject
Name
Descriptioninitiatorstring
Describes what launched Campaign last time, which could be time, time_pattern, time_interval and webhook.Example: Time
timedateTime
The exact date and time when the last Campaign run was initiated.Example: 2024-10-06 15:04:00
scorenumber (integer)
Campaign performance score.Example: 20
send_if_user_time_passedboolean
Send notification to users even if user time zone already passed.Example: true
Possible values: true | false
send_in_user_time_zoneboolean
Send notification to users based on their own local time zones.Example: true
Possible values: true | false
smsobject
Name
Descriptionintegration_idstring
Valid sms integration id.Example: 1511
sms_messages[ template-sms-message ]
Array of sms message objects.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
template_ids[ string ]
Array of valid sms template ids.start_timedateTime
Schedule a campaign start time. Timezone: GMT.Example: 2024-10-05 22:32:00
statscampaign-stats
Statistics about the Campaign in the last 100 days.Campaign stats
Name
Descriptionchurnnumber (decimal)
The number of total unsubscriptions.Example: 11.52
conversionnumber (integer)
The number of conversions.Example: 11
deliverednumber (integer)
The number of delivered.Example: 11
failednumber (integer)
The number of failed.Example: 11
total_usernumber (integer)
The total number of users.Example: 11
statusstring
The status of the Campaign.Example: active
Possible values: active | draft | inactive | paused | suspended
targetingcampaign-targeting
Targeting object.Campaign targeting
Name
Descriptionapplication_groupsobject
Name
Descriptionitems[ string ]
Array of hood application group ids created by the Ocamba platform.opstring
Example: neq
Possible values: eq | neq
applicationsobject
Name
Descriptionitems[ string ]
List of application ids with unique items and minimum length of 1. Every item should be valid full qualified domain name and can contain star (*).opstring
Example: eq
Possible values: eq | neq
browsersobject
Name
Descriptionitems[ string ]
Array of browser ids supported by Ocamba, max 100 items.opstring
Example: eq
Possible values: eq | neq
containersobject
Name
Descriptionitems[ string ]
Array of hood containers ids created on Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
countriesobject
Name
Descriptionitems[ string ]
Array of country codes supported by Ocamba (ISO 3166-1, 2 letter country codes), max 270 items.opstring
Example: eq
Possible values: eq | neq
groupsobject
Name
Descriptionitems[ string ]
Array of hood group ids created on Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
languagesobject
Name
Descriptionitems[ string ]
Array of language codes supported by Ocamba (ISO 639-2, 2 letter language codes), max 50 items.opstring
Example: eq
Possible values: eq | neq
osobject
Name
Descriptionitems[ string ]
Array of os ids supported by Ocamba, max 50 items.opstring
Example: eq
Possible values: eq | neq
partnersobject
Name
Descriptionitems[ string ]
List of partner ids with unique items and minimum length of 1.opstring
Example: eq
Possible values: eq | neq
regionsobject
Name
Descriptionitems[ string ]
Region ids.opstring
Example: eq
Possible values: eq | neq
remote_usersobject
Name
Descriptionitems[ string ]
Array of remote user ids maximum length of 100, tracked by Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
subscribed_ageobject
Name
Descriptionfromnumber (integer)
Number in range 0-3500Example: 10
tonumber (integer)
Number in range 1-3500. Must be greater than 'from' field.Example: 100
user_dataobject
Name
Descriptionkeystring
Key can be any string which represents user specific data, max 100 characters. Key will be sanitized by removing leading and trailing whitespace, replacing all consecutive non-leading and non-trailing whitespaces with a single underscore, converting all character to lowercase and using only first 100 characters if there are over 100 characters.valueobject
Name
Descriptionitems[ string ]
Array of values, maximum 10 items.opstring
Example: eq
Possible values: eq | neq
usersobject
Name
Descriptionitems[ string ]
Array of user ids tracked by Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
telegramobject
Name
Descriptionintegration_idstring
Valid telegram integration id.Example: 1531
telegram_messages[ template-telegram-message ]
Array of telegram message objects.Telegram Message
Name
Descriptioncontentstring
Content of the telegram message.Example: Hello from Ocamba!
template_ids[ string ]
Array of valid telegram template ids.update_timestring
Timezone: GMT.Example: 2021-10-30 14:27:26
webhooks[ campaign-webhooks ]
Defines an array of webhook objects, with a maximum of 3 entries.Webhooks
Name
Descriptionidstring
A unique identifier (UUID) generated by the Ocamba for each webhook.Example: 004e7a03-a871-47a6-a291-b07d7b8aa03b
namestring
A user-provided name for the webhook, which must be unique within the array.Example: webhook example
urlstring
The URL for the webhook, automatically generated by the Ocamba.Example: api.ocamba.com/v1/hood/webhooks/004e7a03-a871-47a6-a291-b07d7b8aa03b
totalinteger
A total number of items.Example: 1
500 - Internal Server Error
Name
Descriptioncodeinteger
Http response status code.Example: 500
messagestring
The human readable message that describes how to deal with error.Example: Internal server error.
titlestring
The error title.Example: Internal server error.
tip
1 If you don't know the campaign id, list the campaigns to find it.