{"_id":"54cc2149380ecd0d00ca18cf","category":{"_id":"54cc2149380ecd0d00ca18b0","pages":["54cc2149380ecd0d00ca18ca","54cc2149380ecd0d00ca18cb","54cc2149380ecd0d00ca18cc","54cc2149380ecd0d00ca18cd","54cc2149380ecd0d00ca18ce","54cc2149380ecd0d00ca18cf","54cc2149380ecd0d00ca18d0","54cc2149380ecd0d00ca18d1"],"project":"5436a1e1d0ffee0e00f18f8c","__v":1,"version":"54cc2148380ecd0d00ca18aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-23T19:03:27.816Z","from_sync":false,"order":6,"slug":"ruby-client","title":"Ruby client"},"project":"5436a1e1d0ffee0e00f18f8c","user":"5436a1afb7cf0e1c0020d9ca","version":{"_id":"54cc2148380ecd0d00ca18aa","__v":2,"forked_from":"5436a1e1d0ffee0e00f18f8f","project":"5436a1e1d0ffee0e00f18f8c","createdAt":"2015-01-31T00:26:48.753Z","releaseDate":"2015-01-31T00:26:48.753Z","categories":["54cc2149380ecd0d00ca18ab","54cc2149380ecd0d00ca18ac","54cc2149380ecd0d00ca18ad","54cc2149380ecd0d00ca18ae","54cc2149380ecd0d00ca18af","54cc2149380ecd0d00ca18b0","54cc2149380ecd0d00ca18b1","54cc2149380ecd0d00ca18b2","54cc2149380ecd0d00ca18b3","552f29ca633a5b0d00e99d09"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"parentDoc":null,"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-23T20:25:03.983Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":5,"body":"Sometimes an e-commerce system will mark an order as shipped outside of the ShippingEasy system. Therefore an API call is required to remove this order from ShippingEasy so that it is not double-shipped.\n\nHere's an example using your store's API key and the e-commerce order identifier used to create the order in ShippingEasy:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ShippingEasy::Resources::Cancellation.create(store_api_key: \\\"d8821dde1d32f408def40b77273d5c11\\\", external_order_identifier: \\\"ABC123\\\")\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nIf successful the call will return a hash with the ShippingEasy order ID, as well as the external order identifier originally supplied in your call.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\\"order\\\" => { \\\"id\\\" => \\\"27654\\\", \\\"external_order_identifier\\\" => \\\"ABC123\\\" } }\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"canceling-an-order","type":"basic","title":"Canceling an order"}

Canceling an order


Sometimes an e-commerce system will mark an order as shipped outside of the ShippingEasy system. Therefore an API call is required to remove this order from ShippingEasy so that it is not double-shipped. Here's an example using your store's API key and the e-commerce order identifier used to create the order in ShippingEasy: [block:code] { "codes": [ { "code": "ShippingEasy::Resources::Cancellation.create(store_api_key: \"d8821dde1d32f408def40b77273d5c11\", external_order_identifier: \"ABC123\")", "language": "ruby" } ] } [/block] If successful the call will return a hash with the ShippingEasy order ID, as well as the external order identifier originally supplied in your call. [block:code] { "codes": [ { "code": "{ \"order\" => { \"id\" => \"27654\", \"external_order_identifier\" => \"ABC123\" } }", "language": "ruby" } ] } [/block]