Error in REST API /v2/subscriptions
-
Hi,
I’m using the REST API to enable the subscription from my main site to my second site.
I’m using /v2/subscriptions as endpoint to fire the complete process and send the confirmation and welcome email.
I noticed that when I send the lists subscribers chose, they were not saved correctly in the user information. With a lil bit of debugging I saw that on the plugin
newsletter-api/V2/Newsletters/Newsletters_Controller.php row 97, the variable $list is an array and not a object, so it’s never true on if if (is_object($list)).This happen only if my request body is like the documentation:
{ "email": "[email protected]", ... "lists": [ { "id": 40, "value": 1 }, { "id": 5, "value": 1 }, { "id": 9, "value": 1 } ], ... }
The list id return always 1 on row 99
If I use
"lists": [ 40, 5, 9 ],
everything go as plannedI hope I was clear enough
Thank you,
Alessio
- The topic ‘Error in REST API /v2/subscriptions’ is closed to new replies.