To further enhance your website with interactive and dynamic BSTD functionalities, you can integrate the following APIs:
Document API
Use the Document API to securely embed and manage customer-specific documents such as invoices, agreements, contracts, or loading slips directly on your website. This allows your users to view, download, or even e-sign documents without leaving your platform.
document.addEventListener('DOMContentLoaded', () => {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('key'); // Expects a secure token in the URL
const apiKey = 'YOUR_BSTD_API_KEY'; // Replace with your actual BSTD API key
if (!token) {
document.body.innerHTML = '<h3 style="color: #dc3545; text-align: center; margin-top: 50px;">Error: Missing document access token in URL.</h3>';
} else if (!apiKey || apiKey === 'YOUR_BSTD_API_KEY') {
document.body.innerHTML = '<h3 style="color: #dc3545; text-align: center; margin-top: 50px;">Error: Please provide a valid BSTD API key.</h3>';
} else {
const script = document.createElement('script');
script.src = `https://bstd.digital.thugo.in/api/embed/customer-docs.js?apikey=${apiKey}&key=${encodeURIComponent(token)}`;
document.head.appendChild(script);
}
});
Important Tip: Ensure you pass the secure key (document token) dynamically in the URL (e.g., yourwebsite.com/docs?key=YOUR_DOCUMENT_TOKEN) to identify the customer and securely load their specific documents. Remember to replace 'YOUR_BSTD_API_KEY' with your unique API key obtained from your BSTD dashboard.
Leads API
Automate lead capture on your website using the Leads API. This script will inject a customizable lead generation form or modal that seamlessly submits data directly to your BSTD lead management system.
<script src="https://bstd.digital.thugo.in/api/embed/delayed-form-modal.js?apikey=YOUR_BSTD_API_KEY" defer></script>
Use Case: This API is ideal for capturing sales inquiries, product interest, support requests, or any user data that you want to funnel directly into your BSTD lead workflow. Remember to replace 'YOUR_BSTD_API_KEY' with your actual API key.
Shipment Tracking API
Empower your customers to track their orders and shipments with ease by embedding our Shipment Tracking API. This integration provides a tracking form that allows customers to enter an LR (Lorry Receipt) number or tracking ID to view live shipment status.
<!-- Placeholder where the shipment tracking widget will appear -->
<div id="shipmentTrackingContainer"></div>
<!-- Include the tracking script before the closing </body> tag -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const apiKey = 'YOUR_BSTD_API_KEY'; // Replace with your actual BSTD API key
if (!apiKey || apiKey === 'YOUR_BSTD_API_KEY') {
document.getElementById('shipmentTrackingContainer').innerHTML = '<h3 style="color: #dc3545; text-align: center; margin-top: 50px;">Error: Please provide a valid BSTD API key for shipment tracking.</h3>';
} else {
const script = document.createElement('script');
script.src = `https://bstd.digital.thugo.in/api/embed/delayed-shipment-tracking-modal.js?apikey=${apiKey}`;
script.defer = true;
document.head.appendChild(script);
}
});
</script>
Result: Integrating this API significantly improves customer transparency and can reduce inbound support calls related to shipment status. Ensure you replace 'YOUR_BSTD_API_KEY' with your unique API key for this integration to function correctly and display accurate tracking information.