---
updatedAt: 2026-08-18T14:17:08.000Z
agentTools:
  projectIndex: https://stockpit.readme.io/llms.txt
---

# Assembly Split

## AssemblySplit

Split an assembly into its components

Note: This mutation can be used only for companies who use assemblies

### Parameters

| input - [AssemblyInput](/reference/assembly-create#assemblyinput-data-type) |
| :-------------------------------------------------------------------------- |
| Data of the assembly                                                        |

### Example

```graphql

mutation{
  AssemblySplit
  (
    input:{
      quantity:5
      id:1840
      batch_number:{
        id:758493
        quantity:5
      }
      location_id:100389
      components:[
        {
          id:2890055
          quantity:3
          batch_numbers:[
            {
              id:654903
              quantity:15
            }
          ]
        }
      ]
    }
  )
  {
    label
    stock_levels{
      data{
        on_hand
      }
    }
  }
}
```

### Returned data

```json
{
  "data": {
    "AssemblySplit": {
      "id": 1840,
      "stock_levels":{
        "data":[
          {
          	"on_hand":95
          }
        ]
      }  
    }
  }
}
```

<br />

## AssemblyInput data type

| id - [Int](/reference/data-types#int)   |
| :-------------------------------------- |
| The id of the variant you want to split |

| quantity - [Int](/reference/data-types#int) |
| :------------------------------------------ |
| The quantity you want to split              |

| location\_id - [Int](/reference/data-types#int)    |
| :------------------------------------------------- |
| The location where the assembly split takes placet |

| batch\_number - [AssemblyBatchNumberInput](/reference/assembly-split#assemblybatchnumberinput-data-type)  - Subquery |
| :------------------------------------------------------------------------------------------------------------------- |
| The batch number of the assembly                                                                                     |

| components - [Array of AssemblyComponentInput](/reference/assembly-split#assemblycomponentinput-data-type) |
| :--------------------------------------------------------------------------------------------------------- |
| The components used to create the assembly                                                                 |

## AssemblyComponentInput data type

| id - [Int](/reference/data-types#int)   |
| :-------------------------------------- |
| The id of the variant you want to split |

| quantity - [Int](/reference/data-types#int) |
| :------------------------------------------ |
| The quantity you want to split              |

| batch\_numbers - [Array of AssemblyBatchNumberInput](/reference/assembly-split#assemblybatchnumberinput-data-type) - Subquery |
| :---------------------------------------------------------------------------------------------------------------------------- |
| The batch number of the assembly                                                                                              |

## AssemblyBatchNumberInput data type

| id - [Int](/reference/data-types#int)   |
| :-------------------------------------- |
| The id of the variant you want to split |

| quantity - [Int](/reference/data-types#int) |
| :------------------------------------------ |
| The quantity you want to split              |

| data - [BatchNumberInput](/reference/data-types#int) |
| :--------------------------------------------------- |
| Data of the batch number                             |