Ship Station Documentation can be found here:
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(idint(11) NOT NULL,orderIdvarchar(32) COLLATE utf8_unicode_ci NOT NULL,orderNumbervarchar(32) COLLATE utf8_unicode_ci NOT NULL,orderDateDATETIME COLLATE utf8_unicode_ci DEFAULT NULL,orderStatusvarchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
orderTotalFLOAT DEFAULT 0.00,amountPaidFLOAT DEFAULT 0.00,
taxAmountFLOAT DEFAULT 0.00,shippingAmountFLOAT DEFAULT 0.00, PRIMARY KEY (id), CONSTRAINT FOREIGN KEY (id) REFERENCESOOrder(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE
ShipStationOrderLine(idint(11) NOT NULL,orderItemIdvarchar(32) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (id), CONSTRAINT FOREIGN KEY (id) REFERENCESOrderLine(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"