PHP API V3 -> subscriber->import() and MultiSelectMany

Hi,

how to import many subscribers and add values to a "MulitSelectMany" field? The Docu and the PHP samples only show examples for "Text" fields.

As if i add a list and lists->create needs an array with all the "MultiSelectMany" fields I tried this for subscribers-<imort, too. But it always returns a unserialization problem (statuscode: 400).

Some hint?

Best,
Thorsten

tscheckenbach tscheckenbach, 5 years ago

PLZ help me. I can't use the new API without the knowledge of how to add MulitSelectMany values. But adding 15.000+ people in 15.000+ requests with V2 can't be the solution!?

Best,
Thorsten


Speed is nothing without control
tobyb tobyb, 5 years ago

MultiSelectMany fields may be added by providing multiple custom field array entries with the same key. This approach is that same both the add and import routes.

e.g
In JSON

"CustomFields" : [
{
    "Key": "MultiField",
    "Value": "Option 1"
},
{
    "Key": "MultiField",
    "Value": "Option 2"
}]

In XML

<CustomFields>
    <CustomField>
        <Key>MultiField</Key>
       <Value>Option 1</Value>
    </CustomField>
    <CustomField>
        <Key>MultiField</Key>
       <Value>Option 2</Value>
    </CustomField>
</CustomFields>

For the PHP wrapper specifically

    'CustomFields' => array(
        array(
            'Key' => 'MultiField',
            'Value' => 'Option 1'
        )
        array(
            'Key' => 'MultiField',
            'Value' => 'Option 2'
        )
    )

Hope that clears things up, we'll be updating the docs with this info soon.

jamesd jamesd, 5 years ago

Our API documentation for adding a subscriber now includes an example of adding multiple values for a multiple-option-select-many custom field, similar to Toby's example above.

tscheckenbach tscheckenbach, 5 years ago

Ahhh, i tried double pipes as in V2, comma seperation, array, object,... but now it's clear. Thx


Speed is nothing without control

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098