Get several Variants in one call

in Development
Hello,
Is it possible, and if yes, how...to get several variants within one call. I know I can filter the call on e.g. article_code=1234, but I would like to get also e.g. =5678 and =9432. Before the call I have knowledge of 12 articlecodes I need to fetch, but now I have to make 12 seperate calls (with the cost of ~1s/call). I guess it would be possible to extend the filter something like: article_code=1234,5678,9432
Regards,
R.A. Hendriks
Is it possible, and if yes, how...to get several variants within one call. I know I can filter the call on e.g. article_code=1234, but I would like to get also e.g. =5678 and =9432. Before the call I have knowledge of 12 articlecodes I need to fetch, but now I have to make 12 seperate calls (with the cost of ~1s/call). I guess it would be possible to extend the filter something like: article_code=1234,5678,9432
Regards,
R.A. Hendriks
3 comments
COUNTL=${COUNTL%?}
COUNTL=$(echo $COUNTL | cut -d ':' -f 2)
echo "Aantal producten in de webshop:" $COUNTL
COUNTN=1
PAGINA=1
while [ $COUNTN -lt $COUNTL ]
do
curl -g 'https://api.webshopapp.com/nl/products.xml?limit=250&page='$PAGINA -u "$KEY:$SECRET" > $PAD/producten/products_$PAGINA.xml
curl -g 'https://api.webshopapp.com/nl/variants.xml?limit=250&page='$PAGINA -u "$KEY:$SECRET" > $PAD/producten/variants_$PAGINA.xml
PAGINA=$((PAGINA+1))
echo $PAGINA
COUNTN=$((COUNTN+250))
echo $COUNTN
done
Currently, there isn't a method to do that. You could fetch all the variants and then filter those ones that you need from the results, or as you mentioned, make single calls.
Ok, clear. A loop is not specifically the way to go (I am doing that at the moment, but takes approx. 1s/call times 12 in my case). Fetching all variants is restricted to a max of 250 (and I got near 8000 variants). Since it is not a key-part of the system I am building I'll keep it to the loop knowingly the 12s delay. I could make it a-synchonous...but I rather fetch a cup of coffee then!
Cheers,
Randy