• Resolved joedunning

    (@joedunning)


    Hey there,

    I’m working on pulling information for our recent orders and I’m trying to access some line items properties, however, I’m struggling to nest the appropriate parameters.

    So far I’ve got this:
    var surl = website + "/wp-json/wc/v3/orders" + "?per_page=50" + "&_fields[]=id" + "&_fields[]=line_items";

    I’m trying to pull sub-properties from line_items such as name, SKU, but I’m struggling to do so in terms of getting a single field. I thought I’d just be able to do something like line_items.name or line_items.name.value but no luck. If anyone can point me in the right direction I’d really appreciate it.

    https://developer.www.ads-software.com/rest-api/using-the-rest-api/global-parameters/#top

    I did find this but I’m not sure if it applies.

    Thanks!

    • This topic was modified 2 years, 3 months ago by joedunning.
    • This topic was modified 2 years, 3 months ago by joedunning.
    • This topic was modified 2 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTTP GET, How to Access Line Data?’ is closed to new replies.