Adding Inventories, XML Upload

Inventories in XML format are submitted by BrickLink members on the Add Inventory to Catalog page. After they are submitted, they must be approved by an Inventory Administrator before they become available.

The following is a sample file containing the parts which make up the Skeleton Minifig. Detailed explanation of all tags follows. If there is an error on an item, the verification process will stop there, tell you of the error and ask you to correct your file and re-submit your file.

Sample File:

    
        P
        6260
        1
        1
    
    
        P
        3626bpb0001
        1
        1
    
    
        P
        6265
        1
        2
    
    
        P
        6266
        1
        2
    
Basic Tags:
Each file must begin with a tag and end with a tag.
Each item you are listing must begin with a tag and end with a tag.

Each item must begin with its own tag and end with a corresponding closing tag. You can generate the tags in any order you want. Omitting a required tag will generate errors and your file will not be processed.

(Required) Enter the Item Type code as seen in the Item Type Table. The only allowed types here are S (sets), P (parts), B (books), G (gear) and M (minifigs). Minifig inventories only allow P (parts).
(Required) This is a Part Number, Minifig ID, Gear ID or Book ID.
(Required) This is the color ID as seen in the Color Table. For Parts and Gear, put the proper color number as seen in the color table. For all other item types, always put a 0 in this tag.
(Required) This is the quantity of how many of that part or minifig, etc. are in that set or minifig, etc.
(Optional) LEGO sometimes includes couple extra pieces in a set. On each of these items include the EXTRA tags with a Y between them to indicate this.
(Optional) Indicates a build set counterpart by including a Y between the tags.
Tags for Alternate Items:
Some production runs of the same set might include different parts than other. When uploading an inventory of such set, you must include 1 or 2 additional tags for such items listed below. One item must be flagged as Alternate and be optionally tied to a regular (not alternate) item through the same match ID to identify which regular item the alternate item is alternate for. All items with a match ID (the alternate item(s) plus regular item(s)) must be sorted at the bottom of the file and there must be at least 1 alternate item in a match.

(Optional) Identifies an item as being an alternate item by including a Y in between the tags.
(Optional) Identifies which regular item(s) the alternate item(s) are alternate for by adding this tag to the alternate item(s) and regular item(s) in the same group. You can enter any number greater than 0. The match ID must be the same for all items in the same group. In each inventory, the match ID should start from 1 and be incremented by 1.