commercetools API

commercetools is a commerce platform that's fully integrated with Frontastic.

The backend part of the integration is within our API documentation in GitHub. To see any updates to this library, check out our libraries changelog.

project.yml configuration

To access the APIs for commercetools, you'll need the below configuration added to your project.yml (see the project.yml article for more information):

configuration:
    commercetools:
        clientId: # this is your unique client id for commercetools
        clientSecret: # this is your unique client secret for commercetools
        projectKey: # this is your unique project key  for commercetools
        authUrl: # this is the authorization URL for commercetools
        hostUrl: # the host of the HTTP API service for commercetools
    product: # you'll need to duplicate this section for account, search, wishlist
        engine: commercetools
    cart: # in cart section is also possible to include additional options
        engine: commercetools
        options: # hash map that will be used when a new cart is created. By default, carts are created with "inventoryMode: 'ReserveOnOrder'"

Available methods

Account

See the AccountAPI docs for arguments, types, and other information.

AccountAPI methodAvailable?
getSalutationsnot implemented
confirmEmailyes
createyes
updateyes
updatePasswordyes
generatePasswordResetTokenyes
resetPasswordyes
loginyes
refreshAccountyes
getAddressesyes
addAddressyes
updateAddressyes
removeAddressyes
setDefaultBillingAddressyes
setDefaultShippingAddressyes

Cart

See the CartAPI docs for arguments, types, and other information.

CartAPI methodsAvailable?
getForUseryes
getAnonymousyes
getByIdyes
setCustomLineItemTypenot implemented
getCustomLineItemTypeyes
setTaxCategoryyes
getTaxCategoryyes
addToCartyes
updateLineItemyes
removeLineItemyes
setEmailyes
setShippingMethodyes
setCustomField (deprecated)yes
setRawApiInputyes
setShippingAddressyes
setBillingAddressyes
addPaymentyes
updatePaymentyes
redeemDiscountCodeyes
removeDiscountCodeyes
orderyes
getOrderyes
getOrdersyes
startTransactionyes
commityes
getAvailableShippingMethodsyes
getShippingMethodsyes

Product

See the ProductAPI docs for arguments, types, and other information.

ProductAPI methodAvailable?
queryCategoriesyes
getProductTypesyes
getProductyes

Product search

See the ProductSearchAPI docs for arguments, types, and other information.

ProductSearchAPI methodAvailable?
getSearchableAttributesyes
query (by query string)yes
query (by category)yes
query (by SKU) (deprecated)yes
query (by SKUs)yes
query (by productId) (deprecated)n/a
query (by productIds)yes
query (by productType)yes
query (by filters)yes
query (facets)yes
query (sortAttributes)yes

Wishlist

See the WishlistAPI docs for arguments, types, and other information.

WishlistAPI methodAvailable?
getWishlistyes
getAnonymousyes
getWishlistsyes
createyes
addToWishlistyes
addMultipleToWishlistyes
updateLineItemyes
removeLineItemyes

Known limitations

None.