Rest APIs for fetch the Basket
Posted: 30 Nov 2019, 07:23
Hello,
We have questions related to baskets operations.
First, Here we can add products to the basket without user login using the following API
URL: { basket_url }?id=abc123&related=product
Request : {"data":[{"attributes":{"product.id": 18,"quantity": 1}}]}
----
Now, we need to fetch this basket product again, We checked the documentation that we can use URL which coming on OPTIONS request (response.meta.resources['basket']). But how do we get data for the user who just added products in the basket? Do we need to pass any token or id with the URL?
We have questions related to baskets operations.
First, Here we can add products to the basket without user login using the following API
URL: { basket_url }?id=abc123&related=product
Request : {"data":[{"attributes":{"product.id": 18,"quantity": 1}}]}
----
Now, we need to fetch this basket product again, We checked the documentation that we can use URL which coming on OPTIONS request (response.meta.resources['basket']). But how do we get data for the user who just added products in the basket? Do we need to pass any token or id with the URL?