Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: API changing list not working #306041
    Mark Pietrusinski
    Participant

    I got it working for my integration after digging into the newsletter_api code. In the request list objects, value needs to be 1. Also subscribers will not be added to private lists unless the request is authenticated.

    The list_N parameter is an interesting one…
    It seems that list_N should actually be one or more dynamic properties where N is can be replaced by a list id.

    This looks like code handling that part of the request:

    // Manage list_N parameters
    $nls = $newsletter->get_lists();
    foreach ($nls as $nl) {
    if ($request->has_param('list_' . $nl->id)) {
    if ($authenticated || !$nl->is_private()) {
    $data->lists[$nl->id] = $request->get_param('list_' . $nl->id) ? 1 : 0;
    }
    }
    }

    in reply to: API changing list not working #306040
    Mark Pietrusinski
    Participant

    I am also unable to get new subscribers created via POST /subscribers to be assigned to a list. They are created without being assigned to any list at all regardless what id value is given.

    Furthermore, the V2 api documentation does not indicate what is the purpose of the request data list “value” and “list_N” properties.

    `
    “lists”: [
    {
    “id”: 2,
    “value”:1 <– ?
    }
    ],
    “list_N”: 0, <– ?
    `

Viewing 2 posts - 1 through 2 (of 2 total)