{"id":94,"date":"2010-08-24T01:08:42","date_gmt":"2010-08-24T00:08:42","guid":{"rendered":"https:\/\/greladesign.co\/blog\/?p=94"},"modified":"2010-08-24T01:09:12","modified_gmt":"2010-08-24T00:09:12","slug":"things-to-remember-when-calling-api-methods","status":"publish","type":"post","link":"https:\/\/greladesign.co\/blog\/2010\/08\/24\/things-to-remember-when-calling-api-methods\/","title":{"rendered":"Things to remember when calling API methods"},"content":{"rendered":"<p>It&#8217;s been frustrating hour, I&#8217;ve been sitting and trying to figure it out why my call to sales_order.list doesn&#8217;t work, I thought &#8220;it can&#8217;t be&#8221; everything is fine (looks like) but it returns <\/p>\n<blockquote><p>faultCode=620 faultMessage=&#8221;Method &#8220;sales_order.list&#8221; does not exist&#8221;<\/p><\/blockquote>\n<p><!--more--><br \/>\nthe enlightenment came to me with a delay:) There are 3 types or groups of API that magento supports, Magento Basic API, Magento Core API and Custom API<br \/>\nThe Magento Basic API lists following methods:<\/p>\n<ul>\n<li>startSession()<\/li>\n<li>endSession(sessionId)<\/li>\n<li>login(apiUser, apiKey)<\/li>\n<li>call(sessionId, resourcePath,array arguments)<\/li>\n<li>multiCall(sessionId, array calls,array options) <\/li>\n<li>resources(sessionId)<\/li>\n<li>globalFaults(sessionId)<\/li>\n<li>resourceFaults(sessionId, resourceName) <\/li>\n<\/ul>\n<p>And these methods are interface to use the Magento Core API or your custom API, basically I was calling sales_order.list directly but I should use &#8220;Call&#8221; or &#8220;multiCall&#8221;.<\/p>\n<p>I hope that I have saved someone a bit of frustration,<\/p>\n<p>cheers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been frustrating hour, I&#8217;ve been sitting and trying to figure it out why my call to sales_order.list doesn&#8217;t work, I thought &#8220;it can&#8217;t be&#8221; everything is fine (looks like) but it returns faultCode=620 faultMessage=&#8221;Method &#8220;sales_order.list&#8221; does not exist&#8221;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":""},"categories":[4,8],"tags":[16,15],"_links":{"self":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/94"}],"collection":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":5,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}