Updating subscriber fields through API

eggerda

Member
Hello! We have an API call to update a custom field value for a subscriber, and then another one (immediately after) to UNSUBSCRIBE them:

$response = $endpoint->update($list['general']['list_uid'], $record['subscriber_uid'], array(
'MOVE' => '2'

$response = $endpoint->unsubscribe($list['general']['list_uid'], $record['subscriber_uid']);

Is it possible to accomplish this with just ONE API call? For example, can I just use the "update" to change the subscribers STATUS as well? My programmer is tied up right now, so I have to make this change if possible.

If this is possible, what would the STATUS field name be that I can use in the UPDATE call? And what value should it be to set the subscriber as unsubscribed?

Thank you!

Dan
 
$response = $endpoint->update($list['general']['list_uid'], $record['subscriber_uid'], array(
'MOVE' => '2'
Maybe:
PHP:
$response = $endpoint->update($list['general']['list_uid'], $record['subscriber_uid'], array(
'MOVE' => '2',
'details' => [ 'status' => 'unsubscribed' ]
 
@twisted1919, or anybody else who has an answer... when I READ records from the API by custom field, is it possible to sort things by date added? I want to process the OLDEST records first...

It's this API call specifically...

// SEARCH BY custom field
$response = $endpoint->searchByCustomFields('sh296mj4sddc4', array(
'FNAME' => 'the fname',
'LNAME' => ' the lname',
));
 
Hello,
Once you get the records from the API you can sort the array in PHP based on that 'date_added' column.
Cosmin
 
Back
Top