Bulk Upload BIN locations via CSV

started a topic about 8 years ago

Currently you have to create BINs one by one manually, would be awesome if there was some sort of bulk uploader.  We have 3000+ bins, so it makes it tough to use the feature as is.

6 people like this idea
  • Agree this is much needed. Also categories should be able to be uploaded via CSV.

  • Agree! This would be make bin management MUCH easier!

  • simple CSV import like elsewhere in DEAR be very helpful

  • +1 from me. Migrating/integrating with my 3PL system is proving tricky as the FEFO stock is held in multiple locations and doing bin entry by hand will be a real pain.

  • If you have a little development background you can just hit the same endpoint as the website:

    I just ran this with my Bin locations:


    for i in `cat bins-json.txt` ; do
    curl -v --header  "Content-Type: application/json"  -b "<Copy your cookies from the website here" -d $i   <span class="fr-marker" data-id="0" data-type="true" style="display: inline-block; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="false" style="display: inline-block; line-height: 0;"></span><Not sure this is needed>  ; done


    Where bins-json looks like:


    {"ParentID":"<YOUR Parent ID Here>","Description":"<YOUR BIN LOCATION","IsDefault":false,"AllowReorder":false,"FFServiceID":"","ReferenceCount":0,"UseForFixedAssetsOnly":false} 


    1 person likes this
  • Martin - thanks but can you give me a little help with your post?

    What cookie value(s) are you copying?  The two which look most promising are .ASPXAUTH and .AS.NET_SessionId but I'm not having luck with either.

    re-written as a single line I can't get this to create the Bin.  Would you be able to help?

    curl -v --header "Content-Type: application/json" -b "<my .ASPXAUTH value pasted here>" -d {"ParentID":"WW","Description":"test_bin_1","IsDefault":false,"AllowReorder":false,"FFServiceID":"","ReferenceCount":0,"UseForFixedAssetsOnly":false} 

    <> ; done

    where "WW" is my existing Location and "test_bin_1" is my Bin to be created

  • I'm actually no longer using Dear (a long story , though I did complete the migration we just sold before we used it in anger):

    So the two value you need to pull from the website are your Cookies (Which contains the authentication and the ParentID which is a GUID.

    These are the full steps I took to do this. TL;DR Inspect the request made by the web browser when adding a Bin and pull the values from that.

    • Head over to : in Chrome (or your favourite browser) - Pull up the Developer Console (right click on some whiet space and say "inspect", is easiest way)
    •  Move to the Network Tab
    • Return to the web page Locations & Bin and add a new bin. When you click save you'll see the request in the Network Tab (I've attached the screen shot of my request to help you.)
    •  The Cookie value you require is in the Request Headers. You need to copy the whole thing and put it in quotes this is what mine looked like  

    "; _ga=GA1.2.15040930.1466526059; ProductPageSize=100; WooCommerceBulkPageSize=50; StockPageSize=50; PurchaseListPageSize=100; .ASPXAUTH=9CC66B0168556730C0AE79BD8799ADFAA95ACBF2B942D0C61D076636E5B7411AA262EC205C417D4AB174F527F537A0DBAD520F38BE63F936BEA3B824F3E48EB037B26A1FA3A8862DA5F624DBF2B205CF7D6CA8DEF5D28C1F2BB72946FF3DA3A7A908F9BDF34089CD5CD11EE654AFFE834C2015CD4D435213D990BDBD07BB0776CF64E8EE; ASP.NET_SessionId=ufqe2mjwrasdgbg3x5xxw45v; __RequestVerificationToken=1jOIL0V0wWRs0EhJQ3iIAeyBE1i0shTcFsgNTnpj_vg0920fv0T69KT3Jo1hRmJ8fTlarcg6hLgyyxcciKekIgsAKjE1; i18n.langtag=en"

    • You should also see The Request URL as a _dc query param. I copied that too but I didn't need it.
    • The Parent ID is part of the request and in my case it is:  



     You're one liner isn't right as you've left half of the for loop in there. I tried this one-liner and created your Bin "test_bin1" 


    I just ran this on a new account and all was good:

    curl -v --header  "Content-Type: application/json"  -b "; _ga=GA1.2.15040930.1466526059; ProductPageSize=100; WooCommerceBulkPageSize=50; StockPageSize=50; PurchaseListPageSize=100; .ASPXAUTH=9CC66B0168574690C0AE79BD8799ADFAA95ACBF2B942D0C61D076636E5B7411AA262EC205C417D4AB174F527F537A0DBAD520F38BE63F936BEA3B824F3E48EB037B26A1FA3A8862DA5F624DBF2B205CF7DSCA8DEF5D28C1F2BB72946FF3DA3A7A908F9BDF34089CD5CD11EE654AFFE834C2015CD4D435213D990BDBD07BB0776CF64E8EE; ASP.NET_SessionId=ufqe2mjwrdlxghg3x5xxw45v; __RequestVerificationToken=1jOIL0V0wDSs0EhJQ3iIAeyBE1i0shTcFsgNTnpj_vg0920fv0T69KT3Jo1hRmJ8fTlarcg6hLgyyxcciKekIgsAKjE1; i18n.langtag=en" -d '{"ParentID":"cb2983b2-59fe-4f7c-84d5-dcfa392ed196","Description":"test_bin_2","IsDefault":false,"AllowReorder":false,"FFServiceID":"","ReferenceCount":0,"UseForFixedAssetsOnly":false}'


    This should get a nice 200 response of



     The LocationID is the newly assigned GUID for your bin. 

    In doing this I did get a few 400 errors saying the request was invalid. Note that the data is a JSON model and so it contains " which if you are using " to delimit your data parameter it won't work to well. Hence you may see in the one-liner above that the data flag is using single quotes ' to bound the JSON payload.

    Hope this helps.

  • Many thanks Martin!  We're doing a big move in a couple of weeks implementing a new storage system so the ability to add a couple of hundred Bins will be very useful.

    To make it one step easier for anyone copying this - the "TenantLocation" can be easily found through the API explorer - see attached

  • Guys, this has been very interesting. I've taught myself Python over the last 4-5 days that gets data from DEAR and have a working example which I'll share once its tidied up a bit. The plan is to send data to Zoho Reports to make up for the hopeless reporting in DEAR. 

    I also want to get the list of finished goods which does not have an endpoint in the API explorer. Hopefully, Martins method will help me find it.

  • Please note that suggested approach with using internal DEAR API directly without web browser if discovered will lead to your account locking and subscription suspension. This sort of hacking violates our terms and conditions. 

    P.S. The requested functionality to manage Bins vial CSV import/export has been rolled out.

    1 person likes this
  • It's comments like this that is why I ended up not using DEAR. 

    P.S. Great you've listened to the community and added the missing functionality.

    1 person likes this
  • Marvin Black, you have a community of enthusiastic users trying to figure out how to make something work. Not trying to hack your system or bring it down or anything like that. Obviously it's great that something was implemented, however your comment might be more productive explaining how using dear API directly without a web browser is problematic or troublesome and why it is not allowed.  I doubt anyone was trying to do anything malicious, probably just trying to get their job done.

  • "Validation failed for one or more entities. See 'EntityValidationErrors' property for more details." to enter over 9100 bin locations because I can't have the fucking bin locations in the bulk inventory uploads until I've "mapped" them in the Locations & Bin.

  • Please be aware that having more then 2000 bins might impact system performance on your account significantly. This is the limitation we will try to resolve in the following 6 month.

Login or Signup to post a comment

6 people like this idea
Log in or Sign up to post a comment