Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save katydorjee/19e723e745ff3dd7a05da04f01ef351d to your computer and use it in GitHub Desktop.
Save katydorjee/19e723e745ff3dd7a05da04f01ef351d to your computer and use it in GitHub Desktop.
SFMC DataExtensionField Retrieve SOAP Envelope
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">Retrieve</a:Action>
<a:MessageID>urn:uuid:e3f7fdfe-d225-47fb-a764-ad4f465fb724</a:MessageID>
<a:ReplyTo>
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To>
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
<u:Timestamp u:Id="_0">
<u:Created>2014-11-18T14:44:10.936Z</u:Created>
<u:Expires>2014-11-18T14:49:10.936Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-642de236-bbe2-41d9-b965-d107063c913c-3">
<o:Username>
<!-- Removed-->
</o:Username>
<o:Password>
<!-- Removed-->
</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<ObjectType>DataExtensionField</ObjectType>
<Properties>Client.ID</Properties>
<Properties>CreatedDate</Properties>
<Properties>CustomerKey</Properties>
<Properties>DataExtension.CustomerKey</Properties>
<Properties>DefaultValue</Properties>
<Properties>FieldType</Properties>
<Properties>IsPrimaryKey</Properties>
<Properties>IsRequired</Properties>
<Properties>MaxLength</Properties>
<Properties>ModifiedDate</Properties>
<Properties>Name</Properties>
<Properties>ObjectID</Properties>
<Properties>Ordinal</Properties>
<Properties>Scale</Properties>
<Filter xsi:type="SimpleFilterPart">
<Property>DataExtension.CustomerKey</Property>
<SimpleOperator>equals</SimpleOperator>
<Value>DATA EXTENSION NAME</Value>
</Filter>
<QueryAllAccounts>true</QueryAllAccounts>
<Retrieves />
<Options>
<SaveOptions />
<IncludeObjects>true</IncludeObjects>
</Options>
</RetrieveRequest>
</RetrieveRequestMsg>
</s:Body>
</s:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment