---
title: "inventoryActivate"
description: "Activate an inventory item in a specific location."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/inventory/mutations/inventory-activate'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/inventory/mutations/inventory-activate.md'
---
# inventoryActivate

Activate an inventory item in a specific location.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`InventoryActivatePayload`

## Arguments

* `available`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Initial available quantities of inventory items activated at that location.

* `inventoryItemId`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The inventory item ID to be activated

* `locationId`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The inventory item's location ID being activated.

* `onHand`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Initial on-hand quantities of inventory items activated at that location.

## Returns

* `inventoryLevel`

  [InventoryLevel](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/objects/inventory-level.md)

  The activated inventory level. 

* `userErrors`

  [[UserError!]!](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/user-error.md)

  A list of the errors encountered during the mutation. 

## Code Example

```graphql
mutation inventoryActivate($available: Int $inventoryItemId: ID! $locationId: ID! $onHand: Int ) {
	inventoryActivate(available: $available, inventoryItemId: $inventoryItemId, locationId: $locationId, onHand: $onHand ) 
		 {
			# InventoryActivatePayload fields
		}
		
	}

```

## Variables

```json
{
  "available": {},
  "inventoryItemId": {},
  "locationId": {},
  "onHand": {}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

