{"_id":"5c097a0265263a0216070bb7","user":"5436cda4d0ffee0e00f19147","category":{"_id":"5c097a0265263a0216070b99","pages":["5c097a0265263a0216070bb2","5c097a0265263a0216070bb3","5c097a0265263a0216070bb4","5c097a0265263a0216070bb5","5c097a0265263a0216070bb6","5c097a0265263a0216070bb7","5c097a0265263a0216070bc4","5c097a0265263a0216070bc7","5c097a0265263a0216070bcd","5c097a0265263a0216070bce"],"project":"5436a1e1d0ffee0e00f18f8c","version":"5c097a0265263a0216070bd2","__v":5,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-09T15:31:21.989Z","from_sync":false,"order":1,"slug":"customer-api","title":"Customer API"},"githubsync":"","parentDoc":null,"project":"5436a1e1d0ffee0e00f18f8c","__v":2,"version":{"_id":"5c097a0265263a0216070bd2","__v":0,"forked_from":"54cc2148380ecd0d00ca18aa","project":"5436a1e1d0ffee0e00f18f8c","createdAt":"2015-01-31T00:26:48.753Z","releaseDate":"2015-01-31T00:26:48.753Z","categories":["5c097a0265263a0216070b98","5c097a0265263a0216070b99","5c097a0265263a0216070b9a","5c097a0265263a0216070b9b","5c097a0265263a0216070b9c","5c097a0265263a0216070b9d","5c097a0265263a0216070b9e","5c097a0265263a0216070b9f","5c097a0265263a0216070ba0","5c097a0265263a0216070ba1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.2.0","version":"1.2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-12T19:28:53.468Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":10,"body":"Be sure to read the [Quick Start](doc:getting-started-1) section first.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Introduction\"\n}\n[/block]\nShippingEasy provides a cloud-based shipping solution that allows its customers to easily consolidate orders from multiple storefronts (amazon, eBay, Bigcommerce, Shopify, Volusion, WooCommerce, etc.) in order to create shipping labels from a variety of carriers (USPS, UPS, FedEx, etc.).  An overview of ShippingEasy is available [here](https://www.youtube.com/watch?v=ERu4VFwZaP8)\n\nShippingEasy has invested significant effort in building integrations to a variety of selling platforms, shopping carts, and marketplaces. For platforms/carts/marketplaces that provide an API, we can easily build an integration. For shopping carts that do not provide an API, it is necessary to build a plugin for that specific shopping cart. The plugin uses the API provided by the ShippingEasy server to send data to ShippingEasy.\n\nMost of the shopping carts that do not provide an externally accessible API are implemented in PHP. To facilitate creating PHP plugins that use our API to send order data to ShippingEasy, we have a [PHP client library](doc:php-getting-started). We also have client libraries for [Ruby](doc:ruby-client-getting-started) and [.NET](doc:dotnet-getting-started).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Integration\"\n}\n[/block]\nIntegrating an ecommerce shopping cart with ShippingEasy requires handling four primary activities:\n\n1. Sending newly created orders to ShippingEasy automatically, usually at the end of the order creation process. Typically there are one or more order status “types” that should be sent automatically and all others should not be sent automatically - selection of the types is done via a customer specified option.\n\n2. Sending orders selected by the customer to ShippingEasy.  For orders that were not sent automatically, if a subsequent status change qualifies the order for shipping, the customer needs the ability to select and then send that order to ShippingEasy.\n\n3. Cancelling orders that were previously sent to ShippingEasy. For some carts this can be done automatically based on a status change - for others, a specific user interface control is needed.\n\n4. Processing a callback from the ShippingEasy server that contains shipment information for an order: specific items that were shipped, carrier used, tracking number, and shipment cost. The order is updated in the cart with the information.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuration\"\n}\n[/block]\nAll ShippingEasy ecommerce plugins will require configuration settings for these four values: Customer API key, Customer API secret, ShippingEasy URL, and Store API key.\n\nAdditional configuration options will depend on the specific requirements of the shopping cart. Most will probably need options for controlling the status value an order must have before it is sent automatically at creation to ShippingEasy.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installation\"\n}\n[/block]\nThe installation and upgrade requirements vary considerably by shopping cart. Some offer plugin marketplaces and have corresponding requirements for being listed on that marketplace (coding standards, packaging formats, etc). Others offer only basic administrative tools for “adding” a plugin to a customer’s installation via the local file system. \n\nUpgrade facilities also vary widely. Some of the carts that provide a plugin marketplace also offer APIs that can be used to alert the customer that a new version is available and even to do an in-place upgrade of the plugin.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Troubleshooting\"\n}\n[/block]\nA key requirement is the logging of activity by the plugin: attempts to send orders, attempts to cancel orders, and attempts to process a callback from the ShippingEasy server. The ecommerce plugin *must* make this information readily available via its user interface to the ShippingEasy support team to facilitate troubleshooting problems with the customer’s environment.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Store Setup\"\n}\n[/block]\nAs described in the the [Quick Start](doc:getting-started-1) , create a ShippingEasy API store.\n\nThe key enabling piece is the usage of API key values - there are three.  Two for the customer ShippingEasy account and one for the specific store within the account.","excerpt":"","slug":"ecommerce-plugin-development","type":"basic","title":"Ecommerce Plugin Development"}

Ecommerce Plugin Development


Be sure to read the [Quick Start](doc:getting-started-1) section first. [block:api-header] { "type": "basic", "title": "Introduction" } [/block] ShippingEasy provides a cloud-based shipping solution that allows its customers to easily consolidate orders from multiple storefronts (amazon, eBay, Bigcommerce, Shopify, Volusion, WooCommerce, etc.) in order to create shipping labels from a variety of carriers (USPS, UPS, FedEx, etc.). An overview of ShippingEasy is available [here](https://www.youtube.com/watch?v=ERu4VFwZaP8) ShippingEasy has invested significant effort in building integrations to a variety of selling platforms, shopping carts, and marketplaces. For platforms/carts/marketplaces that provide an API, we can easily build an integration. For shopping carts that do not provide an API, it is necessary to build a plugin for that specific shopping cart. The plugin uses the API provided by the ShippingEasy server to send data to ShippingEasy. Most of the shopping carts that do not provide an externally accessible API are implemented in PHP. To facilitate creating PHP plugins that use our API to send order data to ShippingEasy, we have a [PHP client library](doc:php-getting-started). We also have client libraries for [Ruby](doc:ruby-client-getting-started) and [.NET](doc:dotnet-getting-started). [block:api-header] { "type": "basic", "title": "Integration" } [/block] Integrating an ecommerce shopping cart with ShippingEasy requires handling four primary activities: 1. Sending newly created orders to ShippingEasy automatically, usually at the end of the order creation process. Typically there are one or more order status “types” that should be sent automatically and all others should not be sent automatically - selection of the types is done via a customer specified option. 2. Sending orders selected by the customer to ShippingEasy. For orders that were not sent automatically, if a subsequent status change qualifies the order for shipping, the customer needs the ability to select and then send that order to ShippingEasy. 3. Cancelling orders that were previously sent to ShippingEasy. For some carts this can be done automatically based on a status change - for others, a specific user interface control is needed. 4. Processing a callback from the ShippingEasy server that contains shipment information for an order: specific items that were shipped, carrier used, tracking number, and shipment cost. The order is updated in the cart with the information. [block:api-header] { "type": "basic", "title": "Configuration" } [/block] All ShippingEasy ecommerce plugins will require configuration settings for these four values: Customer API key, Customer API secret, ShippingEasy URL, and Store API key. Additional configuration options will depend on the specific requirements of the shopping cart. Most will probably need options for controlling the status value an order must have before it is sent automatically at creation to ShippingEasy. [block:api-header] { "type": "basic", "title": "Installation" } [/block] The installation and upgrade requirements vary considerably by shopping cart. Some offer plugin marketplaces and have corresponding requirements for being listed on that marketplace (coding standards, packaging formats, etc). Others offer only basic administrative tools for “adding” a plugin to a customer’s installation via the local file system. Upgrade facilities also vary widely. Some of the carts that provide a plugin marketplace also offer APIs that can be used to alert the customer that a new version is available and even to do an in-place upgrade of the plugin. [block:api-header] { "type": "basic", "title": "Troubleshooting" } [/block] A key requirement is the logging of activity by the plugin: attempts to send orders, attempts to cancel orders, and attempts to process a callback from the ShippingEasy server. The ecommerce plugin *must* make this information readily available via its user interface to the ShippingEasy support team to facilitate troubleshooting problems with the customer’s environment. [block:api-header] { "type": "basic", "title": "Store Setup" } [/block] As described in the the [Quick Start](doc:getting-started-1) , create a ShippingEasy API store. The key enabling piece is the usage of API key values - there are three. Two for the customer ShippingEasy account and one for the specific store within the account.