• Resolved freeno

    (@freeno)


    Hi, i have a till that reports a customer_id into woocommerce for each order (for this example i will use customer ’10’). I can search for this using REST with:
    curl “$($SubURL)?per_page=100&customer=10” -u $Cred

    however I want to find all customers that are not customer 10 above. Is there any way to filter the result other than a foreach loop against all customers excluding ’10’? Something like the below would be ideal, or another way to achieve this with a query filter maybe..

    curl “$($SubURL)?per_page=100&customer_exclude=10” -u $Cred

    • This topic was modified 4 years, 10 months ago by freeno.
Viewing 2 replies - 1 through 2 (of 2 total)
  • con

    (@conschneider)

    Engineer

    Hi there,

    Is there any way to filter the result other than a foreach loop against all customers excluding ’10’? Something like the below would be ideal, or another way to achieve this with a query filter maybe..

    I would use curl $($SubURL)?per_page=100&customer=10” -u $Cred and pass all order IDs into an array. You can then use that array as an exclude parameter: https://d.pr/i/vAZljY – this should give you the desired result: All orders excluding a specific customer.

    Kind regards,

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    It’s been a while since we last heard back from you. I’m going to mark this thread as resolved.

    Hopefully, the above information helped you out! If you have further questions, please feel free to open a new topic.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘REST orders specific customers’ is closed to new replies.