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 |
Campaign createCampaign(body)
createCampaign
Creates a campaign.
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);
});
Name | Type | Description | Notes |
---|---|---|---|
body | Campaign | JSON Parameters |
No authorization required
- Content-Type: Not defined
- Accept: Not defined
deleteCampaignById(id)
deleteCampaignById
Deletes a campaign.
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);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | The ID of the campaign to delete |
null (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Campaign getCampaignById(id)
getCampaignById
Retrieves a campaign.
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);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | Campaign ID |
No authorization required
- Content-Type: Not defined
- Accept: Not defined