I have created some steps between shipping and Payment form and add some field between then and applied ajax on that but i have facing an issue for not logged in user it will gave an error of 401 and redirect on login page on saving first field.

Will anyone help me how to successfully placed order without login.

i'm using Rest Api to save data in magento 2

<route url="/V1/carts/mine/set-save-data" method="PUT">
    <service class="Vendor\Module\Api\SaveNoteManagementInterface" method="saveSimpleNote"/>
        <resource ref="self" />
        <parameter name="cartId" force="true">%cart_id%</parameter>

This is my webapi.xml code it works properly for logged in user but for guest user it doesn't work and give 401 redirection. If you want i will share my full code for saving the data.

  • Can you share the code what you done? – Dhiren Vasoya Aug 9 '20 at 16:32
  • I have updated my question please check @DhirenVasoya – Prits Aug 9 '20 at 17:01
  • Updated my code please check tell me anything needed. – Prits Aug 11 '20 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.