diff --git a/InvenTree/InvenTree/static/script/inventree/barcode.js b/InvenTree/InvenTree/static/script/inventree/barcode.js
new file mode 100644
index 0000000000..77ccf17c6e
--- /dev/null
+++ b/InvenTree/InvenTree/static/script/inventree/barcode.js
@@ -0,0 +1,22 @@
+
+/*
+ * Pass barcode data to the server.
+ */
+function scanBarcode(barcode, options={}) {
+
+ console.log('Sending barcode data:');
+ console.log(barcode);
+
+ inventreePut(
+ '/api/barcode/',
+ {
+ 'barcode': barcode,
+ },
+ {
+ method: 'POST',
+ success: function(response, status) {
+ console.log(response);
+ },
+ }
+ );
+}
\ No newline at end of file
diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html
index 63487eb625..745b93d5b2 100644
--- a/InvenTree/templates/base.html
+++ b/InvenTree/templates/base.html
@@ -107,6 +107,7 @@ InvenTree
+