Reputation: 119
I'm just getting started with the Shopify API (within a Rails app) and this is my first API integration I've done. I feel like there's something incredibly basic I'm missing, and that the documentation assumes I know.
Documentation - http://docs.shopify.com/api/order.html#update
I'm just trying to update attributes on an Order (really any attribute. I just need to prove I can both read from and write to the Shopify API).
I installed the Shopify_App gem (https://github.com/Shopify/shopify_app) which made the OAuth process really simple, and am able to view all my orders and call extended info to Read, but when it comes to a Write I'm lost.
Do I need to create a bunch of json templates and interface through JS? Should I be writing a custom Action in my Controller? Hope this is a 30-second "oh, duh!" question.
Upvotes: 1
Views: 282
Reputation: 1039
The documentation is for the RESTful API which is language/framework agnostic.
The gem (which is the way to go if you are using Rails) uses ActiveResource so to invoke that PUT request you just need to update the order and save.
Upvotes: 1