# Mutations / Vendor Connections

# Vendor Connections

**Mutation**
## createVendorConnection — Returns [VendorConnection](/documentation/Objects/Vendor-Connections#VendorConnection)

**Scopes required:** manage_vendor_connections

| Arguments | Type | Description |
| --- | --- | --- |
| name | *String!* | The name of the connection |

**Example Mutation**

```graphql
mutation CreateVendorConnection($name: String!) {
    createVendorConnection(name: $name) {
        id,
        name,
        senderCode
    }
}

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

**Mutation**
## deleteVendorConnection — Returns *boolean*

**Scopes required:** manage_vendor_connections

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

**Example Mutation**

```graphql
mutation DeleteVendorConnection($id: ID!) {
    deleteVendorConnection(id: $id)
}

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

**Mutation**
## regenerateVendorConnectionCode — Returns [VendorConnection](/documentation/Objects/Vendor-Connections#VendorConnection)

**Scopes required:** manage_vendor_connections

Reset the Vendor Connection code, this will also disconnect it from the currently connected Vendors. It will not notify the other Vendor.

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the vendor connection to reset |

**Example Mutation**

```graphql
mutation RegenerateVendorConnectionCode($id: ID!) {
    regenerateVendorConnectionCode(id: $id) {
        id,
        name,
        senderCode
    }
}

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

**Mutation**
## updateVendorConnection — Returns [VendorConnection](/documentation/Objects/Vendor-Connections#VendorConnection)

**Scopes required:** manage_vendor_connections

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the connection |
| name | *String* | The name of the connection |
| customer | [ID](/documentation/Types/UUID#UUID) | The ID of the customer to link this connection to |
| receivingCodes | [[VendorConnectionCodeInput!]](/documentation/Inputs/Vendor-Connection-Code-Input#VendorConnectionCodeInput) | The connection codes provided by another sender |

**Example Mutation**

```graphql
mutation UpdateVendorConnection($id: ID!) {
    updateVendorConnection(id: $id) {
        id,
        name,
        senderCode
    }
}

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