OrderRequest

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

URL Webservice: https://iqservice.stockbase-connect.com/services/orderhandlingservice.asmx
URL WSDL: https://iqservice.stockbase-connect.com/services/orderhandlingservice.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.
OrderSystem Order system Enum Order system name.
OrderSystemSettings OrderSystemSetting class Order system connection settings.
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.
Price Decimal Total price of the orderline.
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
OrderSystemSetting
Key String * Name of the key. For example 'URL', 'username', 'password'.
Value String * Value connected to the key.

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>
          <OrderRequest>
            <ClientGUID>guid</ClientGUID>
            <OrderSystem>Undefined or PluriformESI or AWGFashionXepos</OrderSystem>
            <OrderSystemSettings>
              <OrderSystemSetting>
                <Key>string</Key>
                <Value>string</Value>
              </OrderSystemSetting>
              <OrderSystemSetting>
                <Key>string</Key>
                <Value>string</Value>
              </OrderSystemSetting>
            </OrderSystemSettings>
          </OrderRequest>
        </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>
          <OrderRequest>
            <ClientGUID>guid</ClientGUID>
            <OrderSystem>Undefined or PluriformESI or AWGFashionXepos</OrderSystem>
            <OrderSystemSettings>
              <OrderSystemSetting>
                <Key>string</Key>
                <Value>string</Value>
              </OrderSystemSetting>
              <OrderSystemSetting>
                <Key>string</Key>
                <Value>string</Value>
              </OrderSystemSetting>
            </OrderSystemSettings>
          </OrderRequest>
        </OrderRequest>
      </soap12:Body>
    </soap12:Envelope>
                

Library (VB.NET)

Function: Stockbase.GetStock

Test function


    Private Sub OrderHandlingServiceTest()
        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 Models.OrderRequest = CreateOHSOrder()
                Dim orderRequestResponse As Models.OrderRequestResponse = client.OrderHandlingService.OrderRequest(accessToken, order)
            End If

        End If
    End Sub

    Private Function CreateOHSOrder() As 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 orderSystemSettings As New List(Of Models.OrderSystemSetting)
        orderSystemSettings.Add(New Models.OrderSystemSetting("url", "http://xxx.xxx"))
        orderSystemSettings.Add(New Models.OrderSystemSetting("username", "name"))
        orderSystemSettings.Add(New Models.OrderSystemSetting("password", "pass"))

        Dim order = New Models.OrderRequest(IQModels.OrderHandlingService.Enums.OrderSystem.xxx, orderSystemSettings, Guid.NewGuid(), 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

The order 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,
                            ...
                        },
                    ],
                    ...
                },
            },
        ]
    }