As per documentations of commercetools, all the microservices(carts, order, shipping method etc) are independent of each other.
Calling the below API in POSTMAN :
https://api.sphere.io/{{myproject-key}}/carts/{{cartId}}
Body part:
{
"version": 5,
"actions": [{
"action": "addLineItem",
"productId": "6d22957d-7c42-4663-95c3-099c11016999",
"variantId": 1
}]
}
The above yields me the correct response whenever I provide the productID from the commercetools platform catalog. But if I try to give my own product ID (from DB hosted at Localhost) I can't add items to the cart.
Instead it gives me the following error:
Error Log: "The referenced object of type 'product' with identifier '6d22957d-7c42-4663-95c3-099c11016999' not found."
This means both the services i.e product catalog and cart are tightly coupled. Does this mean that the microservices cannot be used individually?
Question : Can I use commercetools individual services such as Cart, Shipping method, Order alone in my existing e-commerce site?