OrderRequest

This documentation tells you what basic fields we expect for orderhandling incl dropshipment.

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

Basic input

Name Type Required Description MAX length
OrderRequest
OrderHeader OrderHeader class * Header information.
OrderLines OrderLine class * 1 or more order lines.
OrderDelivery OrderDelivery class Dropshipment information.
OrderHeader
OrderNumber String * Ordernumber from retailsystem/shop. 100
TimeStamp DateTime * Timestamp order.
Attention String Extra information relevant for order processing.
Orderline
Number Integer * Line number.
EAN String * EAN. 50
Amount Integer * Amount/Quantity.
OrderDelivery
Person Person class * Customer information.
Address Address class * Delivery address / address pickup point.
Person
Gender String Gender (M/F Or Male/Female).
Initials String Initials. 50
FirstName String First name. 100
SurnamePrefix String Surname prefix. 50
Surname String * Surname. 100
Company String Company. 100
Address
Street String * Street name. 100
StreetNumber String * Street number. 50
StreetNumberAddition String Street number addition. 50
ZipCode String * Zip code. 50
City String * City. 100
CountryCode String * CountryCode (ISO2 or ISO3). 3

Request

REST

The REST protocol is not supported yet.

SOAP 1.1

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

Headers


    Content-Type: text/xml; charset=utf-8
                    

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>
        <OrderRequest xmlns="http://tempuri.org/">
            <token>guid</token>
            <order />
        </OrderRequest>
        </soap:Body>
    </soap:Envelope>
                

SOAP 1.2

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

Headers


    Content-Type: application/soap+xml; charset=utf-8
                    

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>
        <OrderRequest xmlns="http://tempuri.org/">
          <token>guid</token>
          <order />
        </OrderRequest>
      </soap12:Body>
    </soap12:Envelope>
                

Library (VB.NET)

Function: Stockbase.GetStock

Test function


    Private Sub StockbaseOrderRequestTest()
        Dim client As New IQClient.Client(IQClient.Client.ClientMode.Sandbox)

        Dim loginResponse As IQModels.IQ.Models.LoginResponse = client.Login("username", "password")

        If loginResponse IsNot Nothing Then
            Dim authenticationToken As Guid = loginResponse.AuthenticationToken

            Dim authenticationResponse As IQModels.IQ.Models.AuthenticationResponse = client.Authenticate(authenticationToken)

            If authenticationResponse IsNot Nothing Then
                Dim accessToken As Guid = authenticationResponse.AccessToken
                Dim order As IQModels.Stockbase.Models.OrderRequest = CreateStockbaseOrder()
                Dim orderRequestResponse As IQModels.OrderHandlingService.Models.OrderRequestResponse = client.Stockbase.OrderRequest(accessToken, order)
            End If

        End If
    End Sub

    Private Function CreateStockbaseOrder() As IQModels.Stockbase.Models.OrderRequest
        Dim newAddress As New Models.Address("Streetname", "Streetnumber", "zipcode", "city", "CountryCode")
        Dim newPerson As New Models.Person(IQModels.OrderHandlingService.Enums.Gender.xxx, "Initials", "FirstName", "SurnamePrefix", "Surname", "Company")
        Dim newOrderDelivery As New Models.OrderDelivery(newPerson, newAddress)
        'Dim newOrderDelivery As Models.OrderDelivery = Nothing
        Dim newOrderHeader As New Models.OrderHeader("testNumber12345", DateTime.UtcNow)

        Dim newOrderLine1 As New Models.OrderLine(1, "EAN", Amount)
        Dim newOrderLine2 As New Models.OrderLine(2, "EAN", Amount)
        Dim newOrderLines As New List(Of Models.OrderLine)
        newOrderLines.Add(newOrderLine1)
        newOrderLines.Add(newOrderLine2)

        Dim order = New IQModels.Stockbase.Models.OrderRequest(newOrderHeader, newOrderLines, newOrderDelivery)

        Return order
    End Function
                    

Response

Divide.IQ

  • Success
  • LoginCredentialsEmpty
  • LoginCredentialsNotValid
  • TokenEmpty
  • TokenNotValid
  • TokenNotFound
  • TokenExpired
  • TokenWrongType
  • ClientInactive
  • UserInactive
  • ServiceNotFound
  • ServiceInactive
  • ServiceNotAllowed
  • ActionNotFound
  • ActionNotAllowed

Stockbase creates 1 or more orders, because the possibility exists that different articles need to be send to different systems. These order(s) will be returned with a StatusCode and a ExceptionMessage if thrown.
There are some fields updated:

  • GUID fields from the order handling service database
  • The last order handling service status in field Statuses


    @OrderRequestResponse {
        StatusCode: Success = all orders have been succesfully requested; Error = 1 or more orders have a error,
        GroupsOrderRequestResponseItems: [
            {
                StatusCode: Success or Error,
                ExceptionMessage: Information about the error,
                OrderRequest: {
                    GUID: Updated with the GUID from order handling service> database,
                    Statuses: The last order handling service status,
                    OrderHeader: {
                        GUID: Updated with the GUID from order handling service database,
                        ...
                    },
                    OrderLine: [
                        {
                            GUID: Updated with the GUID from order handling service database,
                            ...
                        },
                    ],
                    OrderDelivery: [
                        {
                            GUID: Updated with the GUID from order handling service database,
                            ...
                        },
                    ],
                    ...
                },
            },
        ]
    }