# confirmInventory - Inventory Next Module Reference

This documentation provides a reference to the `confirmInventory` method. This belongs to the Inventory Next Module.

You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](https://docs.medusajs.com/medusa-workflows-reference).

This method confirms that a quantity is available of an inventory item in the specified locations.

## Example

```ts
const isAvailable =
  await inventoryModuleService.confirmInventory(
    "iitem_123",
    ["loc_123", "loc_321"],
    10
  )
```

## Parameters

- inventoryItemId: (\`string\`) The inventory item's ID.
- locationIds: (\`string\`\[]) The locations' IDs.
- quantity: (\[BigNumberInput]\(../../../types/inventory\_next.BigNumberInput/page.mdx)) The quantity to confirm its availability.

  - value: (\`string\` \\| \`number\`)

  - numeric: (\`number\`)

  - raw: (\[BigNumberRawValue]\(../../../types/inventory\_next.BigNumberRawValue/page.mdx))

    - value: (\`string\` \\| \`number\`)

  - bigNumber: (\`BigNumber\`)
- context: (\[Context]\(../../../interfaces/inventory\_next.Context/page.mdx)) A context used to share resources, such as transaction manager, between the application and the module.

  - transactionManager: (TManager) An instance of a transaction manager of type \`TManager\`, which is a typed parameter passed to the context to specify the type of the \`transactionManager\`.

  - manager: (TManager) An instance of a manager, typically an entity manager, of type \`TManager\`, which is a typed parameter passed to the context to specify the type of the \`manager\`.

  - isolationLevel: (\`string\`) A string indicating the isolation level of the context. Possible values are \`READ UNCOMMITTED\`, \`READ COMMITTED\`, \`REPEATABLE READ\`, or \`SERIALIZABLE\`.

  - enableNestedTransactions: (\`boolean\`) A boolean value indicating whether nested transactions are enabled.

  - eventGroupId: (\`string\`) A string indicating the ID of the group to aggregate the events to be emitted at a later point.

  - transactionId: (\`string\`) A string indicating the ID of the current transaction.

  - runId: (\`string\`) A string indicating the ID of the current run.

  - messageAggregator: (\[IMessageAggregator]\(../../../interfaces/inventory\_next.IMessageAggregator/page.mdx)) An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.

  - requestId: (\`string\`) A string indicating the ID of the current request.

  - idempotencyKey: (\`string\`) A string indicating the idempotencyKey of the current workflow execution.

  - parentStepIdempotencyKey: (\`string\`) A string indicating the idempotencyKey of the parent workflow execution.

  - preventReleaseEvents: (\`boolean\`) preventReleaseEvents

  - isCancelling: (\`boolean\`) A boolean value indicating whether the current workflow execution is being cancelled.

  - cancelingFromParentStep: (\`boolean\`) Weither or not a sub workflow cancellation is being triggered from a parent step.
    If true, the parent step will not be triggered by the sub workflow.

## Returns

- Promise: (Promise\&#60;boolean\&#62;) Whether the quantity is available.

  - boolean: (\`boolean\`)


---

The best way to deploy Medusa is through Medusa Cloud where you get autoscaling production infrastructure fine tuned for Medusa. Create an account by signing up at cloud.medusajs.com/signup.
