Include our library in your code along with the provided API keys
At checkout page, once the user's postcode is known, call our API to verify availability and price
Tell our library where to fit the Brisqq box that enables user to select desired date / timeslot
Once checkout is complete, call our API to confirm user's reserved delivery timeslot
All that's needed is to load our stylesheet and library (and include your API key - contact us if you haven't got one). The Brisqq JS library depends on jQuery and moment.js, but it loads them automatically if they are not already included. Make sure to switch to the production version of the library once you're done with integration / testing.
<link rel="stylesheet" href="https://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/custom/brisqq-integration.css" />
/* staging version for testing */
<script data-brisqq-apikey="[API_KEY]" src="https://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/custom/brisqq-integration-staging.js"></script>
/* production version */
<script data-brisqq-apikey="[API_KEY]" src="https://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/custom/brisqq-integration.js"></script>
For testing, feel free to use 559280e2fed0ed03000900be.
Brisqq's availability depends on the distance between the fulfillment location and the customer's address, which is determined based on their postcode. Once the customer's postcode is known, you can call a library method that will communicate with the Brisqq API, and confirm service availability for the entered postcode, along with delivery price. Availability and price are determined based on agreed distance / price tiers.
Brisqq.checkAvailability('WC1B 3JA', function (isAvailable, price, error) {
console.log(isAvailable, price);
});
//true 10
Based on the availability result, you will want to add Brisqq to a list of available delivery options or use any other way to offer Brisqq to your customers as a value-added service. We leave it up to you to choose your preferred approach, and simply display our user interface when needed. Since the customer can reserve their delivery from here, we just need you to forward the contact details to help us schedule it properly.
var customerData = {
contactName: 'Johnattan Smith',
contactPhone: '+44771234567',
contactEmail: 'johnsmith@test.com',
address: '14 Bedford Square'
}
Brisqq.displayBox(customerData, '#shipping_method_2_info');
<div id="#shipping_method_2_info"></div>
Once the customer has completed the checkout process with Brisqq selected and reserved the delivery using our box, you will want to confirm the delivery. This will prevent it from timing out, and trigger Brisqq confirmation notifications containing delivery information, to both the partner and the customer. Deliveries that are not confirmed will time out, and won't be made or charged.
Brisqq.confirmDelivery(function (isConfirmed, error) {
console.log(isConfirmed, error);
});