Webservices

General Information

Stanley and Stella Webservice is a feature that allows you to retrieve basic data from our systems. Less information is provided than via the API itself, but the file is smaller and loads quicker. The Webservice delivers the following data:

  • Catalog : a quick view of the catalog, with less columns than provided in the API, and in one language only.

  • Stock Overview : a full list of all the items we have in stock + the next replenishment date if any

The webservice can easily be connected to Microsoft Excel.

The webservice is https secured

Integration

Endpoint Setting

Baseurl

  • v3 framework : https://webservices.stanleystella.com/OData/ or  https://webservices.stanleystella.com:7448/StanleyStellaWebservice/OData

  • v4 framework : https://webservices.stanleystella.com/ODatav4/ or  https://webservices.stanleystella.com:7448/StanleyStellaWebservice/ODatav4

Services :

  • Catalog : /Catalog

  • Stock Overview : /StockOverview

Parameters : see hereunder

Credentials

In order to use this feature, you will need valid credentials. You can use the following:

  • Username : customer@stanleystella.com

  • Password : STST@xs2016

EDMX Metadata document

To obtain a service metadata document, simply use the following URL : https://webservices.stanleystella.com/ODatav4/$metadata

JSON

You can use the OData feed to build applications that consume the data using JSON : simply add the $format=JSON parameter to your query

Parameters

You can pass parameters to the URL to define a query based on the available data. Just add ?$filter={Expression} at the end of the base URL - where {Expression} is as described below.

Note your browser should automatically replace spaces with %20 and quotes with %27. If not, you will have to do it yourself.

Expressions

You can filter the feed using following expressions:

  • filter a range of values:  ?$filter=Entry_No gt 610 and Entry_No lt 615

  • AND : ?$filter=Style_Code eq STAU760 and Variant_Code eq C001OS

  • OR :  ?$filter=Style_Code eq STAU760 or Variant_Code eq C001OS

  • Less Than : ?$filter=Physical_Stock lt 100

  • Less Than or Equal :  ?$filter=Physical_Stock le 100

  • Greater Than :  ?$filter=Physical_Stock gt 100

  • Greater Than or Equal :  ?$filter=Physical_Stock ge 100

  • Different from : ?$filter=Style_Code ne STAU760

  • Ends with : ?$filter=endswith(Style_Code,'761')

  • Starts with : ?$filter=startswith(Style_Code,'STAU')

  • Contains : ?$filter=substringof(Style_Code,'AU76')

Good to know

  1. You must use the appropriate notation for data type to filter expressions

  2. String values must be delimited with single quote marks

  3. Numeric values require no delimiter

  4. DateTime values must be delimited by single quotation marks and preceeded by the word datetime, such as datetime'2018-01-01T02:13:40.0000000Z'

Example

https://webservices.stanleystella.com:7448/StanleyStellaWebservice/OData/StockOverview?$filter=SKU%20eq%20%27STAU760C002OS%27

you may also wish to retrieve the data in v4 format

https://webservices.stanleystella.com:7448/StanleyStellaWebservice/ODatav4/StockOverview?$filter=SKU%20eq%20%27STAU760C002OS%27


Getting the feed in Excel

Excel can natively import Odata Feed easily. To do so, launch Excel and navigate to the DATA tab, then select "From Other Sources > From OData Feed"


On the screen that pops up, fill in the required fields:


Click on "Next", then select the table and click on Finish:


Now select how you want to display the Data in your excel file and click OK


And you're done ! You can now refresh the data at any time by clicking on the "Refresh" button in the ribbon