Last active
August 11, 2021 08:16
-
-
Save vernak2539/8babcdd13b80d632dd12 to your computer and use it in GitHub Desktop.
Fuel-SOAP Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FuelSoap = require('fuel-soap'); | |
var options = { | |
auth: { | |
clientId: 'clientId' | |
, clientSecret: 'clientSecret' | |
} | |
, soapEndpoint: 'https://webservice.s6.exacttarget.com/Service.asmx' // default --> https://webservice.exacttarget.com/Service.asmx | |
}; | |
var SoapClient = new FuelSoap(options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = { | |
filter: { | |
leftOperand: 'Name', | |
operator: 'equals', | |
rightOperand: 'Test Email' | |
} | |
}; | |
SoapClient.retrieve( | |
'Email', | |
["ID", "Name", "Subject", "CategoryID", "EmailType"], | |
options, | |
function( err, response ) { | |
if ( err ) { | |
// error here | |
console.log( err ); | |
return; | |
} | |
// response.body === parsed soap response (JSON) | |
// response.res === full response from request client | |
console.log( response.body ); | |
} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = { | |
filter: { | |
leftOperand: 'Name', | |
operator: 'equals', | |
rightOperand: 'Test Folder' | |
}, | |
clientIDs: [{ ID:12345 }] | |
}; | |
SoapClient.retrieve( | |
'DataFolder', | |
["ID"], | |
options, | |
function( err, response ) { | |
if ( err ) { | |
// error here | |
console.log( err ); | |
return; | |
} | |
// response.body === parsed soap response (JSON) | |
// response.res === full response from request client | |
console.log(response.body); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment