Stock

The stock service supplies all stock information.

URL Webservice: https://iqservice.stockbase-connect.com/services/stockbase.asmx
URL WSDL: https://iqservice.stockbase-connect.com/services/stockbase.asmx?wsdl

Request

REST

To use the stock service, you need the access token from the authentication service.

URL: https://iqservice.stockbase-connect.com/stockbase/stock/

Headers


                        Authentication: Access Token. (Guid)
                    

SOAP 1.1

To use the stock service, you need the access token from the authentication service.

Headers


                        Content-Type: text/xml
                    

Text


                        <?xml version="1.0" encoding="utf-8"?>
                        <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
                          <soap:Body>
                            <Stockbase xmlns="https://iqservice.divide.nl/">
                              <token>guid</token>
                              <service>string</service>
                            </Stockbase>
                          </soap:Body>
                        </soap:Envelope>
                    

SOAP 1.2

To use the stock service, you need the access token from the authentication service.

Headers


                        Content-Type: application/soap+xml
                    

Text


                        <?xml version="1.0" encoding="utf-8"?>
                        <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                          <soap12:Body>
                            <Stockbase xmlns="https://iqservice.divide.nl/">
                              <token>guid</token>
                              <service>string</service>
                            </Stockbase>
                          </soap12:Body>
                        </soap12:Envelope>
                    

Library (VB.NET)

Function: Stockbase.GetStock

Parameters


                        Token: AuthenticationToken / RefreshToken (GUID)
                    

Library (PHP)

Example code

For client class instantiating, see the API documentation.


                            $divideIq = new DivideIQ($username, $password, $environment);
                            $result = $divideIq->request('stockbase_stock');
                        

Response

Success


                        @StockResponse {
                            Groups: [
                                {
                                    Brand: Brand of the supplier,
                                    Code: Unique Stockbase code set for a brand,
                                    SupplierCode: Unique supplier code set for a supplier,
                                    SupplierGLN: GLN of the supplier,
                                    Items: [
                                        {
                                            EAN: International/European Article Number,
                                            Amount: Available stock amount for sale,
                                            NOOS: Flag for 'never out of stock', which indicates an article can always be sold even though there is no direct available stock,
                                            Timestamp: Latest mutation timestamp (UNIX timestamp (UTC) in seconds.).
                                        },
                                        ...
                                    ]
                                },
                                ...
                            ]
                        }
                    

REST

Headers


                            Response Status: 200
                            Content-Type: text/html
                        

Text


                            <?xml version="1.0" encoding="utf-16"?>
                            <nl.divide.iq xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                                <answer>Success</answer>
                                <authentication_token>912bb42f-a4e4-44b8-ae8b-7326883f1d6c</authentication_token>
                                <expiration_date>2014-06-13T16:02:13.4230000</expiration_date>
                                <token_type>Authentication</token_type>
                            </nl.divide.iq>
                        

SOAP 1.1

Headers


                            Response Status: 200
                            Content-Type: text/xml
                        

Text


                            <?xml version="1.0" encoding="utf-8"?>
                            <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
                              <soap:Body>
                                <StockbaseResponse xmlns="https://iqservice.divide.nl/">
                                  <StockbaseResult>string</StockbaseResult>
                                </StockbaseResponse>
                              </soap:Body>
                            </soap:Envelope>
                        

SOAP 1.2

Headers


                            Response Status: 200
                            Content-Type: application/soap+xml
                        

Text


                            <?xml version="1.0" encoding="utf-8"?>
                            <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                              <soap12:Body>
                                <StockbaseResponse xmlns="https://iqservice.divide.nl/">
                                  <StockbaseResult>string</StockbaseResult>
                                </StockbaseResponse>
                              </soap12:Body>
                            </soap12:Envelope>
                        

PHP

Headers


                            Response Status: 200
                            Content-Type: application/json
                        

Text


                            {}
                        

CredentialsEmpty

Headers


                    Response Status: 200
                    Content-Type: text/xml | application/json
                

Text


                    <?xml version="1.0" encoding="utf-16"?>
                    <nl.divide.iq xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                        <answer>LoginCredentialsEmpty</answer>
                    </nl.divide.iq>
                

CredentialsInvalid

Headers


                    Response Status: 200
                    Content-Type: text/xml | application/json
                

Text


                    <?xml version="1.0" encoding="utf-16"?>
                    <nl.divide.iq xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                        <answer>LoginCredentialsInvalid</answer>
                    </nl.divide.iq>