Quote widget
A price for a shipment from a postcode and the packages.
The visitor chooses a service, enters the destination postcode and country and the packages, and gets the price before tax, the tax and the total, with the date the price is valid until. Amounts are shown with two decimals and the currency code.
Services
The widget offers the services chosen in the back office among the parcel services the client quotes publicly: local delivery, pickup, point to point, shipping and express. Moving, storage, label and field service quotes stay on the client's quote page.
deliverypickupp2pshippingexpress
What the client needs
Public quotes switched on, and the public quotes capability of the sWidget app on in My Apps.
swidget:quoted
Each price is announced to the page with the swidget:quoted event.
document.addEventListener('swidget:quoted', (event) => {
const { quote } = event.detail; // { currency, pre_tax, tax, total, valid_until }
});
Calls
| REST | GraphQL |
|---|---|
GET /app/v1/clients/{clientCode}/swidget | partnerAppSwidget |
GET /app/v1/clients/{clientCode}/guest/quotes/schema | partnerAppGuestQuoteSchema |
POST /app/v1/clients/{clientCode}/guest/quotes/{line} | partnerAppGuestQuote |
The calls are operations of the partner app API, in REST and GraphQL: Partner app REST reference · Partner app GraphQL reference