Migrated from GitLab wiki
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user