Adding a shipping Address to a guest cart in Magento
-
02-10-2020 - |
Question
I am trying to add a shipping address to a guest cart in magento but it's throwing the following error.
POST: http://staging.yudala.com/ee/rest/V1/guest-carts/0faff9e835d1ca9c84d7526ee288398f/shipping-information
{
"message": "Carrier with such method not found: %1, %2",
"parameters": [
null,
null
],
}
here is my payload:
{
"addressInformation": {
"shippingAddress": {
"city": "Nigeria",
"country_id": "NG",
"firstname": "someone",
"lastname": "something",
"postcode": "11756",
"region_code": "LG",
"street": [
"address01",
"address02"
],
"telephone": "1111111111"
}
}
}
Please am I missing out something?
Solution
Yes, you're missing things.Your parameters are not correct.Use this format:
{"addressInformation":
{"shipping_address":
{"countryId":"NG",
"regionId":"508",
"regionCode":"Kebbi",
"region":"Kebbi",
"street": [0:"",1:""],
"postcode":"234",
"city":"Lagos"},
"billing_address":
{"countryId":"NG",
"regionId":"508",
"regionCode":"Kebbi",
"region":"Kebbi",
"street":[0:"Lagos"],
"company":"Yudala","telephone":"","postcode":"234","city":"Uyo",
"firstname":"Kpono",
"lastname":"Akpabio",
"saveInAddressBook":false},
"shipping_method_code":"yucarrier",
"shipping_carrier_code":"yucarrier"}}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange