'bl_lot_id' will be removed from the API in the next day or two. It has been replaced by an array called 'external_id'. this will support multiple external IDs and better allow for Amazon synchronisation later on.
'boid' has been added to many of the API methods. This is a unique Brick Owl item ID. Coloured items consist of the main BOID with a - and then the color id.
Comments
I think I need help with the array inside the item json array. looking at an example, it looks like arrays are formatted two different ways in the same string...
,"external_lot_ids":["14620632"],
and
,"ids":{"4034":{"id":"4034","type":"design_id"},"403440":{"id":"403440","type":"item_no"},"90734-97":{"id":"90734-97","type":"boid"}}}
Shouldn't the external lot array be formatted with key -> value within braces like the ids array?
$XML .= "<ITEM><LOTID>".$items[$j][external_lot_ids]."</LOTID>";
but got output of...
<ITEM><LOTID>Array</LOTID>
so I added...
$XML .= "<ITEM><LOTID>".$items[$j][external_lot_ids][0]."</LOTID>";
and it worked. But I'm concerned about "hardcoding" the array key to the first position, especially if more external IDs get added to the array in the future. Is there a better way?
Presumably again, any additional external ID's that each seller may require will always have a consistent index position, be it data or empty string. Once we know the index position, hardcoding it should be safe enough. I guess...
I am well aware it is awful to change an API at short notice without giving access to the old version... I will try to be better in the future.
api.brickowl.com/v1/inventory/update?... ...external_lot_ids=$id doesn't seem to work. Can you even pass an array as a POST variable?
would it be ...external_lot_ids[0]=$id or ...external_lot_ids=array($id)?
$XML .= "<ITEM><LOTID>".$items[$j][external_lot_ids][0]."</LOTID>";
now needs to be ...
$XML .= "<ITEM><LOTID>".$items[$j][external_lot_ids][other]."</LOTID>";
to work correctly. I guess the json to array function doesn't like the numerical reference.
I was a wiz at making tables and bolding text! lol
Much more user friendly than the TRS-80...
I had a tape with over 100 games on it I think, I should find an emulator, some of those and get out of this thread....
Brian