Invalid XML Error while subscription of new member to a specific list

48 views
Skip to first unread message

Harleen Grover

unread,
Oct 19, 2013, 4:57:11 PM10/19/13
to streamsend-...@googlegroups.com
Hello Everyone,

I'm paid member of streamsend and i've integrated full API with my system.
Only issue is while i'm subscribing an XML to specific list getting invalid XML Error Message.

XML i'm passing is:

 <membership>

<list-id>3</list-id> <person-id>1</person-id>

 </membership>
<membership>

<list-id>7</list-id> <person-id>4</person-id>

 </membership>

i tried one another way as below:

<membership>

 <list-id>3</list-id> <person-id>1</person-id>

<list-id>7</list-id> <person-id>4</person-id>

 </membership>

this way i'm getting error
: list can't be empty and person can't be empty?

please help me, what is wrong i'm doing.

another point i need to delete some subscribers from specific list also:
this is what i'm getting in documents:

  DELETE /audiences/{audience_id}/memberships/{id}.xml

but what will be the XML for format for this? parameters and all nothing is explained.

please help!! need it quickly.

Thank you,
Harleen Grover
+91-9417244937

Chris O'Meara

unread,
Oct 21, 2013, 1:26:24 PM10/21/13
to streamsend-...@googlegroups.com
Hi Harleen,

The API endpoint takes memberships one at a time. The request body looks like this:

   <membership>
     <list-id>3</list-id>
     <person-id>1</person-id>
   </membership>

Send a POST request to /audiences/{audience_id}/memberships.xml.

Regarding deleting memberships, there are no parameters and there is no body.

Send a DELETE request to /audiences/{audience_id}/memberships/{id}.xml where the id portion of the path is the list membership id. The correct path will be contained in the Location header from the create request.

Hope this helps,
Chris O'Meara
Director Of Engineering
StreamSend


--
 
---
You received this message because you are subscribed to the Google Groups "StreamSend API Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to streamsend-api-di...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Harleen Grover

unread,
Oct 23, 2013, 4:12:28 PM10/23/13
to streamsend-...@googlegroups.com
Thank you for reply Chris,

isn't there any way to pass detail of Subscribers in bulk coz i have 65k Subscribers and i need their subscriptions to two different Lists based on some conditions

so, via the way you're telling me i'll have to pass it more than 1 lac time to update my lists?

isn't there any other way to do it in one request?

Regards,
Harleen Grover

Chris O'Meara

unread,
Oct 25, 2013, 1:34:02 PM10/25/13
to streamsend-...@googlegroups.com
Hi Harleen,

Please have a look at the comment in the MembershipsController#create:

Bulk Creation
If you need to create multiple memberships at once, you should import them instead. Just make sure to leave reactivation disabled. See the ImportsController for more information.

Cheers,
Chris O'Meara
Director Of Engineering
StreamSend

--
Reply all
Reply to author
Forward
0 new messages