View Campaign


                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
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


200 - OK
Arrow
Name
Description
items[ campaigns ]
An array of all created items.
Campaigns
Name
Description
adexobject

Name
Description
adex_messages[ template-adex-message ]
Array of adex message objects.
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

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
Description
idstring
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
Description
email_messages[ template-email-message ]
Array of email message objects.
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.

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
Description
Array of financial performance items.
Financial performance array
Name
Description
coststring
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
Description
keystring
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
Description
adex_messages[ template-push-message ]
Array of push message objects.
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

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
Description
fromnumber (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
Description
cronstring
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
Description
days_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
Description
initiatorstring
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
Description
integration_idstring
Valid sms integration id.


Example: 1511

sms_messages[ template-sms-message ]
Array of sms message objects.
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.

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

Statistics about the Campaign in the last 100 days.
Campaign stats
Name
Description
churnnumber (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

Targeting object.
Campaign targeting
Name
Description
application_groupsobject

Name
Description
items[ string ]
Array of hood application group ids created by the Ocamba platform.

opstring



Example: neq

Possible values: eq | neq

applicationsobject

Name
Description
items[ 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
Description
items[ string ]
Array of browser ids supported by Ocamba, max 100 items.

opstring



Example: eq

Possible values: eq | neq

containersobject

Name
Description
items[ string ]
Array of hood containers ids created on Ocamba platform, max 100 items.

opstring



Example: eq

Possible values: eq | neq

countriesobject

Name
Description
items[ 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
Description
items[ string ]
Array of hood group ids created on Ocamba platform, max 100 items.

opstring



Example: eq

Possible values: eq | neq

languagesobject

Name
Description
items[ 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
Description
items[ string ]
Array of os ids supported by Ocamba, max 50 items.

opstring



Example: eq

Possible values: eq | neq

partnersobject

Name
Description
items[ string ]
List of partner ids with unique items and minimum length of 1.

opstring



Example: eq

Possible values: eq | neq

regionsobject

Name
Description
items[ string ]
Region ids.

opstring



Example: eq

Possible values: eq | neq

remote_usersobject

Name
Description
items[ 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
Description
fromnumber (integer)
Number in range 0-3500


Example: 10

tonumber (integer)
Number in range 1-3500. Must be greater than 'from' field.


Example: 100

user_dataobject

Name
Description
keystring
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
Description
items[ string ]
Array of values, maximum 10 items.

opstring



Example: eq

Possible values: eq | neq

usersobject

Name
Description
items[ string ]
Array of user ids tracked by Ocamba platform, max 100 items.

opstring



Example: eq

Possible values: eq | neq

telegramobject

Name
Description
integration_idstring
Valid telegram integration id.


Example: 1531

telegram_messages[ template-telegram-message ]
Array of telegram message objects.
Telegram Message
Name
Description
contentstring
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
Description
idstring
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
Arrow
Name
Description
codeinteger
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.
200 Arrow
{
  "total": 1,
  "items": [
    {
      "id": "1000248",
      "company_id": "2136950",
      "creator_id": "1000202",
      "creator": {
        "id": "1000202",
        "name": "John Smith",
        "status": "active",
        "image": "https://sm.ocmcore.com/share/2136950/adex/media/image_example.jpg"
      },
      "financial_performance": {
        "items": [
          {
            "event_name": "Cost",
            "event": "cost",
            "event_date": "2024-10-01",
            "cost": "500",
            "revenue": "500"
          }
        ],
        "profit": "300"
      },
      "name": "My first campaign",
      "labels": [
        null
      ],
      "metadata": {
        "key": "key",
        "value": "value"
      },
      "is_running": true,
      "start_time": "2024-10-05 22:32:00",
      "end_time": "2024-10-27 22:32:00",
      "next_run_time": "2024-10-06 12:00:00",
      "last_run_time": "2024-10-06 10:00:00",
      "repeat_with_cron": [
        {
          "minutes": "5",
          "hours": "10",
          "days_of_month": "5",
          "months": "12",
          "days_of_week": "0,4",
          "cron": "0 1,3 * 2 *"
        }
      ],
      "repeat_with_ticker": [
        {
          "hour": 2,
          "days_of_week": "2,5",
          "start_from": "2024-10-02 15:00"
        }
      ],
      "repeat_with_time": "2024-10-12 07:27:12,2024-10-12 07:27:12",
      "status": "active",
      "effective_status": "active",
      "send_in_user_time_zone": true,
      "send_if_user_time_passed": true,
      "quiet_time": {
        "from": 2,
        "to": 12
      },
      "scheduled_run_times": {
        "time": "2024-10-06 15:04:00",
        "initiator": "Time"
      },
      "max_runs": 10,
      "webhooks": [
        {
          "id": "004e7a03-a871-47a6-a291-b07d7b8aa03b",
          "name": "webhook example",
          "url": "api.ocamba.com/v1/hood/webhooks/004e7a03-a871-47a6-a291-b07d7b8aa03b"
        }
      ],
      "push": {
        "template_ids": [
          1875
        ],
        "adex_messages": [
          {
            "title": {
              "key": "en",
              "value": "Title example"
            },
            "body": {
              "key": "en",
              "value": "Hello world"
            },
            "image": {
              "key": "en",
              "value": "https://www.exampleimage.com/"
            },
            "landing_url": "https://www.landingurl.com/",
            "icon": "https://www.iconexample.com",
            "tag": "tag",
            "require_interaction": "1",
            "renotify": "0",
            "silent": "0",
            "vibration": "100,100,200",
            "badge": "https://www.badgeexample.com",
            "actions": {
              "title": "{\n  \"en\": \"en_title\"\n  \"de\": \"de_title\"\n}",
              "icon": "https://www.iconexample.com",
              "url": "https://www.urlexample.com"
            }
          }
        ]
      },
      "adex": {
        "template_ids": [
          1842
        ],
        "adex_messages": [
          {
            "zone_id": 1000321,
            "account_id": "123456,654321",
            "campaign_id": "1367890,1098763",
            "group_id": "113,22,374",
            "default_campaign_id": 1036975,
            "number_of_messages": 4,
            "repeat_on_click": 1
          }
        ]
      },
      "sms": {
        "integration_id": "1511",
        "template_ids": [
          1823
        ],
        "sms_messages": [
          {
            "content": {
              "key": "en",
              "value": "Content example"
            },
            "shorten_links": [
              {
                "placeholder": "URL_1",
                "url": "https://ocamba.com",
                "expires_in": 4
              }
            ]
          }
        ]
      },
      "email": {
        "integration_id": "1524",
        "template_ids": [
          1803
        ],
        "email_messages": [
          {
            "subject": "My first email with Ocamba.",
            "preheader": "60% Off One Item Just Added to the Sale!",
            "content": "60% Off One Item Just Added to the Sale! Click here!"
          }
        ]
      },
      "telegram": {
        "integration_id": "1531",
        "template_ids": [
          1891
        ],
        "telegram_messages": [
          {
            "content": "Hello from Ocamba!"
          }
        ]
      },
      "targeting": {
        "countries": {
          "items": [
            "US"
          ],
          "op": "eq"
        },
        "languages": {
          "items": [
            "en"
          ],
          "op": "eq"
        },
        "os": {
          "items": [
            "4"
          ],
          "op": "eq"
        },
        "browsers": {
          "items": [
            "12"
          ],
          "op": "eq"
        },
        "containers": {
          "items": [
            "2309876111"
          ],
          "op": "eq"
        },
        "users": {
          "items": [
            "101010"
          ],
          "op": "eq"
        },
        "groups": {
          "items": [
            "164"
          ],
          "op": "eq"
        },
        "application_groups": {
          "items": [
            "1014"
          ],
          "op": "neq"
        },
        "regions": {
          "items": [
            "2661876"
          ],
          "op": "eq"
        },
        "subscribed_age": {
          "from": 10,
          "to": 100
        },
        "user_data": {
          "value": {
            "items": [
              "foo"
            ],
            "op": "eq"
          }
        },
        "partners": {
          "items": [
            "2661876"
          ],
          "op": "eq"
        },
        "applications": {
          "items": [
            "2661876"
          ],
          "op": "eq"
        },
        "remote_users": {
          "items": [
            "9464779a-decc-4016-8eec-d56c4e384aa5"
          ],
          "op": "eq"
        }
      },
      "deal_id": "1000251",
      "score": 20,
      "stats": {
        "total_user": 11,
        "delivered": 11,
        "failed": 11,
        "conversion": 11,
        "churn": 11.52
      },
      "archived": 1,
      "finished": 1,
      "create_time": "2021-10-29 12:47:00",
      "update_time": "2021-10-30 14:27:26"
    }
  ]
}
{
  "code": 500,
  "title": "Internal server error.",
  "message": "Internal server error."
}