jandings Posted November 8, 2017 Share Posted November 8, 2017 (edited) Hello there, since I spent some time to access the REST-API of the web shop system Shopware, I'd like to share a few lines to make life easier for others. With this you can access your Shopware database, reading and writing all kind of data. Replies are JSON style. To work with JSON I usually depend on either just own AutoIt string operations or this AutoIt library: ; File : Json.au3 (2015.01.08) ; Purpose : A Non-Strict JavaScript Object Notation (JSON) Parser UDF ; Author : Ward $UserName="xxxx" ;Shopware credentials of Shopware user who has the API checkbox ticked $PassWord="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ;API-Key of this user, NOT the Password $URL="www.XXX.com/api/" $Command="orders/64682?useNumberAsId=true" ;A list of commands and options is available through shopware REST-API help; Here we read order number 64682 $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://" & $URL & $Command , False) $oHTTP.SetCredentials($UserName, $PassWord, 0) $oHTTP.Send() $response = $oHTTP.ResponseText ConsoleWrite ($response & @CRLF & @CRLF) Edited November 8, 2017 by jandings Link to comment Share on other sites More sharing options...
rotkiv Posted January 17, 2018 Share Posted January 17, 2018 (edited) <snip> I would like to use it, how do i get the UDF?? Edited January 17, 2018 by JLogan3o13 Removed multiple quotes Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 17, 2018 Moderators Share Posted January 17, 2018 @rotkiv in the future, please just hit the reply button rather than quoting the previous person (especially quoting the same information multiple times as you had); it pads the thread unnecessarily. As to your question, it doesn't look like there is a UDF. The OP mentions just a few lines he uses; what you see in the first post's snippet is what you get. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
rotkiv Posted January 17, 2018 Share Posted January 17, 2018 oh, sorry, yes I got it, it works! thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now