HeavyTruckParts XML Export

From ISoft Wiki
Jump to: navigation, search

We support a generalized XML export file for importing inventory into HeavyTruckParts.Net.

The commented specification. Tags are marked with brackets ([]) if they are optional. Contents and attributes are identified with "123" if they take numbers and "ABC123" for text strings.

<?xml version="1.0" ?>
<!-- Begin the export; the companyid is a company "product code" issued by ISoft -->
<export companyid="123"> 
    <!-- Begin the list of inventory; the version is the version of this XML specification you're using.  
         The exporttype is an advisory request as to whether this is a complete export, or a partial export. -->
    <inventory version="1.1" exporttype="partial/complete"> 

            <!-- Begin an inventory item.  Both the inventory id and the store id are optional but strongly recommended.
                 The inventoryid is a unique value that represents the inventory item in your inventory system.  
                 The storeid is the store number, if you have multiple stores, that the item comes from.  
                 If the inventoryid is 0 or unspecified, HTP will attempt to generate values for you.  
                 If the storeid is unspecified, HTP will use store 1. -->
            <item [inventoryid="123"] [storeid="123"]> 

            <!-- The optional tag number you use to refer to this inventory item.  
                 If this is not specified, HTP will use the inventory id of the item. -->

            <!-- The optional stock number of the vehicle this item has been pulled from -->

            <!-- The REQUIRED part type of this item.  typeid refers to the type number in ISoft's ITrack system.  
                 The text is a text description of that part type.  If you require a cross reference
                 from your types to ITrack types, contact ISoft Data Systems, for assistance. -->
            <parttype typeid="123">ABC123</parttype> 

            <!-- The optional year of manufacture for the part -->

            <!-- The optional make of the vehicle the part came off of -->

            <!-- The optional model of the vehicle the part came off of -->

            <!-- The optional manufacturer of this part, if appropriate -->

            <!-- The optional model of this part, if appropriate -->

            <!-- A description of this part; technically optional but HIGHLY RECOMMENDED -->

            <!-- The category this part falls under, such as "USED", "OEM", "NEW", or "REMAN" -->

            <!-- The optional condition of the part -->

            <!-- Optional notes concerning the part; these aren't generally shown to users. -->

            <!-- The optional "side" the part belongs on: Left, Right, Both, or N/A.  
                 Values other than these will be ignored. -->

            <!-- Up to 4 of these optional tags may be specified.  
                   These are "more" fields or "Question and answer" fields, 
                   where "label" is the "question" and the content is the "answer" -->
            [<qa label="ABC123">ABC123</qa>]

             <!-- The optional VIN of the vehicle this item came off of -->

            <!-- The optional OEM number of this item -->

            <!-- The optional serial number of this item

            <!-- The optional quantity of this item on hand. If unspecified, will be set to 1 -->

            <!-- The optional cost of the item -->

            <!-- The optional core price of the item -->

            <!-- The optional wholesale price of the item -->

            <!-- The REQUIRED retail price to be shown to users -->

            <!-- If images for this item are hosted elsewhere, any number of
                  hosted image URLs may be provided.  These should be valid 
                  URLs to an image file: http://www.imagehost.com/myimages/image01.jpg 
                  Optionally, a "rank" attribute can be provided to enforce an "importance" 
                  or ordering to the images. -->
            [<image [rank=123]>ABC123</image>]

For the best results, specify at least the partmanufacturer and partmodel or vehiclemake and vehiclemodel. When a field is optional, it may be omitted, or included with empty contents. If you do not specify inventoryid values for all items, we only support complete exports, where all of your inventory will be removed from HeavyTruckParts.Net and replaced with the contents of the export file. If inventoryid values are specified for all items in the export, ISoft supports the concept of a "partial export," which can update items already listed, or add new items without affecting already uploaded inventory.

A sample export file with three items:

<?xml version="1.0"?>
<export companyid="12345">
    <inventory version="1.0">
        <item inventoryid="1" storeid="1">
            <parttype typeid="3000">Engine Assembly</parttype>
            <description>Good runner</description>
            <qa label="Jake">No</qa>
            <qa label="HP">230</qa>
        <item inventoryid="2" storeid="1">
            <parttype typeid="4000">Transmission Assembly</parttype>
            <description>Good runner</description>
            <qa label="Speed"></qa>
            <qa label="INPUT SHAFT"></qa>
            <qa label="pump"></qa>
            <qa label="BM#"></qa>
        <item inventoryid="3" storeid="1">
            <parttype typeid="1200">Door Assembly, Front</parttype>
            <description>LH door, ding in side</description>
            <qa label="Color">Yellow</qa>
            <qa label="Power Window">No</qa>