Alexander

Proper way to add multiple lost parts?

Recommended Posts

Hi there,

what is the proper API v3 way to add multiple lost parts in one API call?

The documentation for v3 lost_parts does not seem to be complete - or in other words, I cannot get it to work as described.

And the v2 function set_user_set_lost_parts does not work with multiple parts anymore.

 

Share this post


Link to post
Share on other sites

Sorry, I've updated the lost_parts documentation. You need to give it the inv_part_id values to identify the specific part/color item in the inventory.

To add multiple Parts, POST a JSON list of them (using a Content-Type header of 'application/json'). The inv_part_id field can be retrieved from the Set's inventory. e.g: [{"inv_part_id": 806698, "lost_quantity": 3}, {"inv_part_id": 256007, "lost_quantity": 2}] Returns a list of successfully added Parts. If the Part already exists or is unrecognised, it will be skipped.

Share this post


Link to post
Share on other sites

Thanks Nathan, it's working now.

For everybody else reading: After using the correct field names, for a moment I forgot to JSON.stringify the data before posting.

Share this post


Link to post
Share on other sites