• Resolved misbi

    (@misbi)


    When requesting all orders via /wp-json/wc/v3/orders, the returned data includes all line-items for each order. Is there any way to retrieve the order list, but exclude the line-items? I really just wanted the order ids so I can call each order individually, to get the line items (if required). We regularly receive orders upwards of 50 products, so I’d rather not request line-item data with every list orders call, if it can be avoided.

    I see from the documentation that there is an exclude parameter which might provide a solution, but I haven’t managed to get it to work as there’s no code sample showing the correct syntax (I’m using python BTW).

    Any advice would be much appreciated.

    The page I need help with: [log in to see the link]

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

    (@jessepearson)

    Automattic Happiness Engineer

    @misbi I skimmed the API code, and from what I can tell the orders come with the line items, not just the list of orders. There are no options you can submit to exclude the line items themselves.

    Thread Starter misbi

    (@misbi)

    OK, I suspected that might be the case. Thanks for confirming.

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

The topic ‘API List All Orders’ is closed to new replies.