• Resolved rstone13

    (@rstone13)


    Is it possible to change the details of an order through the Rest API? For instance, say I wanted to change the quantity of an item in the order. Is this possible? I’ve attempted to make several PUT requests with my updated “line_items” array but I keep getting 400 responses. So, either Woocommerce doesn’t accept modifications to “line_items” through the REST API or I’m not formatting something right.

    To give an example of a use case for this, I’m working for a startup that’s attempting to facilitate online ordering for local mom and pop type shops. One of the stores we are working with is a meat shop. We list the average price of items that are sold by weight but the actual price will vary slightly because each package has a slightly different weight. We have built an app that allows the shop to mark when an order is ready for pickup. As an extension to that app, we wanted to offer the vendors the ability to update the details of an order. So, in the case of the meat shop, the vendor would be able to use the app to set the actual price of each item and the customer will receive an email with their adjusted total.

    If using the REST API isn’t an option, I’m open to other possible solutions. Thank you for your time.

Viewing 1 replies (of 1 total)
  • Thread Starter rstone13

    (@rstone13)

    Update: It turns out, my 400 responses were the result of trying to manually update read-only properties. Once I dropped those from my PUT requests, everything worked as expected.

Viewing 1 replies (of 1 total)
  • The topic ‘Modifying Orders through the Rest API’ is closed to new replies.