Sylius / ShopApiPlugin

Shop API for Sylius.
https://sylius.com
130 stars 89 forks source link

[Usage] Knowing shipping ID for checkout #649

Closed pierre-H closed 4 years ago

pierre-H commented 4 years ago

Hello ! First, thank you for your great work !

Could you please tell us how to know the shipping ID to use when doing a PUT request to /checkout/{token}/shipping/{id} ?

We don't have the shipping ID neither in the cart summary nor with the GET /checkout/{token}/shipping...

Thank you in advance for your answer !

mamazu commented 4 years ago

This is bad variable naming. If you use the /checkout/{token}/shipping/ endpoint with GET you will get a list of available shippings. The id that the POST endpoint requires is the index of the shipping method you want to select.

pierre-H commented 4 years ago

Ok ! Thank you !