### GET /projects/key={projectKey} Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves the current settings of a specific project based on its key. ```APIDOC ## GET /projects/key={projectKey} ### Description Retrieves the current settings of a specific project based on its key. ### Method GET ### Endpoint /projects/key={projectKey} ### Parameters #### Path Parameters - **projectKey** (String) - Required - The unique key of the project. ### Request Example ``` GET /projects/key=my-project-key ``` ### Response #### Success Response (200) - **key** (String) - The unique key of the project. - **name** (String) - The name of the project. - **languages** (Array) - A list of supported languages for the project. - **trialUntil** (YearMonth) - The expiration date of the trial period, if applicable. - **carts** (CartsConfiguration) - Configuration settings for carts. - **shoppingLists** (ShoppingListsConfiguration) - Configuration settings for shopping lists. - **version** (Long) - The current version of the project settings. - **externalOAuth** (ExternalOAuth) - Configuration for external OAuth providers. - **searchIndexing** (SearchIndexingConfiguration) - Configuration for search indexing. - **messages** (MessagesConfiguration) - Configuration settings for messages. - **countries** (Array) - A list of countries associated with the project. - **currencies** (Array) - A list of currencies supported by the project. - **shippingRateInputType** (ShippingRateInputType) - The input type for shipping rates. - **createdAt** (DateTime) - The date and time when the project was created. - **discounts** (DiscountsConfiguration) - Configuration settings for discounts. #### Response Example ```json { "key": "my-project-key", "name": "My Awesome Project", "languages": ["en", "de"], "trialUntil": "2024-12-31", "carts": { "deleteHighRiskCr": true, "addCustomerToSalesChannel": true }, "shoppingLists": { "deleteAnonymousUselessShoppingListsAfterDays": 30, "deleteShoppingListsOlderThanDays": 90 }, "version": 5, "externalOAuth": null, "searchIndexing": { "products": { "excludeFilter": "", "includeFilter": "" } }, "messages": { "enabled": true, "deleteAfterDays": 7 }, "countries": ["US", "DE"], "currencies": ["USD", "EUR"], "shippingRateInputType": { "type": "Score" }, "createdAt": "2023-01-15T10:00:00Z", "discounts": { "group" : "DiscountGroupA" } } ``` ``` -------------------------------- ### GET /websites/raw_githubusercontent_commercetools_commercetools-api-reference_refs_heads_main/ProductTypeDefinition Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves product type definitions. If neither `includeNames` nor `excludeNames` are provided, then all attribute definitions are returned. ```APIDOC ## GET /websites/raw_githubusercontent_commercetools_commercetools-api-reference_refs_heads_main/ProductTypeDefinition ### Description Retrieves product type definitions. If neither `includeNames` nor `excludeNames` are provided, then all attribute definitions are returned. ### Method GET ### Endpoint /websites/raw_githubusercontent_commercetools_commercetools-api-reference_refs_heads_main/ProductTypeDefinition ### Parameters #### Query Parameters - **includeNames** (array[string]) - Optional - The names of the attributes to include. - **excludeNames** (array[string]) - Optional - The names of the attributes to exclude. - **limit** (int) - Optional - The maximum number of results to return. - **offset** (int) - Optional - The number of results to skip. - **sort** (array[string]) - Optional - The order in which results should be sorted. ### Response #### Success Response (200) - **results** (array[AttributeDefinition]) - A list of attribute definitions. - **offset** (int) - The number of results skipped. - **count** (int) - The number of results returned. - **total** (long) - The total number of results available. - **exists** (boolean) - Indicates if the resource exists. #### Response Example { "results": [ { "type": { "name": "text" }, "name": "color", "label": { "en": "Color" }, "inputHint": "singleLine", "isSearchable": true } ], "offset": 0, "count": 1, "total": 1, "exists": true } ``` -------------------------------- ### Create Product Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates a new product with the provided draft. ```graphql mutation createProduct($draft: ProductDraft!) { createProduct(draft: $draft) } ``` -------------------------------- ### Recurring Order Starts At Set Event Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Represents a message payload when the start date of a recurring order is set. It includes the new and old start dates, and the event type. ```graphql type RecurringOrderStartsAtSet implements MessagePayload { startsAt: DateTime! oldStartsAt: DateTime! type: String! } ``` -------------------------------- ### Product API Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema No description -------------------------------- ### Update Recurring Order - Starts At Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Sets the start date and time for a recurring order. Requires a mandatory DateTime object. ```graphql input SetRecurringOrderStartsAt { startsAt: DateTime! } ``` -------------------------------- ### Create My Shopping List (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates a shopping list for the current customer. This is a beta feature and may change. It can be used with store-specific OAuth permissions and requires a MyShoppingListDraft. It also accepts an optional storeKey. ```graphql mutation CreateMyShoppingList($draft: MyShoppingListDraft!, $storeKey: KeyReferenceInput) { createMyShoppingList(draft: $draft, storeKey: $storeKey) } ``` -------------------------------- ### Set Cart Discount Valid From Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Sets the start date and time for when a cart discount becomes valid. This action requires the cart discount ID and the new validity start timestamp. ```graphql mutation SetCartDiscountValidFrom($cartDiscountId: String!, $validFrom: DateTime!) { setValidFrom(id: $cartDiscountId, validFrom: $validFrom) } ``` -------------------------------- ### Custom Object Draft with JSON Value Example Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Defines the structure for a Custom Object Draft, emphasizing the 'value' field which accepts an escaped JSON string. This is useful for storing arbitrary data associated with a custom object, with examples provided for the JSON format. ```graphql input CustomObjectDraft { key: String! container: String! """ The value should be passed in a form of escaped JSON. Example for `value` field: ``` " { \"stringField\": \"myVal\", \"numberField\": 123, \"boolField\": false, \"nestedObject\": { \"nestedObjectKey\": \"anotherValue\" }, \"dateField\": \"2018-10-12T14:00:00.000Z\" } " ``` "" value: String! version: Long } ``` -------------------------------- ### Set Product Discount Description Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input type for setting the description -------------------------------- ### Create Product Discount Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates a new product discount with the provided draft. ```graphql mutation createProductDiscount($draft: ProductDiscountDraft!) { createProductDiscount(draft: $draft) } ``` -------------------------------- ### Product Projections Suggest API Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Endpoint for getting product suggestions based on search keywords. ```APIDOC ## GET /productProjectionsSuggest ### Description Provides product suggestions based on search keywords, with options for fuzzy matching and limiting results. ### Method GET ### Endpoint /productProjectionsSuggest ### Query Parameters - **searchKeywords** ([SearchKeywordArgument!]!) - Required - The keywords to search for. - **fuzzy** (Boolean) - Optional - Whether to perform fuzzy matching. - **limit** (Int) - Optional - Maximum number of suggestions to return (defaults to 10). - **staged** (Boolean) - Optional - Whether to include staged products (defaults to false). ``` -------------------------------- ### GET /websites/raw_githubusercontent_commercetools_commercetools-api-reference_refs_heads_main/ProductVariant/attributesRaw Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves raw attribute data for a product variant. You can specify which attributes to include or exclude. ```APIDOC ## GET /websites/raw_githubusercontent_commercetools_commercetools-api-reference_refs_heads_main/ProductVariant/attributesRaw ### Description Retrieves raw attribute data for a product variant. You can specify which attributes to include or exclude. ### Method GET ### Endpoint /websites/raw_githubusercontent_commercetools_commercetools-api-reference_refs_heads_main/ProductVariant/attributesRaw ### Parameters #### Query Parameters - **includeNames** (array[string]) - Optional - The names of the attributes to include. If neither `includeNames` nor `excludeNames` are provided, then all attributes are returned. - **excludeNames** (array[string]) - Optional - The names of the attributes to exclude. If neither `includeNames` nor `excludeNames` are provided, then all attributes are returned. ### Response #### Success Response (200) - **attributesRaw** (object) - A key-value map of raw attribute data. #### Response Example { "attributesRaw": { "color": "red", "size": "M" } } ``` -------------------------------- ### Store Creation Input Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input structure for creating a new store. Requires a key and name, and includes optional settings for languages, countries, channels, product selections, and custom fields. ```graphql input CreateStore { key: String! name: [LocalizedStringItemInputType!] languages: [Locale!] countries: [StoreCountryInput!] distributionChannels: [ResourceIdentifierInput!] supplyChannels: [ResourceIdentifierInput!] productSelections: [ProductSelectionSettingDraft!] custom: CustomFieldsDraft } ``` -------------------------------- ### Create My Cart Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates a shopping cart for the current customer. This is a BETA feature and may change. Requires a `draft` and optionally supports store-specific context via `storeKey`. ```graphql mutation createMyCart($draft: MyCartDraft!, $storeKey: KeyReferenceInput) { createMyCart(draft: $draft, storeKey: $storeKey) } ``` -------------------------------- ### Sign Up Customer in Business Unit Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Signs up a new customer and associates them with the current business unit. This is a BETA feature and may change. It is intended for use within a specific business unit context. ```graphql mutation signUpInMyBusinessUnit($draft: SignUpInMyBusinessUnitDraft!) { signUpInMyBusinessUnit(draft: $draft) } ``` -------------------------------- ### Set Cart Discount Valid From and Until Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Sets both the start and end dates/times for a cart discount's validity period. This requires the cart discount ID and both `validFrom` and `validUntil` timestamps. ```graphql mutation SetCartDiscountValidFromAndUntil($cartDiscountId: String!, $validFrom: DateTime!, $validUntil: DateTime!) { setValidFromAndUntil(id: $cartDiscountId, validFrom: $validFrom, validUntil: $validUntil) } ``` -------------------------------- ### Custom Object Value JSON Example Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema This snippet demonstrates the expected format for the 'value' field when creating or updating a Custom Object. It must be provided as an escaped JSON string. ```json { "exampleField": "exampleValue" } ``` -------------------------------- ### Create My Business Unit Mutation Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates a business unit for the current customer context. Requires a `MyBusinessUnitDraft` input, which includes essential details like key, name, and contact information. Store mode and parent unit can also be specified. ```graphql mutation createMyBusinessUnit($draft: MyBusinessUnitDraft!) { createMyBusinessUnit(draft: $draft) } ``` -------------------------------- ### Get Category Slug with Locale Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves the URL-friendly slug for a category in a specific locale. The `acceptLanguage` argument allows clients to express a preference for locale variants. This field is mandatory. ```graphql slug(locale: Locale, acceptLanguage: [Locale!]): String! ``` -------------------------------- ### Set Payment Method Info Interface Account Input (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input for setting the interface account for payment method info. This feature is in BETA. ```graphql input SetPaymentMethodInfoInterfaceAccount { interfaceAccount: String } ``` -------------------------------- ### Get Category Meta Keywords with Locale Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves the meta keywords for a category, respecting the specified locale and preferred language order. This is useful for SEO optimization. This field is optional. ```graphql metaKeywords(locale: Locale, acceptLanguage: [Locale!]): String ``` -------------------------------- ### Set Payment Method Info Token Input (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input for setting the payment method token. This feature is in BETA. ```graphql input SetPaymentMethodInfoToken { token: PaymentMethodTokenDraft } ``` -------------------------------- ### Set Payment Method Info Interface Input (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input for setting the payment method interface. Requires the interface name. This feature is in BETA. ```graphql input SetPaymentMethodInfoInterface { interface: String! } ``` -------------------------------- ### Recurring Order Draft Input Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input type for creating a new recurring order draft. It allows specifying a key, custom fields, the associated cart, start and expiration dates, and state. ```graphql input RecurringOrderDraft { key: String custom: CustomFieldsDraft cart: ResourceIdentifierInput! cartVersion: Long! startsAt: DateTime expiresAt: DateTime state: ResourceIdentifierInput recurringOrderState: RecurringOrderState } ``` -------------------------------- ### Update Project Settings - Discounts Configuration Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Sets the discounts configuration for a project. This BETA feature requires a DiscountsConfigurationInput object and is mandatory. ```graphql input SetProjectSettingsDiscountsConfiguration { discountsConfiguration: DiscountsConfigurationInput! } ``` -------------------------------- ### Get Category Meta Title with Locale Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves the meta title of a category for a specific locale. It supports specifying a preferred language for better localization. This field is optional and may not be present for all categories. ```graphql metaTitle(locale: Locale, acceptLanguage: [Locale!]): String ``` -------------------------------- ### Get Category Meta Description with Locale Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Retrieves the meta description of a category for a specific locale. This functionality allows for tailored descriptions based on the user's language preference. The meta description is an optional field. ```graphql metaDescription(locale: Locale, acceptLanguage: [Locale!]): String ``` -------------------------------- ### Query Project Resources with Filtering and Sorting Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema This snippet illustrates how to query lists of resources within a Commercetools project, applying filters and sorting. It covers common patterns for retrieving multiple entities like reviews, subscriptions, extensions, API clients, standalone prices, quote requests, staged quotes, quotes, business units, associate roles, recurrence policies, and payment methods. These queries typically accept 'where', 'sort', 'limit', and 'offset' arguments for advanced data retrieval. ```graphql query GetReviews($where: String, $sort: [String!], $limit: Int, $offset: Int) { reviews(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id text } total } } query GetSubscriptions($where: String, $sort: [String!], $limit: Int, $offset: Int) { subscriptions(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetExtensions($where: String, $sort: [String!], $limit: Int, $offset: Int) { extensions(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetAPIClients($where: String, $sort: [String!], $limit: Int, $offset: Int) { apiClients(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id name } total } } query GetStandalonePrices($where: String, $sort: [String!], $limit: Int, $offset: Int) { standalonePrices(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetQuoteRequests($where: String, $sort: [String!], $limit: Int, $offset: Int) { quoteRequests(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetStagedQuotes($where: String, $sort: [String!], $limit: Int, $offset: Int) { stagedQuotes(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetQuotes($where: String, $sort: [String!], $limit: Int, $offset: Int) { quotes(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetBusinessUnits($where: String, $sort: [String!], $limit: Int, $offset: Int) { businessUnits(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetAssociateRoles($where: String, $sort: [String!], $limit: Int, $offset: Int) { associateRoles(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetRecurrencePolicies($where: String, $sort: [String!], $limit: Int, $offset: Int) { recurrencePolicies(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetPaymentMethods($where: String, $sort: [String!], $limit: Int, $offset: Int) { paymentMethods(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id key } total } } query GetProductAssignment($where: String, $sort: [String!], $limit: Int, $offset: Int) { productSelectionAssignments(where: $where, sort: $sort, limit: $limit, offset: $offset) { results { id } total } } ``` -------------------------------- ### Create My Order from Cart (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates an order from a customer's cart. This is a beta feature and may change. It can be used with store-specific OAuth permissions and requires a MyCartCommand draft. It also accepts an optional storeKey. ```graphql mutation CreateMyOrderFromCart($draft: OrderMyCartCommand!, $storeKey: KeyReferenceInput) { createMyOrderFromCart(draft: $draft, storeKey: $storeKey) } ``` -------------------------------- ### Commercetools API: Full-Text Prefix Search Expression Input Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Defines the input for full-text prefix search. Similar to full-text search, but specifically targets values that start with a given prefix. It includes parameters for field, boost, field type, value, language, and match type. ```graphql input SearchFullTextPrefixInput { field: String! boost: Float fieldType: SearchFieldType value: String! language: String mustMatch: SearchMatchType } ``` -------------------------------- ### Set Product Asset Sources Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input type for setting the sources for a product asset. ```APIDOC ## SET PRODUCT ASSET SOURCES ### Description Input type for setting the sources for a product asset. ### Method N/A (Input Type) ### Endpoint N/A (Input Type) ### Parameters #### Request Body - **variantId** (Int) - Description - **sku** (String) - Description - **staged** (Boolean = true) - Description - **sources** ([AssetSourceInput!] = []) - Description - **assetKey** (String) - Description - **assetId** (String) - Description ``` -------------------------------- ### POST /projects/key={projectKey} Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Updates project settings. Allows modifying various aspects of the project configuration. ```APIDOC ## POST /projects/key={projectKey} ### Description Updates project settings. Allows modifying various aspects of the project configuration. ### Method POST ### Endpoint /projects/key={projectKey} ### Parameters #### Path Parameters - **projectKey** (String) - Required - The unique key of the project. #### Request Body - **actions** (Array) - Required - A list of actions to perform to update the project settings. ### Request Example ```json { "actions": [ { "action": "changeLanguages", "languages": ["en", "fr"] }, { "action": "changeCurrencies", "currencies": ["USD", "CAD"] } ] } ``` ### Response #### Success Response (200) - **key** (String) - The unique key of the project. - **name** (String) - The name of the project. - **languages** (Array) - A list of supported languages for the project. - **trialUntil** (YearMonth) - The expiration date of the trial period, if applicable. - **carts** (CartsConfiguration) - Configuration settings for carts. - **shoppingLists** (ShoppingListsConfiguration) - Configuration settings for shopping lists. - **version** (Long) - The current version of the project settings. - **externalOAuth** (ExternalOAuth) - Configuration for external OAuth providers. - **searchIndexing** (SearchIndexingConfiguration) - Configuration for search indexing. - **messages** (MessagesConfiguration) - Configuration settings for messages. - **countries** (Array) - A list of countries associated with the project. - **currencies** (Array) - A list of currencies supported by the project. - **shippingRateInputType** (ShippingRateInputType) - The input type for shipping rates. - **createdAt** (DateTime) - The date and time when the project was created. - **discounts** (DiscountsConfiguration) - Configuration settings for discounts. #### Response Example ```json { "key": "my-project-key", "name": "My Awesome Project", "languages": ["en", "fr"], "trialUntil": "2024-12-31", "carts": { "deleteHighRiskCr": true, "addCustomerToSalesChannel": true }, "shoppingLists": { "deleteAnonymousUselessShoppingListsAfterDays": 30, "deleteShoppingListsOlderThanDays": 90 }, "version": 6, "externalOAuth": null, "searchIndexing": { "products": { "excludeFilter": "", "includeFilter": "" } }, "messages": { "enabled": true, "deleteAfterDays": 7 }, "countries": ["US", "DE"], "currencies": ["USD", "CAD"], "shippingRateInputType": { "type": "Score" }, "createdAt": "2023-01-15T10:00:00Z", "discounts": { "group" : "DiscountGroupA" } } ``` ``` -------------------------------- ### Set Payment Method Info Input (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input for setting payment method information, including interface, method, name, token, interface account, and custom fields. This feature is in BETA. ```graphql input SetPaymentMethodInfo { paymentInterface: String method: String name: [LocalizedStringItemInputType!] token: PaymentMethodTokenDraft interfaceAccount: String custom: CustomFieldsDraft } ``` -------------------------------- ### Search Products with Query Input Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema This snippet shows how to perform a search for products using the `productsSearch` query, which accepts `SearchQueryInput` for both the main query and post-filtering. It also supports sorting, limiting results, marking matching variants, and defining facets. This query is useful for advanced product searching scenarios, especially when dealing with complex search criteria. ```graphql query ProductsSearch( $query: SearchQueryInput, $postFilter: SearchQueryInput, $sort: [SearchSortingInput!], $limit: Int, $offset: Int, $markMatchingVariants: Boolean, $facets: [ProductSearchFacetExpressionInput!] ) { productsSearch( query: $query, postFilter: $postFilter, sort: $sort, limit: $limit, offset: $offset, markMatchingVariants: $markMatchingVariants, facets: $facets ) { results { id name } total facets { type key count } } } ``` -------------------------------- ### Customer Sign Me Up API Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Allows a new customer to create an account, providing personal details, addresses, and optionally linking anonymous carts or stores. ```APIDOC ## POST /customers ### Description Creates a new customer account with the provided details. This includes personal information, addresses, and optional customer group assignments or store associations. ### Method POST ### Endpoint /customers ### Parameters #### Request Body - **email** (String!) - Required - The new customer's email address. - **password** (String) - Optional - The customer's password. - **firstName** (String) - Optional - The customer's first name. - **lastName** (String) - Optional - The customer's last name. - **middleName** (String) - Optional - The customer's middle name. - **title** (String) - Optional - The customer's title (e.g., Mr., Ms.). - **dateOfBirth** (Date) - Optional - The customer's date of birth. - **companyName** (String) - Optional - The customer's company name. - **vatId** (String) - Optional - The customer's VAT identification number. - **addresses** (Array) - Optional - A list of addresses for the customer. - **defaultBillingAddress** (Int) - Optional - The index of the default billing address in the `addresses` list. - **defaultShippingAddress** (Int) - Optional - The index of the default shipping address in the `addresses` list. - **shippingAddresses** (Array) - Optional - Indices of shipping addresses in the `addresses` list. - **billingAddresses** (Array) - Optional - Indices of billing addresses in the `addresses` list. - **custom** (CustomFieldsDraft) - Optional - Custom fields for the customer. - **locale** (Locale) - Optional - The customer's preferred locale. - **salutation** (String) - Optional - The customer's salutation. - **key** (String) - Optional - A unique key for the customer. - **stores** (Array) - Optional - A list of stores the customer is associated with. - **customerNumber** (String) - Optional - A unique customer number. - **anonymousCartId** (String) - Optional - Deprecated. Use `anonymousCart` instead. The ID of an anonymous cart to merge. - **anonymousCart** (ResourceIdentifierInput) - Optional - An object representing the anonymous cart to merge. - **externalId** (String) - Optional - An external identifier for the customer. - **customerGroup** (ResourceIdentifierInput) - Optional - The customer group for the new customer. - **customerGroupAssignments** (Array) - Optional - Assignments to customer groups. - **isEmailVerified** (Boolean) - Optional - Indicates if the email address has been verified. - **anonymousId** (String) - Optional - An identifier for an anonymous user. - **authenticationMode** (AuthenticationMode) - Optional - The authentication mode for the customer. ### Request Example ```json { "email": "newcustomer@example.com", "password": "strongpassword", "firstName": "Jane", "lastName": "Doe", "addresses": [ { "streetName": "Main St", "city": "Anytown", "postalCode": "12345", "country": "US" } ], "defaultShippingAddress": 0, "defaultBillingAddress": 0 } ``` ### Response #### Success Response (200) - **customer** (Customer!) - The newly created customer object. #### Response Example ```json { "customer": { "id": "new-customer-id-789", "version": 1, "createdAt": "2023-01-01T11:00:00Z", "lastModifiedAt": "2023-01-01T11:00:00Z", "email": "newcustomer@example.com", "firstName": "Jane", "lastName": "Doe" } } ``` ``` -------------------------------- ### Product Tailoring List Query Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Endpoint for retrieving a list of product tailoring configurations. ```APIDOC ## GET /productTailoringList ### Description Retrieves a list of product tailoring configurations, supporting filtering, sorting, and pagination. ### Method GET ### Endpoint `/productTailoringList` ### Parameters #### Query Parameters - **where** (String) - Optional - Filters the results based on a query string. - **sort** ([String!]) - Optional - Specifies the order of the results. - **limit** (Int) - Optional - Limits the number of tailoring configurations returned. - **offset** (Int) - Optional - Skips a specified number of tailoring configurations from the beginning of the result set. ``` -------------------------------- ### Set Product Category Order Hint Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input type for setting the category order hint for a product. ```APIDOC ## SET PRODUCT CATEGORY ORDER HINT ### Description Input type for setting the category order hint for a product. ### Method N/A (Input Type) ### Endpoint N/A (Input Type) ### Parameters #### Request Body - **categoryId** (String!) - Description - **orderHint** (String) - Description - **staged** (Boolean = true) - Description ``` -------------------------------- ### GraphQL Input for Setting Store Product Selections Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Defines the input structure for configuring product selections within a store. It uses an array of 'ProductSelectionSettingInActionInput'. ```graphql input SetStoreProductSelections { productSelections: [ProductSelectionSettingInActionInput!] } ``` -------------------------------- ### Zone Creation Input Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input structure for creating a new zone. Requires a name and includes optional key, description, and locations. ```graphql input CreateZone { name: String! key: String description: String locations: [ZoneLocation!] = [] } ``` -------------------------------- ### Customer Sign Up Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates a new customer. This mutation can optionally assign an anonymous cart or session to the new customer. It is store-specific and requires store-specific OAuth permissions. ```graphql mutation customerSignUp($draft: CustomerSignUpDraft!, $storeKey: KeyReferenceInput) { customerSignUp(draft: $draft, storeKey: $storeKey) } ``` -------------------------------- ### GraphQL Input for Adding Store Product Selection Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Defines the input for adding a product selection to a store. It requires a resource identifier for the product selection and an optional active status. ```graphql input AddStoreProductSelection { productSelection: ResourceIdentifierInput! active: Boolean } ``` -------------------------------- ### Set Payment Method Info Method Input (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Input for setting the payment method identifier. This feature is in BETA. ```graphql input SetPaymentMethodInfoMethod { method: String } ``` -------------------------------- ### Update Project Settings - Shopping Lists Configuration Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Allows updating the global configuration for shopping lists in a project. Requires a `ShoppingListsConfigurationInput` object containing relevant settings. ```graphql input ChangeProjectSettingsShoppingListsConfiguration { shoppingListsConfiguration: ShoppingListsConfigurationInput! } ``` -------------------------------- ### Create My Order from Quote (BETA) Source: https://raw.githubusercontent.com/commercetools/commercetools-api-reference/refs/heads/main/api-specs/graphql/schema Creates an order from a customer's quote. This is a beta feature and may change. It requires a MyQuoteCommand draft. It can be used with store-specific OAuth permissions. ```graphql mutation CreateMyOrderFromQuote($draft: OrderMyQuoteCommand!) { createMyOrderFromQuote(draft: $draft) } ```