ads.update
This method sets ads attributes (status or connection to Firmy.cz catalog).
Ad title, content and URLs (creative1, creative2, creative3, clickthruText) cannot be changed.
Old ad will be deleted and new one will be created and newIds will be provided in response.
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
|
string |
adType |
(optional) Type of created ad: [default: eta]
-
eta :
Extended ad
-
combined :
Combined ad
-
branding :
Branding ad
-
dynamicBanner :
Dynamic banner
|
string |
name |
(optional) Ad Name (only for adType in ["branding"])
|
string |
headline1 |
(optional) Headline 1 (only for adType="eta")
|
string |
headline2 |
(optional) 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")
|
string |
longLine |
(optional) Longer line of ad (only for adType="combined")
|
string |
shortLine |
(optional) Shorter line of ad (only for adType="combined")
|
string |
companyName |
(optional) 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 |
(optional) Id of image (excludes: image) (only for adType in ["combined", "branding"])
|
int |
imageLogoId |
(optional) (can be null) Id of logo (excludes: imageLogo) (only for adType="combined")
|
int |
imageSquareId |
(optional) Id of square image (excludes: imageSquare) (only for adType="combined")
|
int |
imageLandscapeLogoId |
(optional) (can be null) Id obdelnikoveho loga (excludes: imageLandscapeLogo) (only for adType="combined")
|
binary |
image |
(optional) Image data (jpg, png, gif) (excludes: imageId) (only for adType in ["combined", "branding"])
|
binary |
imageLogo |
(optional) Image data (jpg, png, gif) (excludes: imageLogoId) (only for adType="combined")
|
binary |
imageSquare |
(optional) Image data (jpg, png, gif) (excludes: imageSquareId) (only for adType="combined")
|
binary |
imageLandscapeLogo |
(optional) Image data (jpg, png, gif) (excludes: imageLandscapeLogoId) (only for adType="combined")
|
string |
description |
(optional) Description (only for adType in ["eta", "combined"])
|
string |
description2 |
(optional) Description 2 (only for adType="eta")
|
string |
finalUrl |
(optional) Final URL (only for adType in ["eta", "combined", "branding"])
|
string |
trackingTemplate |
(optional) (can be null) Tracking template (only for adType in ["eta", "combined", "branding"])
|
string |
mobileFinalUrl |
(optional) (can be null) Mobile final URL (only for adType in ["eta", "combined"])
|
string |
impressionTrackingTemplate |
(optional) (can be null) Template for impressions measuring codes (only for adType in ["combined", "branding"])
|
string |
impressionTrackingTemplate2 |
(optional) (can be null) Template 2 for impressions measuring codes (only for adType in ["combined", "branding"])
|
string |
status |
(optional) Change ad status:
-
active :
Ad is active
-
suspend :
Ad is 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 |
newAdIds ( |
(optional) Array of new created ads.
|
|
) |
|
|
array |
diagnostics ( |
(optional) Array of 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_access_denied
ad_attribute_no_change
ad_duplicate_in_db
ad_duplicate_in_request
ad_no_change
ad_type_mismatch
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
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