Change inventory count AND set present locations

Hello, I have some instances where a product was not available in a location, but now I want it to be available.

My app updates the inventory count for the item at the location just fine, however, the item still shows as unavailable.

For clarification here’s a scenario:

I have 2 locations (Location A and Location B):

I receive a product at Location A so I run the Upsert catalog object api call and set Present At All Locations to false and set Present at Location ids to Location A.

I had no intention of selling the product at Location B, however, due to circumstances, I now receive that product at Location B. Is there any API call to update present at all locations ids?

Thank you for reading.

By “all location ids” do you mean you just want to set present_at_all_locations to true? If so, you can do that via the UpsertCatalogObject call, and just remove the present_at_location_ids (ie don’t include it in the upsert request, so it gets deleted).

Thank you very much!

Can I do an UpsertCatalogObject call and instead of setting present_at_all_locations to true, can I set just 1 more location?

Say I have 4 locations, and the item was created at Location A only. Now I want to enable it at Location B but not Location C or Location D?

I’ve tried it and I keep getting this error (I’ve replaced sensitive info with asterisks):

Object `******` of type ITEM_VARIATION is enabled at unit `******`, but the referenced object with token `*******` of type ITEM is not.",

Yes, but you need to make sure both the item and item variation is present; so you would need to update the parent object (item) as well to be present at the same location.