I am unable to post multi dimensional array from REST API (POST Method). posting the data in below format.
RAW DATA
{"customerData":{"name":"Mujassam", "no":"7760"}, "services":[{"product":"mobile", "id": "1"}, {"product":"day", "id":"2"}]}
Here Services is 2D Array
Interface is as below:
/**
* return placed order status
* @api
* @param string[] $customerData
* @param string[] $services
* @return array
*/
public function createOrder($customerData, $services);
May be I am not defining 2D array properly($services)..
It gives me below error
Notice: Array to string conversion in /var/www/html/mabel/vendor/magento/framework/Reflection/TypeProcessor.php on line 496
Note: I have no problem passing the 1D array..
Hoping some body to help me..