Orders v3 endpoint, retrieve orders for multiple suppliers?

Hi, so I see that the endpoint reports that the supplier parameter is an array:

I tried comma separated and I get a SQL error in my response.

"error_message": "(psycopg2.DataError) invalid input syntax for integer: \"52613,52364\"\nLINE 3: ...true AND shipping_dropshipinfo.dropshipper_id IN ('52613,523...\n                                                             ^\n [SQL: 'SELECT orders_order.order_id AS orders_order_order_id, count(*) OVER () AS full_count \\nFROM orders_order JOIN shipping_shipment ON orders_order.id = shipping_shipment.order_id LEFT OUTER JOIN shipping_dropshipinfo ON shipping_shipment.id = shipping_dropshipinfo.shipment_id \\nWHERE orders_order.company_id = %(company_id_1)s AND orders_order.v3_status IS NOT NULL AND orders_order.is_order_parent = false AND orders_order.ready = true AND shipping_dropshipinfo.dropshipper_id IN (%(dropshipper_id_1)s) ORDER BY orders_order.created DESC NULLS LAST \\n LIMIT %(param_1)s OFFSET %(param_2)s'] [parameters: {'company_id_1': 572172, 'dropshipper_id_1': '52613,52364', 'param_1': 10, 'param_2': 0}]",
"param": null


Then for curiosity I researched different means of passing array parameters in a query string. It seems that something like this is a convention, though I have rarely used it - it involves duplicating the QS parameter.


It seems to work but I want to confirm this is proper for your parameters listed as array. Thanks

Yes, that is correct. Repeat the param for each item you wish to filter by.

1 Like