cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Add to Cart in OCC.

VinayKumarS
Active Contributor
0 Kudos
1,567

Hi Experts,

I am not able to add a cart to the product using hybris oob. Powertools on Hybris 1808 https://{{hostport}}/{{webroot}}/v2/{{site}}/users/{{user}}/carts/{{cartnr}}/entries

curl --request POST \ --url 'https://{{hostport}}/{{webroot}}/v2/{{site}}/users/{{user}}/carts/{{cartnr}}/entries' \ --header 'Authorization: {{Auth}}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data code=HX9042_64

Accepted Solutions (1)

Accepted Solutions (1)

VinayKumarS
Active Contributor
0 Kudos

earlier in v1 occ implementation if we would have passed the product code and quantity. We usually used to add the product to cart. Now i am checking this on hybris 1808.

I tried with this json. It worked.

 {
             "configurationInfos": [],
             "entryNumber": 1,
             "product": {
                 "availableForPickup": false,
                 "code": "3756505",
                 "name": "PSR 14.4 LI-2",
                 "purchasable": true,
                 "stock": {
                     "stockLevel": 187
                 },
                 "url": "/Open-Catalogue/Tools/Power-Drills/PSR-14-4-LI-2/p/3756505"
             },
             "quantity": 1,
             "totalPrice": {
                 "currencyIso": "USD",
                 "value": 149
             }
         }

Answers (0)