Can not able to save the shipping information after process from cart to checkout . We are using magento 2 api. My post information is like that
{
"addressInformation": {
"shipping_address": {
"id": 0,
"region": "IND",
"region_id": 0,
"region_code": "string",
"country_id": "IN",
"street": [
"string"
],
"company": "string",
"telephone": "123456789",
"fax": "string",
"postcode": "700091",
"city": "Kolkata",
"firstname": "Sauptik",
"lastname": "Basak",
"middlename": "string",
"prefix": "string",
"suffix": "string",
"vat_id": "string",
"customer_id": 2,
"email": "[email protected]",
"same_as_billing": 0,
"customer_address_id": 0,
"save_in_address_book": 1,
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
},
"billing_address": {
"id": 0,
"region": "string",
"region_id": 0,
"region_code": "string",
"country_id": "IN",
"street": [
"string"
],
"company": "string",
"telephone": "123456789",
"fax": "string",
"postcode": "700091",
"city": "Kolkata",
"firstname": "Sauptik",
"lastname": "Basak",
"middlename": "string",
"prefix": "string",
"suffix": "string",
"vat_id": "string",
"customer_id": 2,
"email": "string",
"same_as_billing": 0,
"customer_address_id": 0,
"save_in_address_book": 0,
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
},
"shipping_method_code": "string",
"shipping_carrier_code": "string",
"extension_attributes": {},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
}
}
my end point is http://192.168.0.61/WallisFudge/index.php/rest/V1/carts/3/shipping-information
i am getting that error
"message": "Unable to save shipping information. Please check input data."
can not able to process checkout through magento 2 api
Can you try retrieving your available "Shipping Methods" by calling http://192.168.0.61/WallisFudge/index.php/rest/V1/carts/3/shipping-methods. Then get the data and assign the codes to the following:
"shipping_method_code": "your_shipping_method_code_here", "shipping_carrier_code": "your_shipping_carrier_code_here",
Hope this helps.
Joemar