Skip to main content

Create advertising campaign

Creates a campaign in the selected advertising account

Function CreateAdvertisingCampaign(Val AccountID, Val Name, Val Parameters = "") Export

ParameterCLI optionTypeRequiredDescription
AccountID--cabinetString, NumberAdvertising account ID
Name--titleStringCampaign name
Parameters--authStructure Of StringAuthorization JSON or path to .json

Returns: Map Of KeyAndValue - serialized JSON response from VK


1C:Enterprise/OneScript code example
    Parameters = GetVKParameters();

AccountID = "1607951446";
Name = "New campaign";

Result = OPI_VK.CreateAdvertisingCampaign(AccountID, Name, Parameters);
    oint vk CreateAdvertisingCampaign \
--cabinet ""1607951446"" \
--title ""New campaign"" \
--auth ""/tmp/uqfd53u0.ptd.json""
Result
{
"response": [
{
"id": 1030702431,
"error_code": 602,
"error_desc": "Some part of the request has not been completed"
}
]
}