Difference between revisions of "HeavyTruckParts XML Export"
(Spoke with Drew, the description is *technically* optional.) |
(Added fitment year ranges) |
||
(One intermediate revision by the same user not shown) | |||
Line 32: | Line 32: | ||
<!-- The optional year of manufacture for the part --> | <!-- The optional year of manufacture for the part --> | ||
[<year>123</year>] | [<year>123</year>] | ||
<!-- The optional range of fitment years for the part. | |||
If fitsyearfrom is set to a year but fitsyearto is unset or 0, the item will | |||
be assumed to fit starting from fitsyearfrom to the current day. | |||
If fitsyearto is set to a year, but fitsyearfrom is unset or 0, the item will | |||
be assumed to fit from the earliest possible year up to fitsyearto. --> | |||
[<fitsyearfrom>123</fitsyearfrom>] | |||
[<fitsyearto>123</fitsyearto>] | |||
<!-- The optional make of the vehicle the part came off of --> | <!-- The optional make of the vehicle the part came off of --> | ||
Line 92: | Line 100: | ||
<!-- If images for this item are hosted elsewhere, any number of | <!-- If images for this item are hosted elsewhere, any number of | ||
hosted image URLs may be provided. These should be valid | hosted image URLs may be provided. These should be valid | ||
URLs to an image file: http://www.imagehost.com/myimages/image01.jpg --> | URLs to an image file: http://www.imagehost.com/myimages/image01.jpg | ||
[<image>ABC123</image>] | Optionally, a "rank" attribute can be provided to enforce an "importance" | ||
or ordering to the images. --> | |||
[<image [rank=123]>ABC123</image>] | |||
</item> | </item> | ||
</inventory> | </inventory> |
Latest revision as of 10:45, 20 October 2020
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. --> [<tagnumber>ABC123</tagnumber>] <!-- The optional stock number of the vehicle this item has been pulled from --> [<vehiclestocknumber>123</vehiclestocknumber>] <!-- 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 --> [<year>123</year>] <!-- The optional range of fitment years for the part. If fitsyearfrom is set to a year but fitsyearto is unset or 0, the item will be assumed to fit starting from fitsyearfrom to the current day. If fitsyearto is set to a year, but fitsyearfrom is unset or 0, the item will be assumed to fit from the earliest possible year up to fitsyearto. --> [<fitsyearfrom>123</fitsyearfrom>] [<fitsyearto>123</fitsyearto>] <!-- The optional make of the vehicle the part came off of --> [<vehiclemake>ABC123</vehiclemake>] <!-- The optional model of the vehicle the part came off of --> [<vehiclemodel>ABC123</vehiclemodel>] <!-- The optional manufacturer of this part, if appropriate --> [<partmanufacturer>ABC123</partmanufacturer>] <!-- The optional model of this part, if appropriate --> [<partmodel>ABC123</partmodel>] <!-- A description of this part; technically optional but HIGHLY RECOMMENDED --> [<description>ABC123</description>] <!-- The category this part falls under, such as "USED", "OEM", "NEW", or "REMAN" --> [<category>ABC123</category>] <!-- The optional condition of the part --> [<condition>ABC123</condition>] <!-- Optional notes concerning the part; these aren't generally shown to users. --> [<notes>ABC123</notes>] <!-- The optional "side" the part belongs on: Left, Right, Both, or N/A. Values other than these will be ignored. --> [<side>ABC123</side>] <!-- 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 --> [<vin>ABC123</vin>] <!-- The optional OEM number of this item --> [<oemnumber>ABC123</oemnumber>] <!-- The optional serial number of this item [<serialnumber>ABC213</serialnumber>] <!-- The optional quantity of this item on hand. If unspecified, will be set to 1 --> <quantity>123</quantity> <!-- The optional cost of the item --> [<cost>123.123</cost>] <!-- The optional core price of the item --> [<coreprice>123.123</coreprice>] <!-- The optional wholesale price of the item --> [<wholesaleprice>123.123</wholesaleprice>] <!-- The REQUIRED retail price to be shown to users --> <retailprice>123.123</retailprice> <!-- 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>] </item> </inventory> </export>
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"> <tagnumber>1</tagnumber> <vehiclestocknumber></vehiclestocknumber> <parttype typeid="3000">Engine Assembly</parttype> <year>2003</year> <vehiclemake>Freightliner</vehiclemake> <vehiclemodel>FLD120</vehiclemodel> <partmanufacturer>CAT</partmanufacturer> <partmodel>3306C</partmodel> <description>Good runner</description> <category>USED</category> <condition>Excellent</condition> <qa label="Jake">No</qa> <qa label="HP">230</qa> <vin>1234567890ABCDEF</vin> <oemnumber>ABC123</oemnumber> <serialnumber>123456789</serialnumber> <quantity>2</quantity> <cost>600.00</cost> <coreprice>200.00</coreprice> <wholesaleprice>800.00</wholesaleprice> <retailprice>1100.00</retailprice> <image>http://imagehost.isoftdata.com/phpThumb.php?productcode=12345&id=56178</image> <image>http://imagehost.isoftdata.com/phpThumb.php?productcode=12345&id=54312</image> </item> <item inventoryid="2" storeid="1"> <tagnumber>2</tagnumber> <vehiclestocknumber>4</vehiclestocknumber> <parttype typeid="4000">Transmission Assembly</parttype> <year>1996</year> <vehiclemake>Freightliner</vehiclemake> <vehiclemodel>FLD120</vehiclemodel> <partmanufacturer>ROCKWELL</partmanufacturer> <partmodel>RM0-12A</partmodel> <description>Good runner</description> <category>USED</category> <condition>Excellent</condition> <notes></notes> <side></side> <qa label="Speed"></qa> <qa label="INPUT SHAFT"></qa> <qa label="pump"></qa> <qa label="BM#"></qa> <vin>1234567890ABCDEF</vin> <oemnumber>ABC123</oemnumber> <serialnumber>123456789</serialnumber> <quantity>1</quantity> <cost>575.00</cost> <coreprice></coreprice> <wholesaleprice>650.00</wholesaleprice> <retailprice>800.00</retailprice> </item> <item inventoryid="3" storeid="1"> <tagnumber>TG123</tagnumber> <vehiclestocknumber></vehiclestocknumber> <parttype typeid="1200">Door Assembly, Front</parttype> <year></year> <vehiclemake>Ford</vehiclemake> <vehiclemodel>L7000</vehiclemodel> <partmanufacturer></partmanufacturer> <partmodel></partmodel> <description>LH door, ding in side</description> <category>USED</category> <condition>Good</condition> <notes></notes> <side>Left</side> <qa label="Color">Yellow</qa> <qa label="Power Window">No</qa> <vin></vin> <oemnumber></oemnumber> <serialnumber></serialnumber> <quantity>1</quantity> <cost>330.00</cost> <coreprice>0.00</coreprice> <wholesaleprice>500.00</wholesaleprice> <retailprice>600.00</retailprice> </item> </inventory> </export>