From db21baad4fb80ba75b4bcba7d11e5f2293855427 Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 29 Jun 2026 09:04:59 +0000 Subject: [PATCH] Migrated from GitLab wiki --- ShipStation-Integration.-.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ShipStation-Integration.-.md diff --git a/ShipStation-Integration.-.md b/ShipStation-Integration.-.md new file mode 100644 index 0000000..e201755 --- /dev/null +++ b/ShipStation-Integration.-.md @@ -0,0 +1,33 @@ +Ship Station Documentation can be found here: +> https://www.shipstation.com/docs/api/ + +For eStack implementation basically we just need the api key and secret key from ShipStation. Once we are authenticated the system will pull all active stores in ShipStation. Each stores, will be saved as a new channel account to our system. + +To save the orders to our system we added 2 tables: + +> CREATE TABLE `ShipStationOrder` ( +> `id` int(11) NOT NULL, +> `orderId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, +> `orderNumber` varchar(32) COLLATE utf8_unicode_ci NOT NULL, +> `orderDate` DATETIME COLLATE utf8_unicode_ci DEFAULT NULL, +> `orderStatus` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, +> `orderTotal` FLOAT DEFAULT 0.00, +> `amountPaid` FLOAT DEFAULT 0.00, +> `taxAmount` FLOAT DEFAULT 0.00, +> `shippingAmount` FLOAT DEFAULT 0.00, +> PRIMARY KEY (`id`), +> CONSTRAINT FOREIGN KEY (`id`) REFERENCES `OOrder` (`id`) ON DELETE CASCADE +> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +> CREATE TABLE `ShipStationOrderLine` ( +> `id` int(11) NOT NULL, +> `orderItemId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, +> PRIMARY KEY (`id`), +> CONSTRAINT FOREIGN KEY (`id`) REFERENCES `OrderLine` (`id`) ON DELETE CASCADE +> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + +CRON Job that pull orders from ship station. +> 30 * * * * cd /estack; bin/pms3 shipstation fetch orders --fromTime="-4 hours" + +