API to update inventory

I would like to have an API that can be used to update my inventory. I am really only looking for the ability to update the quantity of Items that I have listed for sale so that when I sell an item on a different website I can update the quantity of items that are listed on brick Owl. Currently I use the XML update option on the page:
http://brickowl.com//mystore/inventory/import
which works very well but this requires me to manually do the update and I would like to fully automate this to avoid listing items that have already sold.

Gerrit

Comments

  • 8 Comments sorted by Votes Date Added
  • What exactly would you like

    Pass Brick Owl LotID and absolute quantity value?
  • I would like to be able to provide the external_lot_id and the quantity adjustment. Providing absolute quantity values would cause problem if one of the items has also been sold on Brick Owl and this has not yet been taken into account in the absolute quantities.

  • Okay, that's been done, take a look at the API documentation and let me if it works okay.
  • It works fine.

    Thank you, Gerrit
  • Gerrit, I'm working on this too, and I was wondering if you or Admin have ideas about triggers. In the current state of the API if you know a BO order happened, you can call the API and pass the order ID to get order details and use that to process an inventory update to another site. Conversely, you can now push updates from another site through and update BO inventory.

    But what's the best way to automate that? The best I can think of is some email parser that gets a copy of the "order received" email on either site, and uses that to initiate the API inventory update process. That would be near real time. Second option would be to parse the orders received summary pages on either site on a timer, like every 10 minutes, and look for new order numbers. That would be probably the easiest technical solution, but is slightly less real time, and also might create excessive page hits.

    For BO orders, Admin could write the database trigger and use API to POST a message to a listener URL, similar to the PayPal IPN process. But other sites likely would not create a similar trigger.

    -Jason
  • I will probably do the "push" notification thing when I think the of the best way to do it. In the meantime I have no issue with you regularly polling the orders list every x minutes. The safest thing with other sites I would think would be the email option, but its also the harder option.
  • Jason,

    I use the order notification emails to start this process.

    From my regular email account order notification emails are forwarded to one of my own email addresses, these are then passed onto a php program (separate programs depending on where the order was placed) that parses out the order ID. When the order id has been obtained the order is downloaded and an XML update file is created which is emailed back to my regular account which can then be used to update the inventory on the other site.

    I have updated this to use the API to update my Brick Owl inventory when I have sold items on a different site so this will be fully automatic. I am still working on processing the return code to check for errors in case things do not work properly.

    I have not found a solution about how to automatically update my other store inventory when items are sold on Brick Owl.

    Gerrit
This discussion has been closed.