# Associate Roles

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Associate Roles in the platform.**

## Queries

### Query Associate Roles

[fetch SDL for query associateRoles](#graphql-partial-sdls).

### Get Associate Role

[fetch SDL for query associateRole](#graphql-partial-sdls).

## Mutations

### Create Associate Role

[fetch SDL for mutation createAssociateRole](#graphql-partial-sdls).

### Update Associate Role

[fetch SDL for mutation updateAssociateRole](#graphql-partial-sdls).

### Delete Associate Role

[fetch SDL for mutation deleteAssociateRole](#graphql-partial-sdls).

## Output types

### AssociateRole

[fetch SDL for type AssociateRole](#graphql-partial-sdls).

### AssociateRoleQueryResult

[fetch SDL for type AssociateRoleQueryResult](#graphql-partial-sdls).

## Input types

### AssociateRoleDraft

[fetch SDL for type AssociateRoleDraft](#graphql-partial-sdls).

### AssociateRoleUpdateAction

[fetch SDL for type AssociateRoleUpdateAction](#graphql-partial-sdls).

### Update actions

#### Add Permission

[fetch SDL for type AddAssociateRolePermission](#graphql-partial-sdls).

#### Change Buyer Assignable

[fetch SDL for type ChangeAssociateRoleBuyerAssignable](#graphql-partial-sdls).

#### Remove Permission

[fetch SDL for type RemoveAssociateRolePermission](#graphql-partial-sdls).

#### Set Custom Field

[fetch SDL for type SetAssociateRoleCustomField](#graphql-partial-sdls).

#### Set Custom Type

[fetch SDL for type SetAssociateRoleCustomType](#graphql-partial-sdls).

#### Set Name

[fetch SDL for type SetAssociateRoleName](#graphql-partial-sdls).

#### Set Permissions

[fetch SDL for type SetAssociateRolePermissions](#graphql-partial-sdls).

## Related pages

- [Search documentation and API specs](/search.md)