API PHP Client example

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LabelKing
    Senior Blueparker
    • Jan 2012
    • 1062

    #1

    API PHP Client example

    I've just downloaded the API Client (PHP) from the API User Guide page, and have filled in the domain, username and API key.

    But when I run it, just to see what it does, it displays this:

    PHP Code:
    Array(
        [Status] => HTTP/1.1 404 Not Found
        [Date] => Sat, 05 Aug 2017 10:02:54 GMT
        [Server] => Apache
        [X-Frame-Options] => SAMEORIGIN
        [X-Requests-Limit] => 1000
        [X-Requests-Remaining] => 999
        [Vary] => Accept-Encoding,User-Agent
        [Content-Encoding] => gzip
        [Content-Length] => 86
        [Content-Type] => application/json
    )
    Array
    (
        [error] => Array
            (
                [code] => 404
                [phrase] => Not Found
                [message] => Resource not found
            )
     ) 
    
    So it looks like something isn't quite configured right, and it can't find what it's looking for. But on the other hand, it's not really clear what is supposed​ to happen- is it actually supposed to do anything by default, or is it just a list of useful functions and it needs to be edited in order to work...?
  • LabelKing
    Senior Blueparker
    • Jan 2012
    • 1062

    #2
    ah, ok, never mind. It looks like it was trying to retrieve order information, and as this was a brand new blank website there were no orders to find... added a test order and now it works.

    Comment

    • Bandanashop
      Senior Blueparker
      • Jun 2012
      • 236

      #3
      Yes, a 404 response can indicate that no orders are available of that type not that you got the call syntactically incorrect. I have had the same a 404 is not as bad as it seems.
      Regards
      Rob
      www.herniapants.com

      Comment

      Working...