Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Latest commit

 

History

History
140 lines (88 loc) · 3.01 KB

CampaignApi.md

File metadata and controls

140 lines (88 loc) · 3.01 KB

SalesforceMarketingCloud.CampaignApi

All URIs are relative to https://www.exacttargetapis.com

Method HTTP request Description
createCampaign POST /hub/v1/campaigns createCampaign
deleteCampaignById DELETE /hub/v1/campaigns/{id} deleteCampaignById
getCampaignById GET /hub/v1/campaigns/{id} getCampaignById

createCampaign

Campaign createCampaign(body)

createCampaign

Creates a campaign.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.CampaignApi();

let body = new SalesforceMarketingCloud.Campaign(); // Campaign | JSON Parameters

apiInstance.createCampaign(body).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body Campaign JSON Parameters

Return type

Campaign

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteCampaignById

deleteCampaignById(id)

deleteCampaignById

Deletes a campaign.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.CampaignApi();

let id = "id_example"; // String | The ID of the campaign to delete

apiInstance.deleteCampaignById(id).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String The ID of the campaign to delete

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCampaignById

Campaign getCampaignById(id)

getCampaignById

Retrieves a campaign.

Example

const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk');

let apiInstance = new SalesforceMarketingCloud.CampaignApi();

let id = "id_example"; // String | Campaign ID

apiInstance.getCampaignById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Campaign ID

Return type

Campaign

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined