Add/update User Parts Api Request

Recommended Posts



Right now for managing my loose parts list, the only API functions available to use are get_user_parts and set_user_parts.  It would be nice to have and add_parts API.  The trouble I have right now with set_user_parts is that I have a lot of parts and it takes a long time to upload my changes when I make some through my own personal applications.  In fact recently I've been receiving 504 timeout errors.  (Aside: This is interesting in and of itself, through my application I will receive the 504 error.  I then check my parts list through my web browser and it will usually have the incorrect number of parts.  If I refresh the page, the number of parts will increase until it reaches the total number of parts that I uploaded.)  Most of the time I my list is not changing that much only a few quantities of my thousands of parts are changed.  It would be nice to have a function that works like "+ Add Part" or "Save Changes" buttons in the pop-up box that comes when you click on a part in a user's "myparts" list.  I imagine it could work in one of two ways, you could submit the change (PART, COLOR, CHANGE) where CHANGE is an integer (including negative values and zero) that you want to add to your list), or submit (PART, COLOR, QTY) where QTY is the final quantity you want in your list.  In both cases if the PART, COLOR combo is not in your parts list then it is added and if CHANGE + original quantity or QTY are less than or equal to zero then the PART, COLOR combo is removed from your parts list.


This would dramatically reduce the irrelevant information I need to send over the internet, and I think it would make it a lot harder to accidentally mess up an entire part list that takes a long time to establish.


Please let me know what you think.

Share this post

Link to post
Share on other sites