# Mutations / Sale Keys

# Sale Keys

**Mutation**
## cloneSaleKeys — Returns [SaleKeys](/documentation/Objects/Sale-Keys#SaleKeys)

**Scopes required:** modify_sale_keys

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the Sale Keys to clone |
| name | *String!* | The name of the cloned Sale Keys |

**Example Mutation**

```graphql
mutation CloneSaleKeys($id: ID!, $name: String!) {
    cloneSaleKeys(id: $id, name: $name) {
        id,
        name,
        saleKeys
    }
}

# Example variables
{
    "id": "<ID>",
    "name": "<NAME>"
}
```

**Mutation**
## createSaleKeys — Returns [SaleKeys](/documentation/Objects/Sale-Keys#SaleKeys)

**Scopes required:** modify_sale_keys

> <p>This is currently an experimental mutation, please get in contact with us before using it.</p>

| Arguments | Type | Description |
| --- | --- | --- |
| name | *String!* | The name of the sale keys folder |
| saleKeys | [JSON](/documentation/Types/JSON#JSON) | The keys to display ot the user |
| template | [SaleKeysTemplateEnum](/documentation/Enums/Sale-Keys-Template-Enum#SaleKeysTemplateEnum) | Sets the new sale keys to the default of the template |

**Example Mutation**

```graphql
mutation CreateSaleKeys($name: String!) {
    createSaleKeys(name: $name) {
        id,
        name,
        saleKeys
    }
}

# Example variables
{
    "name": "<NAME>"
}
```

**Mutation**
## deleteSaleKeys — Returns *boolean*

**Scopes required:** modify_sale_keys

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the sale keys to delete |

**Example Mutation**

```graphql
mutation DeleteSaleKeys($id: ID!) {
    deleteSaleKeys(id: $id)
}

# Example variables
{
    "id": "<ID>"
}
```

**Mutation**
## updateSaleKeys — Returns [SaleKeys](/documentation/Objects/Sale-Keys#SaleKeys)

**Scopes required:** modify_sale_keys

> <p>This is currently an experimental mutation, please get in contact with us before using it.</p>

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | <p> The `ID` scalar type represents a unique identifier. </p> <p> The `ID` type appears in a `JSON` response as a `String`; however, it is not intended to be human-readable. The `ID` is mathematically universally unique across all types and Vendors and can be used as such. </p> |
| name | *String* | The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. |
| saleKeys | [JSON](/documentation/Types/JSON#JSON) | <p> The `JSON` scalar type represents data that is stored in the JSON format as defined by [ECMA-404](https://www.json.org/json-en.html). </p> > <p>We would highly suggest getting in contact with us before using any field that requests or returns JSON.</p> |

**Example Mutation**

```graphql
mutation UpdateSaleKeys {
    updateSaleKeys {
        id,
        name,
        saleKeys
    }
}
```