Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hands On Training - Fuel API
POST https://auth.exacttargetapis.com/v1/requestToken
Content-Type application/json
{
"clientId": "xxxxxxxxxxxxxxx",
"clientSecret": "xxxxxxxxxxxxxxx"
}
GET https://www.exacttargetapis.com/platform/v1/tokenContext
Content-Type application/json
Authorization Bearer xxxxxxxxxx
POST https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:EXTERNAL_KEY/send
Content-Type application/json
Authorization Bearer xxxxxxxxxx
{
"To": {
"Address": "example@example.com",
"SubscriberKey": "example@example.com",
"ContactAttributes": {
"SubscriberAttributes": {
"fullname": "John Smith"
}
}
}
}
<!--
POST https://webservice.s7.exacttarget.com/Service.asmx
Content-Type text/xml
SOAPAction Describe
-->
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Header>
<fueloauth xmlns="http://exacttarget.com">Enter Your API Key</fueloauth>
</Header>
<Body>
<DefinitionRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<DescribeRequests>
<ObjectDefinitionRequest>
<ObjectType>Subscriber</ObjectType>
</ObjectDefinitionRequest>
</DescribeRequests>
</DefinitionRequestMsg>
</Body>
</Envelope>
<!--
POST https://webservice.s7.exacttarget.com/Service.asmx
Content-Type text/xml
SOAPAction Retrieve
-->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">xxxxxx</fueloauth>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<ObjectType>List</ObjectType>
<Properties>ID</Properties>
<Properties>ObjectID</Properties>
<Properties>ModifiedDate</Properties>
<Properties>Client.ID</Properties>
<Properties>ListName</Properties>
<Properties>Description</Properties>
<Properties>Category</Properties>
<Properties>Type</Properties>
<Properties>CustomerKey</Properties>
<!--<Filter xsi:type="SimpleFilterPart">
<Property>Type</Property>
<SimpleOperator>notEquals</SimpleOperator>
<Value>Private</Value>
</Filter>-->
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
<!--
POST https://webservice.s7.exacttarget.com/Service.asmx
Content-Type text/xml
SOAPAction Create
-->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">xxxxxxx</fueloauth>
</soapenv:Header>
<soapenv:Body>
<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Objects xsi:type="List">
<CustomerKey>my_public_list</CustomerKey>
<Name>My Public List</Name>
<Type>Public</Type>
</Objects>
</CreateRequest>
</soapenv:Body>
</soapenv:Envelope>
<!--
POST https://webservice.s7.exacttarget.com/Service.asmx
Content-Type text/xml
SOAPAction Update
-->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">xxxxxxx</fueloauth>
</soapenv:Header>
<soapenv:Body>
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Objects xsi:type="Subscriber">
<emailaddress>example@example.com</emailaddress>
<lists>
<partnerkey xsi:nil="true"/>
<id>LIST ID GOES HERE</id>
<objectid xsi:nil="true"/>
<status>Active</status>
</lists>
</Objects>
</UpdateRequest>
</soapenv:Body>
</soapenv:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.