Back to Help Topics

Help Topic: Setting up an Independent Store/Vendor

If you run an independent store (i.e. not part of BrickLink or BrickOwl), you can have your store included in Rebrickable's listings. There are three requirements for this inclusion.

  1. Inventory feed - Rebrickable will periodically call a URL on your site that lists your current parts inventory, so our calculations are as accurate as possible.
  2. Add to cart - Rebrickable will send a POST to a URL on your site with a list of parts that should be added to the user's shopping cart.
  3. Optionally, but highly desirable is a way to track referrals - i.e. be able to tell when a sale that was made has come via Rebrickable and not some other channel.

Inventory Feed

You will need to supply a URL, with optional authentication, that returns a JSON formatted list of parts in a similar to the following. This is an example and your field names can vary to better reflect the exact contents.

[
	{
		"id":"1",
		"type":"P",
		"color_name":"Green",
		"itemid":"2357",
		"price":"0.630",
		"condition":"N"
		"qty":"30",
	},
	{
		"id":"2",
		"type":"P",
		"color_name":"Flat Silver",
		"itemid":"4073",
		"price":"0.090",
		"condition":"U"
		"qty":"246",
	}
]
			
FieldMeaning
idA unique identifier that Rebrickable will send back to your site when adding parts to the user's shopping cart.
typeOptional - used to identify a Part in case your feed includes non-parts as well.
color_nameColor of the part. Preferrably something that can be identified from the Colors table. It can be either an ID or a Description from an external site, as long as I know what it is.
itemidThe Part ID in whichever naming system you prefer with Rebrickable, LDraw or BrickLink being the preference.
priceThe price of the part in some consistent currency. At least three decimal places is preferred to minimise errors introduced during currency conversions.
conditionThe condition of the part, N = New, U = Used.
qtyQuantity of this item id you have in stock.

It is ok to have the same part/color/condition appearing as multiple items with different prices.

Add to Cart

Rebrickable will provide links to the user that allows them to add a list of parts directly into their shopping cart on your site. To cater for this, your site should accept a POST with the following parameters.

FieldMeaning
dataA JSON formatted string of the parts to be added, as shown in the following example. SKU is the identifier of the item from your inventory (id field shown above).
utm_sourceThe string 'rebrickable' to aid in your referral tracking.
{  
   "parts":[  
      {  
         "SKU":"1",
         "qty":"22"
      },
      {  
         "SKU":"2",
         "qty":"2"
      },
      {  
         "SKU":"3",
         "qty":"1"
      }
   ]
}