How do I use the Shipping API (Custom Shipping Service) module? |
|
Shift4Shop's Shipping API module allows merchants to connect their store to an independent shipping service and get real-time shipping rates from the service. To use the module, you would need to contact your shipping service and ask them to provide you with the following:
*Endpoint URL At the time of checkout, the Shipping API module will send a request to the endpoint URL in JSON format. The information sent will include the shipping origin address, the destination shipping address, the line items in the cart including SKU, Name, Price, Weight, and Dimensions. The JSON request from the Shift4Shop store will look like this example: { "orderid": 38, "weightunit": "LBS", "measurementunit": "IN", "totalitems": 1, "totalweight": 1, "orderamount": 3.99, "shippingfrom": { "state": "UT", "postalcode": "84101", "country": "US" }, "shippingto": { "address1": "123 Street", "address2": "", "city": "Coral Springs", "state": "FL", "postalcode": "33065", "country": "US" }, "items": [{ "sku": "SAMPLE-1007", "name": "[DEMO] Extreme Pak Neon Pink Leopard Print Shopping Tote", "quantity": 1, "unitprice": 3.99, "unitweight": 1, "unitlength": 0, "unitwidth": 0, "unitheight": 0 }] } After the JSON request is sent, the store will then expect a JSON response from your shipping carrier to display their rates for the shopper to select. The expected JSON response will need to look like this for the rates to display: {"shippingmethods": [ {"methodname":"DHL Priority", "rate":32.00}, {"methodname":"USPS First Class", "rate":3.00}, {"methodname":"UPS Ground", "rate":12.00} ]} During the checkout process, the rates will be retrieved from your independent shipping service and will be displayed for the shopper to select and complete their order. For a sample application, please visit the following URL: Adding the Module to your StoreOnce you've gotten the above requirements from your shipping service, you can process with adding the Shipping API module to your store following these steps:
Once you're in the Shipping Settings section, scroll down past the Real Time Shipping Settings carrier list and locate the "Custom Shipping Service" block.
The next step will be to create your custom shipping service methods in the store. Adding the Shipping Method(s)Now that you've added the Shipping API module, the final step will be to create the shipping methods that will be displayed on the checkout pages for your customers.
The Custom Shipping Service method will be added and you can further fine tune its settings to meet your needs.
Once you are done with configuring the method, click Save at the top right of the page and you're all set. You can add as many of the Custom Shipping Service methods by repeating the above steps as needed. Important | |
|