Documentation

Campaign.php

This api exposes CiviCRM Campaign records.

Tags
note

Campaign component must be enabled.

Table of Contents

Functions

civicrm_api3_campaign_create()  : array<string|int, mixed>
Create/update Campaign.
_civicrm_api3_campaign_create_spec()  : mixed
Adjust Metadata for Create action.
civicrm_api3_campaign_get()  : array<string|int, mixed>
Returns array of campaigns matching a set of one or more properties.
civicrm_api3_campaign_delete()  : array<string|int, mixed>
Delete an existing campaign.
_civicrm_api3_campaign_getlist_params()  : mixed
Get campaign list parameters.
_civicrm_api3_campaign_getlist_output()  : array<string|int, mixed>
Get campaign list output.

Functions

civicrm_api3_campaign_create()

Create/update Campaign.

civicrm_api3_campaign_create(array<string|int, mixed> $params) : array<string|int, mixed>

This API is used to create new campaign or update any of the existing In case of updating existing campaign, id of that particular campaign must be in $params array.

Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

_civicrm_api3_campaign_create_spec()

Adjust Metadata for Create action.

_civicrm_api3_campaign_create_spec(array<string|int, mixed> &$params) : mixed

The metadata is used for setting defaults, documentation & validation.

Parameters
$params : array<string|int, mixed>

Array of parameters determined by getfields.

civicrm_api3_campaign_get()

Returns array of campaigns matching a set of one or more properties.

civicrm_api3_campaign_get(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array per getfields

Return values
array<string|int, mixed>

Array of matching campaigns

civicrm_api3_campaign_delete()

Delete an existing campaign.

civicrm_api3_campaign_delete(array<string|int, mixed> $params) : array<string|int, mixed>

This method is used to delete any existing campaign. Id of the campaign to be deleted is required field in $params array

Parameters
$params : array<string|int, mixed>

array containing id of the group to be deleted

Return values
array<string|int, mixed>

_civicrm_api3_campaign_getlist_params()

Get campaign list parameters.

_civicrm_api3_campaign_getlist_params(array<string|int, mixed> &$request) : mixed
Parameters
$request : array<string|int, mixed>
Tags
see
_civicrm_api3_generic_getlist_params

_civicrm_api3_campaign_getlist_output()

Get campaign list output.

_civicrm_api3_campaign_getlist_output(array<string|int, mixed> $result, array<string|int, mixed> $request) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
$request : array<string|int, mixed>
Tags
see
_civicrm_api3_generic_getlist_output
Return values
array<string|int, mixed>

        
On this page

Search results