Merchant will need to install your app in order for your shipping rules and settings to be shown.
After the installation, user would need a page where they can configure it: provide their account details, set up dimensions, etc.
To show new shipping methods in storefront, Ecwid will send a POST request to your endpoint with order details: items that require shipping and have shipping set as global or global + fixed rate per item, customer address, merchant app settings, etc. That endpoint must respond to the request with the shipping rates for this configuration.
The request to your app URL can also be triggered by a customer in storefront or by an API request to Calculate order details
In the case of an API request for calculating order details, products and cart information itself can be different from what the store has. For example, some other application can create a custom storefront where it requests order calculation with items that are not present in the store.
For these cases, your application should also provide correct discount calculations for the amount of cart information available.
Ecwid will expect a response from your service within 10 second interval to display additional shipping methods for customers. In the response, provide shipping method name, rate and estimated delivery time. See the response format in the Shipping request and response
Based on the response from your app, Ecwid will display the shipping methods for customers at the checkout. Customer can select them just like any other shipping method in that Ecwid store and it will be shown in the order details.
Shipping methods from the application will be added to any currently enabled shipping methods a store has enabled.
In case if your app responds with an error or in an incorrect format, then the shipping methods from your app will not be shown to customer at checkout stage.
When your store has other applicable shipping methods set up, then they will be shown to customer.
Yes. Ecwid will not make a request to your URL if both these conditions are met:
- previous request happened less than 5 minutes ago
- request details are exactly the same as in previous request
In other cases, Ecwid will make a new request to your endpoint. For example, a new product was added to cart, shipping/payment method was changed, customer address was changed, etc.
Any event that changes the order details will reset the cache and Ecwid will make a new request to your endpoint.