View and manage all Project-wide settings, such as countries, languages, and currencies, as well as feature-specific configurations via these endpoints. You can create Projects only in the Merchant Center.
Representations
Project
versionInt | Current version of the Project. |
keyString | User-defined unique identifier of the Project. |
nameString | Name of the Project. |
countriesArray of CountryCode | Country code of the geographic location. |
currenciesArray of CurrencyCode | Currency code of the country. A Project must have at least one currency. |
languagesArray of Locale | Language of the country. A Project must have at least one language. |
trialUntilString | Date in YYYY-MM format specifying when the trial period for the Project ends. Only present on Projects in trial period. |
messages | Holds the configuration for the Messages Query feature. |
carts | Holds the configuration for the Carts feature. |
shoppingLists | Holds the configuration for the Shopping Lists feature. This field may not be present on Projects created before January 2020. |
shippingRateInputType | Holds the configuration for the tiered shipping rates feature. |
externalOAuth | Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint. |
searchIndexing | Controls indexing of resources to be provided on high performance read-only search endpoints. |
businessUnits | Holds configuration specific to Business Units. |
discounts | Holds configuration specific to discounts, including how Product and Cart Discounts are combined in every Cart of the Project. |
createdAt | Date and time (UTC) the Project was initially created. |
MessagesConfiguration
enabledBoolean | When true, the Messages Query feature is active. |
deleteDaysAfterCreationInt | Specifies the number of days each Message should be available via the Messages Query API.
For Messages older than the specified period, it is not guaranteed that they are still accessible via the API.
This field may not be present on Projects created before 8 October 2018. Default: 15Minimum: 1Maximum: 90 |
MessagesConfigurationDraft
enabledBoolean | Setting to true activates the Messages Query feature. |
deleteDaysAfterCreationInt | Specifies the number of days each Message should be available via the Messages Query API. For Messages older than the specified period, it is not guaranteed that they are still accessible via the API. Minimum: 1Maximum: 90 |
CartsConfiguration
deleteDaysAfterLastModificationInt |
90Minimum: 1Maximum: 365250 |
countryTaxRateFallbackEnabledBoolean | Indicates if country - no state Tax Rate fallback should be used when a shipping address state is not explicitly covered in the rates lists of all Tax Categories of a Cart Line Items. This field may not be present on Projects created before June 2020. Default: false |
priceRoundingMode | Default value for the Default: priceRoundingMode parameter of the CartDraft.
Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated.HalfEven |
taxRoundingMode | Default value for the Default: taxRoundingMode parameter of the CartDraft.
Indicates how monetary values are rounded when calculating taxes for taxedPrice.HalfEven |
ShoppingListsConfiguration
deleteDaysAfterLastModificationInt | Default value for the Default: deleteDaysAfterLastModification parameter of the ShoppingListDraft.
This field may not be present on Projects created before January 2020.360Minimum: 1Maximum: 365250 |
ShippingRateInputType
shipppingRateInput field on the Cart to select a tier.CartValueType
totalPrice field) after any Product Discounts and Cart Discounts have been applied.
If chosen, it is not possible to set a value for the shippingRateInput on the Cart.type | CartValue |
CartClassificationType
Light, Medium, or Heavy).
Only keys defined in the values array can be used to create a tier or to set a value of the shippingRateInput on the Cart.
Keys must be unique.type | CartClassification |
valuesArray of CustomFieldLocalizedEnumValue | The classification items that can be used for specifying any ShippingRatePriceTier. |
{
"type": "CartClassification",
"values": [
{
"key": "Light",
"label": {
"en": "Light",
"de": "Leicht"
}
},
{
"key": "Medium",
"label": {
"en": "Medium",
"de": "Mittel"
}
},
{
"key": "Heavy",
"label": {
"en": "Heavy",
"de": "Schwer"
}
}
]
}CartScoreType
type | CartScore |
ExternalOAuth
urlString | URL with authorization header. |
authorizationHeaderString | Must not contain any leading or trailing whitespaces. Partially hidden on retrieval. Pattern:^[^ ].+[^ ]$ |
SearchIndexingConfiguration
Controls indexing of resources to be provided on high performance read-only search endpoints.
products | Configuration for the Product Projection Search and Search Term Suggestions APIs. |
productsSearch | Configuration for the Product Search feature. |
ordersBETA | Configuration for the Order Search feature. |
customers | Configuration for the Customer Search feature. |
businessUnits | Configuration for the Business Unit Search feature. |
SearchIndexingConfigurationValues
Current status of resource indexing. Present on Projects from 1 February 2019. | |
lastModifiedAt | Date and time (UTC) the Project was last updated. Only present on Projects last modified after 1 February 2019. |
lastModifiedByBETA | IDs and references that last modified the SearchIndexingConfigurationValues. |
SearchIndexingConfigurationStatus
Status of resource indexing.
ActivatedIndicates that search and suggest endpoints for the specified resource type are active.
DeactivatedIndicates that search and suggest endpoints for the specified resource type cannot be used.
Indexing- Indicates that search and suggest endpoints can temporarily not be used because the search index is being re-built.
CustomerSearchStatus
Activatedindicates that the Customer Search feature is fully operational.
Deactivatedindicates that the Customer Search feature is currently not active.
BusinessUnitSearchStatus B2B
Activatedindicates that the Business Unit Search feature is fully operational.
Deactivatedindicates that the Business Unit Search feature is currently not active.
OrderSearchStatus BETA
Activated- indicates that the Search Orders endpoint is fully operational.
Deactivated- indicates that the Order Search feature is currently not active, but can be activated by update action.
ProductSearchIndexingMode
ProductProjectionsSearchProductsSearch- For Product Search.
BusinessUnitConfiguration B2B
myBusinessUnitStatusOnCreation | Status of Business Units created using the My Business Unit endpoint. Default: Inactive |
myBusinessUnitAssociateRoleOnCreation | Default Associate Role assigned to the Associate creating a Business Unit using the My Business Unit endpoint. |
BusinessUnitConfigurationStatus B2B
Active- The Business Unit can be used in Orders, Carts, and Quotes and can be updated using the My Business Unit endpoint.
Inactive- The Business Unit cannot be used in Orders, Carts, and Quotes and cannot be updated using the My Business Unit endpoint.
DiscountsConfiguration
Holds the configuration for behavior of Product and Cart Discounts.
discountCombinationMode | Indicates how Product Discounts and Cart Discounts should be combined. Default value is Stacking. |
DiscountCombinationMode
Defines how Product Discounts and Cart Discounts are combined for every Cart in a Project.
BestDealEither Product Discounts or Cart Discounts are chosen based on best deal for the customer. Only one type applies per Cart.
StackingProduct Discounts and Cart Discounts are both applied to the Cart, potentially increasing the total discount.
Get Project
view_project_settings:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString | key of the Project. |
application/jsoncurl --get https://api.{region}.commercetools.com/{projectKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" {
"version": 1,
"key": "test-project",
"name": "Some project name",
"countries": ["DE", "US"],
"currencies": ["EUR"],
"languages": ["en"],
"createdAt": "2019-08-01T15:14:34.325Z",
"messages": {
"enabled": false
},
"carts": {
"countryTaxRateFallbackEnabled": false
},
"discounts": {
"discountCombinationMode": "Stacking"
}
}Check if Project exists
projectKey. Returns a 200 status if the Project exists, or a 404 status otherwise.view_project_settings:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString | key of the Project. |
curl --head https://api.{region}.commercetools.com/{projectKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" Update Project
manage_project_settings:{projectKey}regionString | Region in which the Project is hosted. |
projectKeyString | key of the Project. |
application/jsonversionInt | Expected version of the Project on which the changes should be applied.
If the expected version does not match the actual version, a ConcurrentModification error will be returned. |
actionsArray of ProjectUpdateAction | Update actions to be performed on the Project. |
application/jsoncurl https://api.{region}.commercetools.com/{projectKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"actions" : [ {
"action" : "changeCurrencies",
"currencies" : [ "EUR", "USD" ]
} ]
}
DATA{
"version": 2,
"key": "test-project",
"name": "Some project name",
"countries": ["DE", "US"],
"currencies": ["EUR", "USD"],
"languages": ["en"],
"createdAt": "2019-08-01T15:14:34.325Z",
"messages": {
"enabled": false
},
"carts": {
"countryTaxRateFallbackEnabled": false
},
"discounts": {
"discountCombinationMode": "Stacking"
}
}Update actions
Change Name
actionString | "changeName" |
nameString | New value to set. Must not be empty. |
{
"action": "changeName",
"name": "CTP Postman Monitor"
}Change Currencies
actionString | "changeCurrencies" |
currenciesArray of CurrencyCode | New value to set. Must not be empty. |
{
"action": "changeCurrencies",
"currencies": [
"EUR"
]
}Change Countries
actionString | "changeCountries" |
countriesArray of CountryCode | New value to set. Must not be empty. |
{
"action": "changeCountries",
"countries": [
"DE",
"US"
]
}Change Languages
actionString | "changeLanguages" |
languagesArray of Locale | New value to set. Must not be empty. |
{
"action": "changeLanguages",
"languages": [
"en",
"de",
"de-DE"
]
}Change Messages Configuration
actionString | "changeMessagesConfiguration" |
messagesConfiguration | Configuration for the Messages Query feature. |
{
"action": "changeMessagesConfiguration",
"messagesConfiguration": {
"enabled": true,
"deleteDaysAfterCreation": 30
}
}Change Carts Configuration
actionString | "changeCartsConfiguration" |
cartsConfiguration | Configuration for the Carts feature. |
{
"action": "changeCartsConfiguration",
"cartsConfiguration": {
"deleteDaysAfterLastModification": 42,
"countryTaxRateFallbackEnabled": false,
"priceRoundingMode": "HalfEven",
"taxRoundingMode": "HalfEven"
}
}Set Discounts Configuration
actionString | "setDiscountsConfiguration" |
discountsConfiguration | Configuration for the behavior of Cart and Product Discounts in the Project. |
{
"action": "setDiscountsConfiguration",
"discountsConfiguration": {
"discountCombinationMode": "Stacking"
}
}Change Price RoundingMode
actionString | "changePriceRoundingMode" |
priceRoundingMode | Project-level default rounding mode for calculating the total prices on LineItems and CustomLineItems. See CartsConfiguration. |
{
"action": "changePriceRoundingMode",
"priceRoundingMode": "HalfDown"
}Change Tax RoundingMode
actionString | "changeTaxRoundingMode" |
taxRoundingMode | Project-level default rounding mode for tax calculation. See CartsConfiguration. |
{
"action": "changeTaxRoundingMode",
"taxRoundingMode": "HalfDown"
}Change CountryTaxRateFallbackEnabled
actionString | "changeCountryTaxRateFallbackEnabled" |
countryTaxRateFallbackEnabledBoolean | When Default: true, country - no state Tax Rate is used as fallback. See CartsConfiguration.false |
{
"action": "changeCountryTaxRateFallbackEnabled",
"countryTaxRateFallbackEnabled": true
}Change ShoppingLists Configuration
actionString | "changeShoppingListsConfiguration" |
shoppingListsConfiguration | Configuration for the Shopping Lists feature. |
{
"action": "changeShoppingListsConfiguration",
"shoppingListsConfiguration": {
"deleteDaysAfterLastModification": 42
}
}Change My Business Unit Status on Creation B2B
actionString | "changeMyBusinessUnitStatusOnCreation" |
status | Status for Business Units created using the My Business Unit endpoint. |
{
"action": "changeMyBusinessUnitStatusOnCreation",
"status": "Active"
}Set My Business Unit Associate Role on Creation B2B
actionString | "setMyBusinessUnitAssociateRoleOnCreation" |
associateRole | Default Associate Role assigned to the Associate creating a Business Unit using the My Business Unit endpoint. |
{
"action": "setMyBusinessUnitAssociateRoleOnCreation",
"associateRole": {
"typeId": "associate-role",
"key": "admin"
}
}Set ShippingRateInputType
actionString | "setShippingRateInputType" |
shippingRateInputType | Value to set. If empty, any existing value will be removed. |
{
"action": "setShippingRateInputType",
"shippingRateInputType": {
"type": "CartScore"
}
}Set ExternalOAuth
actionString | "setExternalOAuth" |
externalOAuth | Value to set. If empty, any existing value will be removed. |
Change Product Search Indexing Enabled
actionString | "changeProductSearchIndexingEnabled" |
enabledBoolean |
|
Controls whether the action should apply to Product Projection Search or to Product Search. Default: ProductProjectionsSearch |
{
"action": "changeProductSearchIndexingEnabled",
"enabled": true,
"mode": "ProductsSearch"
}Change Order Search Status BETA
actionString | "changeOrderSearchStatus" |
status | Activates or deactivates the Order Search feature. Activation will trigger building a search index for the Orders in the Project. |
{
"action": "changeOrderSearchStatus",
"status": "Activated"
}Change Customer Search Status
actionString | "changeCustomerSearchStatus" |
status | Activates or deactivates the Customer Search feature. Activation will trigger building a search index for the Customers in the Project. |
{
"action": "changeCustomerSearchStatus",
"status": "Activated"
}Change Business Unit Search Status B2B
actionString | "changeBusinessUnitSearchStatus" |
status | Activates or deactivates the Search Business Units feature. Activation will trigger building a search index for the Business Units in the Project. |
{
"action": "changeBusinessUnitSearchStatus",
"status": "Activated"
}