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
project.yml
configurationTo 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 method | Available? |
---|---|
getSalutations | not implemented |
confirmEmail | yes |
create | yes |
update | yes |
updatePassword | yes |
generatePasswordResetToken | yes |
resetPassword | yes |
login | yes |
refreshAccount | yes |
getAddresses | yes |
addAddress | yes |
updateAddress | yes |
removeAddress | yes |
setDefaultBillingAddress | yes |
setDefaultShippingAddress | yes |
Cart
See the CartAPI docs for arguments, types, and other information.
CartAPI methods | Available? |
---|---|
getForUser | yes |
getAnonymous | yes |
getById | yes |
setCustomLineItemType | not implemented |
getCustomLineItemType | yes |
setTaxCategory | yes |
getTaxCategory | yes |
addToCart | yes |
updateLineItem | yes |
removeLineItem | yes |
setEmail | yes |
setShippingMethod | yes |
setCustomField (deprecated) | yes |
setRawApiInput | yes |
setShippingAddress | yes |
setBillingAddress | yes |
addPayment | yes |
updatePayment | yes |
redeemDiscountCode | yes |
removeDiscountCode | yes |
order | yes |
getOrder | yes |
getOrders | yes |
startTransaction | yes |
commit | yes |
getAvailableShippingMethods | yes |
getShippingMethods | yes |
Product
See the ProductAPI docs for arguments, types, and other information.
ProductAPI method | Available? |
---|---|
queryCategories | yes |
getProductTypes | yes |
getProduct | yes |
Product search
See the ProductSearchAPI docs for arguments, types, and other information.
ProductSearchAPI method | Available? |
---|---|
getSearchableAttributes | yes |
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 method | Available? |
---|---|
getWishlist | yes |
getAnonymous | yes |
getWishlists | yes |
create | yes |
addToWishlist | yes |
addMultipleToWishlist | yes |
updateLineItem | yes |
removeLineItem | yes |
Known limitations
None.
Updated over 1 year ago