1

I have created an customer address attribute city_id while i am trying to add this attribute in the below following REST APis Getting bellow error.

Property "CityId" does not have corresponding setter in class "Magento\Quote\Api\Data\AddressInterface"**

POST /V1/carts/mine/estimate-shipping-methods
POST /V1/guest-carts/:cartId/estimate-shipping-methods    

How can we solve? please help me.

thanks

enter image description here

1

1 Answer 1

2

Magento2 default, does not has any field city_id .IT has field city.

May be in your system,you have create customer attribute city_id.

As per as magento2, system if you want create any custom attribute then they suggest to use extension attribute concept.

Follow this link as suggestion http://devdocs.magento.com/guides/v2.2/howdoi/checkout/checkout_new_field.html

3
  • thanks @amit bera i already created city_id customer address attribute Mar 12, 2018 at 8:26
  • hi @amit bera i have tried the above concept but not working can you please provide me the what exact steps need to follow ? as well as i have followed codeblog.experius.nl/… but no luck Mar 12, 2018 at 9:21
  • 1
    i will check and get back to you when i will avaliable
    – Amit Bera
    Mar 12, 2018 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.