So far, in the Developing Shopify Apps series, we've covered: The setup: joining Shopify's Partner Program, creating a new test shop, launching it, adding a private app to it and playing with a couple of quick API calls. Exploring the API: a quick explanation of the API and RESTafarianism, retrieving general information about a shop and dipping a toe into finding out about things like your shop's products, and so on. Even more explaration: REST consoles, getting a complete list of all the products, articles, blogs, customers and so on, retrieving specific items given their ID and creating new items. Now these are modifications! In this article, we're going to look at another important types of operation: modifying existing items. Modifying Customers To modify an object, we're going to need an existing one first. I'm going to start with "Peter Griffin", a customer that I created in the previous article in this series. His ID is 51827492, so we can retrieve his record thusly: GET api-key:password@shop-url/admin/customers/51827492.xml for the XML version GET api-key:password@shop-url/admin/customers/51827492.json for the JSON version Here's the response in XML: <?xml version="1.0" encoding="UTF-8"?> <customer> <accepts-marketing type="boolean" nil="true" /> <orders-count type="integer">0</orders-count> <id type="integer">51827492</id> <note nil="true" /> <last-name>Griffin</last-name> <total-spent type="decimal">0.0</total-spent> <first-name>Peter</first-name> <email>peter.lowenbrau.griffin@giggity.com</email> <tags /> <addresses type="array"> <address> <city>Quahog</city> <company nil="true" /> <address1>31 Spooner Street</address1> <zip>02134</zip> <address2 nil="true" /> <country>United States</country>
NayaRead shows a summary and links to the original article. The full article is hosted on shopify.engineering.