Open Application Platform Docs

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.

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

RESTGraphQL
GET /app/v1/clients/{clientCode}/swidgetpartnerAppSwidget
GET /app/v1/clients/{clientCode}/guest/quotes/schemapartnerAppGuestQuoteSchema
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