groups.check
Check groups before creating or updating it.
You have to specify:
group.id (check for updating)
or group.attributes.campaignId
(check for creating)
Parameters
struct |
user { |
|
string |
session |
Session (as retrieved from client.loginByToken() )
|
int |
userId |
(optional) Managed user ID
|
|
} |
|
|
array |
groups ( |
|
struct |
{ |
|
int |
groupId |
(optional) Group id
|
int |
campaignId |
(optional) Campaign id (where the group will be if creating a new one)
|
string |
name |
(optional) Group name
|
string |
status |
(optional) Group status:
-
active :
Active
-
suspend :
Suspended
|
int |
cpc |
(optional) Group default maximal cost per click (in halers)
|
int |
cpt |
(optional) Group cost per thousand impressions,
|
int |
maxUserDailyImpression |
(optional) Max impressions of group per one user per one day
|
|
} |
|
|
|
) |
|
|
Response
struct |
{ |
|
string |
statusMessage |
Status code description
|
string |
session |
Refreshed session
|
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:
ambiguous_check: Some items contain campaignId and some groupId! Can not recognize check category (create or update?)
campaign_access_denied
campaign_name_missing
group_access_denied
group_cpc_is_too_high
group_cpc_is_too_low
group_cpm_out_of_range
group_create_missing_mandatory_attributes
group_maxUserDailyImpression_out_of_range
group_name_duplicity
group_name_missing
not_allowed_for_campaign_type
user_access_denied