"invalid id" from Graph QL mutation for InventoryAdjustQuantities

mv5
Excursionist
25 2 2
I'm having an "invalid id" return error when I try mutating my inventory quantity from a Python script. I have pulled all inventoryIDs via graphQL query and verified the location ID is right via the same and the Shopify settings page. Any ideas what I'm doing wrong? 
 
Return error: 

{'errors': [{'message': 'invalid id', 'locations': [{'line': 3, 'column': 7}], 'path': ['inventoryAdjustQuantities']}], 'data': {'inventoryAdjustQuantities': None}, 'extensions': {'cost': {'requestedQueryCost': 11, 'actualQueryCost': 1, 'throttleStatus': {'maximumAvailable': 4000.0, 'currentlyAvailable': 3999, 'restoreRate': 200.0}}}}



mutation = 

'''
    mutation inventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) {
      inventoryAdjustQuantities(input: $input) {
        userErrors {
          field
          message
        }
        inventoryAdjustmentGroup {
          reason
          referenceDocumentUri
          changes {
            name
            delta
          }
        }
      }
    }
'''
 
input = {'input': {'reason': 'received', 'name': 'available', 'changes': [{'delta': -73, 'inventoryItemId': 'gid://shopify/ProductVariant/40580044554263', 'locationId': 'gid://shopify/Location/{id}'}]}}
Reply 1 (1)

mv5
Excursionist
25 2 2

I assume someone is going to say that the input field inventoryItemId should have /InventoryItem/ instead of /ProductVariant/. I still get this error from the same mutation:

error = {'data': {'inventoryAdjustQuantities': {'userErrors': [{'field': ['input', 'changes', '0', 'inventoryItemId'], 'message': 'The specified inventory item could not be found.'}], 'inventoryAdjustmentGroup': None}}, 'extensions': {'cost': {'requestedQueryCost': 11, 'actualQueryCost': 10, 'throttleStatus': {'maximumAvailable': 4000.0, 'currentlyAvailable': 3990, 'restoreRate': 200.0}}}}

input = {'input': {'reason': 'received', 'name': 'available', 'changes': [{'delta': -73, 'inventoryItemId': 'gid://shopify/InventoryItem/40580044554263', 'locationId': 'gid://shopify/Location/{id}'}]}}