create an empty cart url: http://www.xxxxxx.com/rest/V1/carts/mine call: post answer: cartID for example: 4290
Add product to cart url: http://www.xxxxxx.com/rest/V1/carts/mine/items body:
{"cartItem":{ "sku":"JFCO00017","qty":1,"name":"Devil May Cry III 3 Dante Cosplay Costume","price":81.55,"product_type":"simple","quote_id":"4290","product_option":{"extension_attributes":{"custom_options":[{"option_id":"thumbnail","option_value":"\/d\/e\/devilmaycryiii3dantecosplay_1_.jpg"},{"option_id":"color_2","option_value":"Red"},{"option_id":"google_size","option_value":"xxs"}]}}} }
Add url billing information: http://www.xxxxxx.com/rest/V1/carts/mine/billing-address body:
{ "address": { "city": "noida", "company": "iprag", "countryId": "IN", "email": " manish+2@gmail.com ", "firstname": "Manish", "lastname": "Kumar", "postcode": "201301", "region": "UP", "saveInAddressBook": 1, "street": ["D-84"], "telephone": "8802xxxx90" }, "useForShipping": true }
Get url shipping methods: http://www.xxxxxx.com/rest/V1/carts/mine/shipping-methods
{ "carrier_code": "flatrate", "method_code": "flatrate", "carrier_title": "Flat Rate", "method_title": "Fixed", "amount": 10, "base_amount": 10, "available": true, "error_message": "", "price_excl_tax": 10, "price_incl_tax": 10
}
add shipping information url: http://www.xxxxxx.com/rest/V1/carts/mine/shipping-information Body:
{ "addressInformation": { "billingAddress": { "city": "noida", "company": "iprag", "email": " nkn@gmail.com ", "firstname": "Manish", "lastname": "Kumar", "postcode": "335001", "region": "UP", "street": ["D-84"], "telephone": "9413433217" }, "shippingAddress": { "city": "noida", "company": "iprag", "email": " nkn@gmail.com ", "firstname": "Manish", "lastname": "Kumar", "postcode": "335001", "region": "UP", "street": ["D-84"], "telephone": "9413433217" }, "shippingCarrierCode": "flatrate", "shippingMethodCode": "flatrate" } }