When calling an REST API method I get back that there is an error
Error processing request stream. The payload must represent a valid array format for collections.
But when searching for:
valid array format for collections
I get back a lot, but nothing clarifies what is meant by this. I'm guessing the data i send is not valid (currently i'm sending an array('foo' => 'Bar')
) but this is probably not correct.
Has anybody got a pointer to what is happening here? Or what i could check?
The documentation of ExactOnline
(which I'm posting to) is not sufficient. It only states what fields they have, but nothing about these kind of error messages.
==========================
Ok, this needs some clarification, my bad!
As written, i'm communication with ExactOnline, via their API.
I'm calling the method to post a sales order. With that, i'm using a set of scripts Exact provides on their website (for developers).
on page: https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SalesOrderSalesOrders
under 'POST', you can read the mandatory fields, under which 'SalesOrderLines' is one of them. It does not tell me what it expects or in what format.
I wrapped my array in a json_encode and tried again, but no luck. It still tells me the same error.