---
description: This is how you can create a simple product via API.
---

# Create a grouping product

{% hint style="info" %}
Please note that for this to work, you need to create a template beforehand. This mutation can only assign products to an already existing template, and will NOT create a new one.
{% endhint %}

```graphql
mutation {
  productCreateGrouping(
    input: { sku: "SKU_GR_PRODUCT", templateCode: "Tshirts"}
  ) {
    __typename
  }
}
```

You can also assign a category to the newly created product in the same query.

{% hint style="info" %}
While templateCode is required, categoryCodes is not. But if used, also needed to be created beforehand.
{% endhint %}

```graphql
mutation {
  productCreateGrouping(
    input: { sku: "SKU_GR_PRODUCT", templateCode: "Tshirts", categoryCodes: "DELL"}
  ) {
    __typename
  }
}
```

