henning glatter-götz

ExactTarget SOAP API: Obtaining an Accurate List of Retrievable Properties

Aahhh! The joys of integrating with third-party API’s. Trying to get your application to talk to a third-party API is sometimes tricky, especially if the API documentation is not up to date. SOAP is supposed to make this simpler by providing a WSDL from which you can generate classes. So what are you supposed to do if the documentation and the WSDL seem out of date?

Clarification: By out of date I mean that the documentation for a particular object states it has retrievable properties a, b and c, the WSDL has properties a, c and d, and by trial and error you finally figure out that only a and d are retrievable.

Not to fear, ExactTarget provides a SOAP method that describes objects. You pass the object name as a parameter and in return you get a list of all properties and their attributes. One of the attributes is isRetrievable, which is what I am after.

Great! Right? Well, mostly…

For most objects the method described below returns accurate results from what I can tell. The only object I have encountered so far that has an incorrect result form this method is EmailSendDefinition.

EmailSendDefinition retrievable properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Client.ID
CreatedDate
ModifiedDate
ObjectID
CustomerKey
Name
CategoryID
Description
SendClassification.CustomerKey
SenderProfile.CustomerKey
SenderProfile.FromName
SenderProfile.FromAddress
DeliveryProfile.CusomterKey            // <-- Generates error
DeliveryProfile.CustomerKey
DeliveryProfile.SourceAddressType
DeliveryProfile.PrivateIP
DeliveryProfile.DomainType
DeliveryProfile.PrivateDomain
DeliveryProfile.HeaderSalutationSource
DeliveryProfile.HeaderContentArea.ID   // <-- Generates error
DeliveryProfile.FooterSalutationSource
DeliveryProfile.FooterContentArea.ID   // <-- Generates error
SuppressTracking
IsSendLogging
Email.ID
CCEmail
BccEmail
AutoBccEmail
TestEmailAddr
EmailSubject
DynamicEmailSubject
IsMultipart
IsWrapped
SendLimit
SendWindowOpen
SendWindowCloses                       // <-- Generates error
DeduplicateByEmail
ExclusionFilter
Additional
SendDefinitionList
IsPlatformObject

The Describe method is quite handy and I use it quite a bit when exploring the API, so I added it to my PHP library for accessing ExactTarget’s SOAP API. You can get the lib here, and this is how you would get the definition for the above EmailSendDefinition object:

describe.php
1
2
3
<?php
ETCore::initialize($userName, $password);
print_r(ETCore::getObjectDefinition('EmailSendDefinition'));
Result
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
definition = stdClass Object
(
    [ObjectType] => EmailSendDefinition
    [Properties] => Array
        (
            [0] => stdClass Object
                (
                    [PartnerKey] =>
                    [ObjectID] =>
                    [Name] => Client.ID
                    [DataType] => Int32
                    [IsUpdatable] =>
                    [IsRetrievable] => 1
                    [IsRequired] =>
                )

            [1] => stdClass Object
                (
                    [PartnerKey] =>
                    [ObjectID] =>
                    [Name] => CreatedDate
                    [DataType] => DateTime
                    [IsUpdatable] => 1
                    [IsRetrievable] => 1
                    [IsRequired] =>
                )

            [2] => stdClass Object
                (
                    [PartnerKey] =>
                    [ObjectID] =>
                    [Name] => ModifiedDate
                    [DataType] => DateTime
                    [IsUpdatable] => 1
                    [IsRetrievable] => 1
                    [IsRequired] =>
                )
             :
             :

As I learn more about the ExactTarget SOAP API and SOAP itself I will be posting my findings and expanding the library on github.

Comments