ads.create
Parameters
struct |
user { |
|
string |
session |
Session (as retrieved from client.loginByToken() )
|
int |
userId |
(optional) User ID
|
|
} |
|
|
array |
ads ( |
|
struct |
{ |
|
int |
requestId |
(optional) Chosen id to identify item in response and diagnostics
|
int |
groupId |
ID of the group where the ad will be placed
|
string |
adType |
(optional) Type of created ad: [default: eta]
-
eta :
Extended ad
-
combined :
Combined ad
-
branding :
Branding ad
-
dynamicBanner :
Dynamic banner
|
string |
name |
Ad name (only for adType in ["branding"])
|
string |
headline1 |
Headline 1 (only for adType="eta")
|
string |
headline2 |
Headline 2 (only for adType="eta")
|
string |
headline3 |
(optional) Headline 3 (only for adType="eta")
|
string |
path1 |
(optional) Part path 1 (only for adType="eta")
|
string |
path2 |
(optional) Part path 2 (only for adType="eta";path1)
|
string |
longLine |
Longer line of ad (only for adType="combined")
|
string |
shortLine |
Shorter line of ad (only for adType="combined")
|
string |
companyName |
Company or brand name (only for adType="combined")
|
string |
colorAccent |
(optional) (can be null) Accent color in HEX format without leading # character (only for adType="combined")
|
string |
colorMain |
(optional) (can be null) Main color in HEX format without leading # character (only for adType="combined")
|
int |
imageId |
Id of image (excludes: image) (only for adType in ["combined", "branding"])
|
int |
imageLogoId |
(optional) Id of logo (excludes: imageLogo) (only for adType="combined")
|
int |
imageSquareId |
Id of square image (excludes: imageSquare) (only for adType="combined")
|
int |
imageLandscapeLogoId |
(optional) Id of landscape logo (excludes: imageLandscapeLogo) (only for adType="combined")
|
binary |
image |
Image data (jpg, png, gif) (excludes: imageId) (only for adType in ["combined", "branding"])
|
binary |
imageLogo |
(optional) Image logo data (jpg, png, gif) (excludes: imageLogoId) (only for adType="combined")
|
binary |
imageSquare |
Image square data (jpg, png, gif) (excludes: imageSquareId) (only for adType="combined")
|
binary |
imageLandscapeLogo |
(optional) Image landscape data (jpg, png, gif) (excludes: imageLandscapeLogoId) (only for adType="combined")
|
string |
description |
Description (only for adType in ["eta", "combined"])
|
string |
description2 |
(optional) Description 2 (only for adType="eta")
|
string |
finalUrl |
Final URL (only for adType in ["eta", "combined", "branding"])
|
string |
trackingTemplate |
(optional) Tracking template (only for adType in ["eta", "combined", "branding"])
|
string |
mobileFinalUrl |
(optional) Mobile final URL (only for adType in ["eta", "combined"])
|
string |
impressionTrackingTemplate |
(optional) Template for impressions measuring codes (only for adType in ["combined", "branding"])
|
string |
impressionTrackingTemplate2 |
(optional) Template 2 for impressions measuring codes (only for adType in ["combined", "branding"])
|
string |
status |
(optional) ad status: [default: active]
-
active :
active
-
suspend :
suspended
|
string |
premiseMode |
(optional) Premise display mode (for connection with catalog Firmy.cz) (only for adType in ["eta", "banner"]):
-
disabled :
Assigned premise is not shown
-
one :
Premise specified in premiseId is shown
-
nearest :
Client nearest premise is shown
-
inherit :
Premise is inherited from campaign
|
int |
premiseId |
(can be null) Premise id (or nil; for connection with catalog Firmy.cz) (only for premiseMode='one';adType in ["eta", "banner"])
|
int |
dynamicTemplateId |
(optional) Id of dynamic template (only for adType="dynamicBanner")
|
array |
schedule ( |
(optional) (can be null) Delivery schedule of ad. Array of 7 days, week starts at monday.
|
) |
|
|
|
} |
|
|
|
) |
|
|
Response
struct |
{ |
|
string |
statusMessage |
Status code description
|
string |
session |
Refreshed session
|
array |
adIds ( |
Array of created ads(their ids)
|
int
|
|
|
(optional) ID of the created ad
|
|
) |
|
|
array |
diagnostics ( |
(optional) Various diagnostics(warnings, errors, other information)
|
|
) |
|
|
|
} |
|
|
Response status codes:
List of all possible response status codes:
200: OK
206: Partially OK
301: User is serviced
400: Bad arguments
401: Invalid session
403: Access Denied
404: Not found
406: Bad values of attributes
413: Too many items requested.
429: Too many requests. Has to wait.
500: Server Error.
409: Conflict
Diagnostics:
List of all possible diagnostics:
ad_attribute_no_change
ad_duplicate_in_db
ad_duplicate_in_request
bad_length
bad_url
bad_url_text
clickthruText_is_too_long
clickthruUrl_is_too_long
companyName_is_too_long
consecutive_same_words
consecutive_two_and_more_punctuation_chars
consecutive_two_and_more_uppercase
creative1_is_too_long
creative2_is_too_long
creative3_is_too_long
description2_is_too_long
description_is_too_long
exclamation_mark_in_title
exclusive_struct_field
failed_checksum_calculation
finalUrl_is_too_long
group_access_denied
headline1_is_too_long
headline2_is_too_long
headline3_is_too_long
hyphen_at_the_end
image_access_denied
image_height_too_low
image_no_access
image_no_rule_set_passed
image_ratio_incorrect
image_size_too_large
image_width_too_low
impressionTrackingTemplate2_is_too_long
impressionTrackingTemplate_is_too_long
invalid_chars
invalid_schedule_day_size
invalid_schedule_size
left_parenthesis_at_the_end
longLine_is_too_long
missing_required_attribute
missing_space_after_colon
missing_space_after_comma
missing_space_after_dot
missing_space_after_exclamation_mark
missing_space_after_hyphen
missing_space_after_question_mark
missing_space_after_right_parenthesis
missing_space_after_semicolon
missing_space_before_hyphen
missing_space_before_left_parenthesis
missing_text
mobileFinalUrl_is_too_long
more_then_one_exclamation_mark_in_text
nine_and_more_uppercase
not_allowed_for_campaign_type
path1_is_too_long
path2_is_too_long
path2_set_path1_unset
path_contains_unsupported_characters
punctuation_char_at_the_begin
schedule_value_too_large
schedule_value_too_low
shortLine_is_too_long
space_after_left_parenthesis
space_before_colon
space_before_comma
space_before_dot
space_before_exclamation_mark
space_before_question_mark
space_before_right_parenthesis
space_before_semicolon
trackingTemplate_is_too_long
user_access_denied
words_more_than_three_times_in_all_text
wrong_attribute