Image names have changed - is this permanent and are they all different?

Hi,

There appears to have been a change in the last day or so as to how the image names are formatted. For example, a Dark Tan 2 x 3 Tile used to have the image name lego-dark-tan-tile-2-x-3-26603-27-372299-57.jpg (I just happened to still have this page open) but is now lego-dark-tan-tile-2-x-3-26603-1022653.jpg
Why do I care? Well, I maintain a database of all my parts and sales here and on BL and I use the image names to convert to BL partnumbers. With the old image name format, in this case, 57 would refer to Dark Tan and 372299 would refer to part 26603 (yes, I know that is elsewhere in the image name but using that wouldn't work for minifigures). I am also aware that some items have multiple images but I am only interested in the main image for each part.
If it is a case, now, that the last part of the image name is unique to every part/colour variation, including minifigures, then I need to rewrite a load of code and input a load of data but, in the long run, it will simplify things (especially with the minifigures, heads etc.).

So, basically, I would like to know whether the change is permanent and whether the last numbers in the new name are unique.

If there is also a way of getting a list of the Brick Owl image numbers and the actual part numbers/colours (or BL part numbers), for example using the API, then that would be really useful and save a heck of a lot of time! Or, indeed, any suggestions on a better way in general of doing this!

Thanks in advance.

Comments

  • 6 Comments sorted by Votes Date Added
  • That's an interesting use of the image URLs. Yes, we have changed the URL structure due to cache invalidation issues. Yes the last number in the URL is unique.

    You can use the API to translate BO and BL item and color ids. https://www.brickowl.com/api_docs
  • Is it likely to stick like this now or are there any plans to change everything again?

    When I started on BL I created a javascript shortcut to copy all the parts/colours etc. from the order page to the clip board and then I paste it in a form and take it from there. Once I also moved to BO, I couldn't see any partnumbers as such on the order page so used the link to the larger jpg image and, over time, created a look up table to convert them within my form. This was a bit messy for the minifigures though as some of the jpgs didn't have any numbers so most of the text had to be used instead. If the end number is going to be unique for every part/colour combination then it will be less messy but I am starting with a blank lookup table (it actually has 2 parts in it now as I rewrote it all last night and tested with a small order!) and every part/colour combination I sell will need to end up in there!
  • I would recommend using the API as you can download all your order information and map BOIDs to BL IDs. The image URL structure is not really intended for that use case.

    You can also download order item information here https://www.brickowl.com/mystore/orders/download
  • The problem is that I want something I can use on the fly pretty much straight from one of the order pages, hence what I wrote and how it works. It seems odd (to me anyway) that none of those pages appear to have the part numbers / colour codes on them (apart from in some of the image links before the change) for the purchased items, not even in hidden fields. Even the links to the catalogue are based on the description (I guess some sort of database generated / intercepted links), although the minifigures appear to have the part number added to the end.
  • If you go to https://www.brickowl.com/mystore/settings/order_settings you can turn on BOIDs on the order page. Maybe that will help your use case.
  • Aha! Perfect - exactly what I was after! Now to do a little rewritting but most of the data should already be there from using the images before the change.
    Thanks for your help on this.
Sign In or Register to comment.