# Customers

## 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 Customers in the platform.**

## Queries

### Query Customers

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

### Get Customer

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

## Mutations

### Create (sign up) Customer

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

### Authenticate (sign in) Customer

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

### Change password of Customer

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

### Create password reset token for Customer

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

### Reset password of Customer

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

### Create email verification token for Customer

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

### Verify email of Customer

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

### Update Customer

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

### Delete Customer

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

## Output types

### Customer

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

### CustomerSignInResult

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

### CustomerPasswordToken

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

### CustomerEmailToken

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

### CustomerGroupAssignment

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

### CustomerQueryResult

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

## Input types

### CustomerSignUpDraft

> This type is equivalent to [CustomerDraft](/search.md?urn=ctp:api:type:CustomerDraft) in the REST API.

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

### CustomerSignInDraft

> This type is equivalent to [CustomerSignin](/search.md?urn=ctp:api:type:CustomerSignin) in the REST API.

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

### CustomerGroupAssignmentDraft

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

### CustomerUpdateAction

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

### Update actions

#### Add Address

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

#### Add Billing Address ID

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

#### Add Customer Group Assignment

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

#### Add Shipping Address ID

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

#### Add Store

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

#### Change Address

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

#### Change Email

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

#### Remove Address

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

#### Remove Billing Address ID

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

#### Remove Customer Group Assignment

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

#### Remove Shipping Address ID

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

#### Remove Store

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

#### Set Company Name

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

#### Set CustomField in Address

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

#### Set Custom Type in Address

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

#### Set AuthenticationMode

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

#### Set Custom Field

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

#### Set Custom Type

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

#### Set Customer Group

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

#### Set Customer Group Assignments

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

#### Set Key

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

#### Set Locale

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

#### Set Customer Number

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

#### Set Date of Birth

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

#### Set Default Billing Address

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

#### Set Default Shipping Address

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

#### Set External ID

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

#### Set First Name

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

#### Set Last Name

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

#### Set Middle Name

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

#### Set Salutation

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

#### Set Stores

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

#### Set Title

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

#### Set Vat ID

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

## Related pages

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