query Midwich by erin.natividad

VIEWS: 3 PAGES: 17

									Midwich XML QUERY Message                                      Revision 1.2 (30/01/2007)




                              Midwich Implementation Guide
                                          For
                            Stock/Pricing query XML Messages




                                         1 of 17
Midwich XML QUERY Message                                                                  Revision 1.3 (20/08/2005)




Introduction

This document provides the specification for the realtimeCheck service and the XML ‘Query’ response
messages, these return minimally delayed stock and pricing information to trading partners.


For an explanation of how Midwich implements XML services and the information we need from you please
refer to the Midwich Implementation Guide for XML Services. The first step in implementing xml trading is to
contact your Midwich Sales Representative. We will agree terms and conditions and agree a testing strategy.


When agreed, Midwich will supply you with a trading ID and a password; these are used in the XML
exchanges.


Further documentation is available on our web site which describes in-depth the structure of the XML
messages used by Midwich.


A complete example 'QUERY' message can be found in Appendix A at the end of this document.


Document Notes

    1. Only segments that are used by Midwich are included in these guidelines
    2. The examples that are contained at the rear of this document are not exhaustive, different scenarios
        may contain more or less elements than in these examples.
    3. This specification may be amended at any time. Midwich will notify you of any changes before the go
        live date.


Contacts

If you require any further information on this document or XML trading with Midwich, please contact
edi.admin@midwich.com

Revision History

Revision Date        Author           Details

       0.1 29/01/04 Scott Porter      Document released

       1.0 17/08/05 Geoffrey walton Updated introduction and input and stock definition.

       1.1 20/8/05   Geoffrey walton Added info on new.xmledi.php.

       1.3 30/01/07 Geoffrey Walton Include ORDVAL info




                                                           2 of 17
Midwich XML QUERY Message                                                                Revision 1.3 (20/08/2005)




Input

If you are only checking prices and stock availability you should contact your account
manager with the IP address that the enquiry will come from, and they will arrange for this
service to be made available to you.

http://www.midwich.com/services/realtimeCheck.php


Anybody who is registered to place orders (or is going to) using XML should use the
following URL as it provides more current information. Please see the XML Implementation
Guide available on our web site for the steps to follow to enable this service.

http://xmledi.midwich.com:8090/xmledi.php?message=ORDVAL


This interface requires the following parameters added to the URL and for them to be
passed via a GET request. The interface does not accept XML/Soap/RPC requests at this
time (all parameter names should be passed in lower case):

       tpid       -       Username from Trading partner (supplied by Midwich)
       pass       -       Password from Trading partner (supplied by Midwich)
       midwpn     -       Midwich part number for product.
       manupn     -       Manufacturer part number for product.


Please note the midwpn and manupn fields are mutually exclusive. There is no need to specify both fields. If
both are specified, only the Midwich part number is used. Supplying only manupn will result in errors, as we
can have more than Midwich part no for one manufacturer part no. Special and clearance spring to mind.


Example requests follow:


http://www.midwich.com/services/realtimeCheck.php?tpid=SomeUserName&pass=SomePassword&midwpn
=LEXMARKX5150


This following format has been superseded by the ORDVAL message.


http://xmledi.midwich.com:8090/xmledi.php?message=QUERY&tpid=SomeUserName&pass=SomePasswor
d&midwpn=LEXMARKX5150



QUERY                             Query response message

This is a message returning stock and pricing information for products available from Midwich Ltd.


                                                   3 of 17
Midwich XML QUERY Message                                                                Revision 1.3 (20/08/2005)




Query Header
The query header section provides transaction information for the XML message. This section contains the
following elements:
      Username
      Accountno
      Queryresult
      Generation


Productdata
The productdata section provides detailed information for the requested product. This section contains the
following elements:
      Midwpartno
      Manupartno
      Manuname
      Productname
      Category
      Description
      List
      Dealerprice
      Weight
      Stock
      Type


Accessorylist
The accessorylist section provides details of accessories and consumables for mainline items. It will only be
present for mainline items that have accessories and consumables available. This section contains the
following elements:
      Accessory


Queryheader                                         Message transaction info.
This section of the document provides a breakdown in detail of the queryheader section, including an
example XML snippet.


Overview
This section provides transaction information, including the query result code and date/time of message
generation.


Example
An example of the queryheader section is as follows:

                                                    4 of 17
Midwich XML QUERY Message                                                        Revision 1.3 (20/08/2005)




     <queryheader>
           <username>SomeUserName</username>
           <accountno>0000123456</accountno>
           <queryresult>
                  <result>QUERY_SUCCESS</result>
                  <info>Product details for LEXMARKX5150</info>
           </queryresult>
           <generation>
                  <date>20040201</date>
                  <time>175808</time>
           </generation>
      </queryheader>

<username>                               Trading partner username

The username for the trading partner making a request.

Element Breakdown:

  Element Name               Type                        Length         Format           Status
  <username>                 Character                     25             n/a           Mandatory



Element Description:

  Element Name               Description
  <username>                 The username passed to the interface when the query was made.


Element Example:


     <username>SomeUserName</username>




<accountno>                              Trading partner account number

Midwich account number for this trading partner. Used for confirmation of correct account details.

Element Breakdown:

  Element Name               Type                        Length         Format             Status

                                               5 of 17
Midwich XML QUERY Message                                                            Revision 1.3 (20/08/2005)




  Element Name               Type                        Length            Format            Status
  <accountno>                Character                     10              numeric          Mandatory



Element Description:

  Element Name               Description
  <accountno>                The Midwich allocated account number associated with the credentials
                             supplied for this query.


Element Example:


     <accountno>0000123456</accountno>




<queryresult>                            Query result information

This element defines the result for the stock query enquiry. The information supplied can be used
by the remote client to ascertain whether a query succeeded or not. This block contains 2
elements.

Element Breakdown:

  Element Name                 Type                      Length            Format              Status

  <result>                     -                           n/a               n/a            Mandatory

  <info>                       -                           n/a               n/a            Mandatory



Element Description:

  Element Name                 Description
  <result>                     Result code for query. Possible values are:
                               QUERY_SUCCESS for success
                               QUERY_FAIL for failure
  <info>                       Description of XML message content or details of reason for failure.




Element Example:


     <queryresult>
                  <result>QUERY_SUCCESS</result>

                                               6 of 17
Midwich XML QUERY Message                                                               Revision 1.3 (20/08/2005)




                    <info>Product details for LEXMARKX5150</info>
      </queryresult>



<generation>                                  Message generation timestamp

This element defines the date and time the XML response was generated.

Element Breakdown:

   Element Name                     Type                          Length      Format              Status

   <date>                           -                               8       YYYYMMDD           Mandatory

   <time>                           -                               6        HHMMSS            Mandatory



Element Description:

   Element Name                     Description
   <date>                           Date stamp for XML message generation. Numeric field containing full
                                    year, month and date. (GMT)
   <time>                           Time stamp for XML message generation. Numeric field containing hours,
                                    minutes and seconds. (GMT).




Element Example:


      <generation>
                    <date>20040201</date>
                    <time>175808</time>


      </generation>      Productd Requested product info.
ata
This section of the document provides a breakdown in detail of the productdata section, including an
example XML snippet.


Overview
This section provides all available product detail information.


Example
An example of the productdata section is as follows:

                                                     7 of 17
Midwich XML QUERY Message                                                       Revision 1.3 (20/08/2005)




     <productdata>
           <midwpartno>LEXMARKX5150</midwpartno>
           <manupartno>17K0002</manupartno>
           <manuname>Lexmark</manuname>
           <productname>X5150      Multifunction Printer</productname>
           <category>Multi-function Systems</category>
           <description>A4 Multifunction scan 600x2400dpi 48 bit colour Printer
4800x1200dpi 17ppm mono 13ppm colour and copy</description>
           <list>100.00</list>
           <dealerprice>53.37</dealerprice>
           <weight weightsystem="Kg">8.42</weight>
           <stock>0</stock>
           <type>Mainline Product</type>

</productdata>   <midwpart Midwich part number
no>
The Midwich part number.

Element Breakdown:

  Element Name              Type                        Length         Format           Status
  <midwpartno>              Character                     20             n/a           Mandatory



Element Description:

  Element Name              Description
  <midwpartno>              The Midwich part number for the product.


Element Example:


     <midwpartno>LEXMARKX5150</midwpartno>




<manupartno>                            Manufacturers part number

The Manufacturers part number.

                                              8 of 17
Midwich XML QUERY Message                                                        Revision 1.3 (20/08/2005)




Element Breakdown:

  Element Name              Type                        Length          Format           Status
  <manupartno>              Character                     20              n/a           Mandatory



Element Description:

  Element Name              Description
  <manupartno>              The Manufacturers own part number for the product.


Element Example:


     <manupartno>17K0002</manupartno>

<manuname>                              Manufacturers name

The Manufacturer’s trading name.

Element Breakdown:

  Element Name              Type                        Length          Format           Status
  <manuname>                Character                     40              n/a           Mandatory



Element Description:

  Element Name              Description
  <manuname>                The Product manufacturer’s trading name.


Element Example:


     <manuname>Lexmark</manuname>




<productname>                           Product name

The product name.

Element Breakdown:

  Element Name              Type                        Length          Format             Status

                                              9 of 17
Midwich XML QUERY Message                                                         Revision 1.3 (20/08/2005)




  Element Name              Type                        Length           Format           Status
  <productname>             Character                     30               n/a           Mandatory



Element Description:

  Element Name              Description
  <productname>             Name of the product.


Element Example:


     <productname>X5150      Multifunction Printer</productname>

<category>                              Product category

The product category.

Element Breakdown:

  Element Name              Type                        Length           Format           Status
  <category>                Character                     30               n/a           Mandatory



Element Description:

  Element Name              Description
  <category>                The category to which the product belongs.


Element Example:


     <category>Multi-function Systems</category>




<description>                           Product description

The product description.

Element Breakdown:

  Element Name              Type                        Length           Format           Status
  <description>             Character                    255               n/a           Mandatory




                                             10 of 17
Midwich XML QUERY Message                                                              Revision 1.3 (20/08/2005)




Element Description:

  Element Name              Description
  <description>             A short description for the product. This does not list the product capabilities
                            or features.


Element Example:


     <description>A4 Multifunction scan 600x2400dpi 48 bit colour Printer
4800x1200dpi 17ppm mono 13ppm colour and copy</description>

<list>                                   Product list price

The product list price.

Element Breakdown:

  Element Name              Type                          Length            Format             Status
  <list>                    Character                      n/a              Numeric           Mandatory



Element Description:

  Element Name              Description
  <list>                    The product list price. Floating point format (pounds and pence, 2 decimal
                            places).


Element Example:


      <list>100.00</list>




<dealerprice>                            Dealer price

The dealers price.

Element Breakdown:

  Element Name              Type                          Length            Format             Status
  <dealerprice>             Character                      n/a              Numeric           Mandatory



Element Description:

                                               11 of 17
Midwich XML QUERY Message                                                             Revision 1.3 (20/08/2005)




  Element Name              Description
  <dealerprice>             The trading partners (often unique) buy price for the product. This is based
                            upon the base price, with any price deals for the trading partner factored in.


Element Example:


     <dealerprice>73.37</dealerprice>

<weight>                                Product weight

The product net weight.

Element Breakdown:

  Element Name              Type                          Length           Format             Status
  <weight>                  Character                      n/a             Numeric           Mandatory



Element Description:

  Element Name              Description
  <weight>                  The product weight, expressed in terms defined by the elements
                            “weightsystem” property. The default is kilogram’s. Weight is accurate to 2
                            decimal places.


Element Example:


     <weight weightsystem="Kg">8.42</weight>




<stock>                                 Stock level

The product stock level.

Element Breakdown:

  Element Name              Type                          Length           Format             Status
  <stock>                   Character                      n/a             Numeric           Mandatory



Element Description:

  Element Name              Description
  <stock>                   The stock level available for the requesting trading partner.
                                               12 of 17
Midwich XML QUERY Message                                                                Revision 1.3 (20/08/2005)




Element Example:


      <stock>13</stock>

<type>                                       Product type

The product type.

Element Breakdown:

  Element Name                   Type                         Length           Format            Status
  <type>                         Character                      40               n/a            Mandatory



Element Description:

   Element Name                  Description
   <type>                        The product type. Examples would be “Mainline product” or “Accessory”.


Element Example:


      <type>Mainline Product</type>




Accessorylist                                       Product accessory list.
This section of the document provides a breakdown in detail of the accessorylist section, including an
example XML snippet.


Overview
This section provides accessory/consumable information. When present, it will contain one or more
accessory elements which describe available accessories or consumables for the requested product.


Example
An example of the accessorylist section is as follows:




      <accessorylist>
             <accessory>
                   <midwpartno>001XWGB21</midwpartno>
                                                   13 of 17
Midwich XML QUERY Message                                                          Revision 1.3 (20/08/2005)




                  <manupartno>001XWGB21</manupartno>
                  <manuname>Lexmark</manuname>
                  <productname>Warranty</productname>
           </accessory>
           <accessory>
                  <midwpartno>002XWGB21</midwpartno>
                  <manupartno>002XWGB21</manupartno>
                  <manuname>Lexmark</manuname>
                  <productname>Warranty</productname>
           </accessory>
           <accessory>
                  <midwpartno>LEX80D1706</midwpartno>
                  <manupartno>0080D1706</manupartno>
                  <manuname>Lexmark</manuname>
                  <productname>Photo Paper</productname>
           </accessory>
     </accessorylist>




<accessory>                             Accessory information

This element defines the details for a product accessory or consumable. It does not contain the
detailed information for these products found in the productdata section above, but sufficient
information to perform a further query for more information about the accessory product(s). There
can be one or more accessory elements within the accessorylist element.

Element Breakdown:

  Element Name                 Type                      Length           Format             Status

  <midwpartno>                 -                          20               n/a            Mandatory

  <manupartno>                 -                          20               n/a            Mandatory

  <manuname>                   -                          40               n/a            Mandatory

  <productname>                -                          30               n/a            Mandatory



Element Description:

  Element Name                 Description
  <midwpartno>                 The Midwich part number for the product.

                                              14 of 17
Midwich XML QUERY Message                                                                           Revision 1.3 (20/08/2005)




   Element Name                             Description
   <manupartno>                             The manufacturers part number for the product.

   <manuname>                               The manufacturers trading name.

   <productname>                            The descriptive name for the product. This is not a detailed description.



Element Example:


        <accessory>
                        <midwpartno>001XWGB21</midwpartno>
                        <manupartno>001XWGB21</manupartno>
                        <manuname>Lexmark</manuname>
                        <productname>Warranty</productname>
        </accessory>




                                                     APPENDIX A – EXAMPLE
                                                  'QUERY RESPONSE MESSAGE'


Example 1

This example demonstrates a QUERY message response to a request for details of Midwich part number LEXMARKX5150 including
accessory list details (trading partner details replaced with dummy data).




<?xml version="1.0" standalone="yes" ?>
<!-- Midwich Ltd Realtime Product Data Feed -->
<query>
        <queryheader>
                <username>SomeUserName</username>
                <accountno>0000123456</accountno>
                <queryresult>
                        <result>QUERY_SUCCESS</result>
                        <info>Product details for LEXMARKX5150</info>
                </queryresult>
                <generation>
                        <date>20040201</date>
                        <time>175808</time>
                                                                15 of 17
Midwich XML QUERY Message                                                                              Revision 1.3 (20/08/2005)



               </generation>
       </queryheader>
       <productdata>
               <midwpartno>LEXMARKX5150</midwpartno>
               <manupartno>17K0002</manupartno>
               <manuname>Lexmark</manuname>
               <productname>X5150 Multifunction Printer</productname>
               <category>Multi-function Systems</category>
               <description>A4 Multifunction scan 600x2400dpi 48 bit colour Printer 4800x1200dpi 17ppm mono 13ppm colour and
copy</description>
               <list>100.00</list>
               <dealerprice>53.37</dealerprice>
               <weight weightsystem="Kg">8.42</weight>
               <stock>0</stock>
               <type>Mainline Product</type>
       </productdata>
       <accessorylist>
               <accessory>
                         <midwpartno>001XWGB21</midwpartno>
                         <manupartno>001XWGB21</manupartno>
                         <manuname>Lexmark</manuname>
                         <productname>Warranty</productname>
               </accessory>
               <accessory>
                         <midwpartno>002XWGB21</midwpartno>
                         <manupartno>002XWGB21</manupartno>
                         <manuname>Lexmark</manuname>
                         <productname>Warranty</productname>
               </accessory>
               <accessory>
                         <midwpartno>LEX80D1706</midwpartno>
                         <manupartno>0080D1706</manupartno>
                         <manuname>Lexmark</manuname>
                         <productname>Photo Paper</productname>
               </accessory>
               <accessory>
                         <midwpartno>LEX80D1707</midwpartno>
                         <manupartno>80D1707</manupartno>
                         <manuname>Lexmark</manuname>
                         <productname>Photo paper Premium</productname>
               </accessory>
               <accessory>
                         <midwpartno>LEXCZ55BLK</midwpartno>
                         <manupartno>0018L0032</manupartno>
                         <manuname>Lexmark</manuname>
                         <productname>Ink Cartridge</productname>
               </accessory>
               <accessory>
                         <midwpartno>LEXCZ55COL</midwpartno>
                         <manupartno>0018L0042</manupartno>

                                                             16 of 17
Midwich XML QUERY Message                                          Revision 1.3 (20/08/2005)



                      <manuname>Lexmark</manuname>
                      <productname>Ink Cartridge</productname>
              </accessory>
       </accessorylist>
</query>




                                                        17 of 17

								
To top