Difference between revisions of "Getting Started"

From Advice Local Wiki
Jump to: navigation, search
(Sample Request)
(Sample Request)
Line 5: Line 5:
 
In order to interact with the Advice Local API, you must include your API token for each request.
 
In order to interact with the Advice Local API, you must include your API token for each request.
  
=== Sample Request ===
+
=== Example Request ===
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
GET /legacyclients/3201926 HTTP/1.1
 
GET /legacyclients/3201926 HTTP/1.1

Revision as of 00:59, 16 December 2017

API Endpoint

http://p.lssdev.com

Authentication

In order to interact with the Advice Local API, you must include your API token for each request.

Example Request

GET /legacyclients/3201926 HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json

Errors

Any time the API engine throws an exception, the REST web service will catch the exception and return false with a message relaying what the error was and success = "false".

array(3) {
  ["success"]=>
  bool(false)
  ["data"]=>
  NULL
  ["error"]=>
  string(57) "Sorry, there was an error while trying to run your query."
}

Clients

Orders

Reports

Products

Directories