{"_id":"54cc2601380ecd0d00ca18dc","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"},"project":"5436a1e1d0ffee0e00f18f8c","parentDoc":null,"__v":3,"category":{"_id":"54cc2149380ecd0d00ca18ac","pages":["54cc2149380ecd0d00ca18c4","54cc2149380ecd0d00ca18c5","54cc2149380ecd0d00ca18c6","54cc2149380ecd0d00ca18c7","54cc2149380ecd0d00ca18c8","54cc2149380ecd0d00ca18c9","54cc2601380ecd0d00ca18dc","55035fc26cb452370085b3ef","561dbc1defcf8217003adf22","561e6b043e744b2100d21191"],"project":"5436a1e1d0ffee0e00f18f8c","version":"54cc2148380ecd0d00ca18aa","__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"},"updates":["579258f2310cb22200f6e18c"],"next":{"pages":[],"description":""},"createdAt":"2015-01-31T00:46:57.967Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"Your application can receive a webhook callback when an order is shipped from the ShippingEasy application.\n\nThe URL for the callback is configured on your ShippingEasy API store settings page.\n\nThe callback will be an HTTP POST from our servers. It will always include an `api_signature` querystring, and JSON formatted body.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Verify the API Signature\",\n  \"body\": \"The endpoint you expose for shipment notifications must not require authentication. However, all requests from ShippingEasy will be cryptographically signed and include the `api_signature` querystring. We highly recommend that you verify the signature using the algorithm outlined in our Authentication section. Requests without a valid signature should be ignored.\"\n}\n[/block]\n\nAn example callback payload:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"shipment\\\":{  \\n    \\\"id\\\":58,\\n    \\\"tracking_number\\\":\\\"0400110200828100896724\\\",\\n    \\\"carrier_key\\\":\\\"USPS\\\",\\n    \\\"carrier_service_key\\\":\\\"First\\\",\\n    \\\"shipment_cost\\\":209,\\n    \\\"weight_in_ounces\\\":\\\"12.0\\\",\\n    \\\"orders\\\":[  \\n      {  \\n        \\\"id\\\":119,\\n        \\\"external_order_identifier\\\":\\\"ABC-635574609661580899\\\",\\n        \\\"ordered_at\\\":\\\"2015-01-22T00:16:06Z\\\",\\n        \\\"order_status\\\":\\\"shipped\\\",\\n        \\\"parent_order_id\\\":null,\\n        \\\"source_order_ids\\\":null,\\n        \\\"total_including_tax\\\":\\\"0.00\\\",\\n        \\\"total_excluding_tax\\\":\\\"0.00\\\",\\n        \\\"discount_amount\\\":\\\"0.00\\\",\\n        \\\"coupon_discount\\\":\\\"0.00\\\",\\n        \\\"subtotal_including_tax\\\":\\\"0.00\\\",\\n        \\\"subtotal_excluding_tax\\\":\\\"0.00\\\",\\n        \\\"subtotal_tax\\\":\\\"0.00\\\",\\n        \\\"total_tax\\\":\\\"0.00\\\",\\n        \\\"base_shipping_cost\\\":\\\"0.00\\\",\\n        \\\"shipping_cost_including_tax\\\":\\\"0.00\\\",\\n        \\\"shipping_cost_excluding_tax\\\":\\\"0.00\\\",\\n        \\\"shipping_cost_tax\\\":\\\"0.00\\\",\\n        \\\"base_handling_cost\\\":\\\"0.00\\\",\\n        \\\"handling_cost_excluding_tax\\\":\\\"0.00\\\",\\n        \\\"handling_cost_including_tax\\\":\\\"0.00\\\",\\n        \\\"handling_cost_tax\\\":\\\"0.00\\\",\\n        \\\"base_wrapping_cost\\\":\\\"0.00\\\",\\n        \\\"wrapping_cost_excluding_tax\\\":\\\"0.00\\\",\\n        \\\"wrapping_cost_including_tax\\\":\\\"0.00\\\",\\n        \\\"wrapping_cost_tax\\\":\\\"0.00\\\",\\n        \\\"billing_company\\\":null,\\n        \\\"billing_first_name\\\":null,\\n        \\\"billing_last_name\\\":null,\\n        \\\"billing_address\\\":null,\\n        \\\"billing_address2\\\":null,\\n        \\\"billing_city\\\":null,\\n        \\\"billing_state\\\":null,\\n        \\\"billing_country\\\":null,\\n        \\\"billing_postal_code\\\":null,\\n        \\\"billing_phone_number\\\":null,\\n        \\\"billing_email\\\":null,\\n        \\\"recipients\\\":[  \\n          {  \\n            \\\"company\\\":null,\\n            \\\"first_name\\\":\\\"Jack\\\",\\n            \\\"last_name\\\":\\\"Ship\\\",\\n            \\\"address\\\":\\\"123 Main St\\\",\\n            \\\"address2\\\":\\\"Suite # 2\\\",\\n            \\\"address3\\\":null,\\n            \\\"city\\\": \\\"Somewhere\\\",\\n            \\\"residential\\\":null,\\n            \\\"state\\\": \\\"TX\\\",\\n            \\\"province\\\":null,\\n            \\\"country\\\":\\\"United States\\\",\\n            \\\"postal_code\\\":null,\\n            \\\"postal_code_plus_4\\\":null,\\n            \\\"phone_number\\\":null,\\n            \\\"email\\\":null,\\n            \\\"base_cost\\\":\\\"0.00\\\",\\n            \\\"cost_excluding_tax\\\":\\\"0.00\\\",\\n            \\\"cost_including_tax\\\":\\\"0.00\\\",\\n            \\\"cost_tax\\\":\\\"0.00\\\",\\n            \\\"base_handling_cost\\\":\\\"0.00\\\",\\n            \\\"handling_cost_excluding_tax\\\":\\\"0.00\\\",\\n            \\\"handling_cost_including_tax\\\":\\\"0.00\\\",\\n            \\\"handling_cost_tax\\\":\\\"0.00\\\",\\n            \\\"shipping_zone_id\\\":null,\\n            \\\"shipping_zone_name\\\":null,\\n            \\\"items_total\\\":0,\\n            \\\"shipping_method\\\":null,\\n            \\\"items_shipped\\\":0,\\n            \\\"ext_shipping_detail_id\\\":null,\\n            \\\"line_items\\\":[  \\n              {  \\n                \\\"item_name\\\":\\\"Sprocket\\\",\\n                \\\"sku\\\":null,\\n                \\\"bin_picking_number\\\":null,\\n                \\\"weight_in_ounces\\\":\\\"0.0\\\",\\n                \\\"quantity\\\":7,\\n                \\\"total_excluding_tax\\\":\\\"0.00\\\",\\n                \\\"price_excluding_tax\\\":\\\"0.00\\\",\\n                \\\"unit_price\\\":\\\"0.00\\\",\\n                \\\"ext_line_item_id\\\":null,\\n                \\\"ext_product_id\\\":null,\\n                \\\"product_options\\\":null,\\n                \\\"uuid\\\":null,\\n                \\\"order_source_id\\\":null\\n              }\\n            ]\\n          }\\n        ],\\n        \\\"store_api_key\\\":\\\"c71dc6da574eea04e2c926906bcb4eec\\\",\\n        \\\"shipments\\\":[  \\n          {  \\n            \\\"id\\\":58,\\n            \\\"tracking_number\\\":\\\"0400110200828100896724\\\",\\n            \\\"carrier_key\\\":\\\"USPS\\\",\\n            \\\"carrier_service_key\\\":\\\"First\\\",\\n            \\\"shipment_cost\\\":209,\\n            \\\"ship_date\\\":\\\"2015-01-29\\\"\\n          }\\n        ],\\n        \\\"updated_at\\\":\\\"2015-01-29T18:50:35Z\\\",\\n      }\\n    ]\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Shipment notification payload\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"shipment-notification-callback","type":"basic","title":"Shipment notification callback"}

Shipment notification callback


Your application can receive a webhook callback when an order is shipped from the ShippingEasy application. The URL for the callback is configured on your ShippingEasy API store settings page. The callback will be an HTTP POST from our servers. It will always include an `api_signature` querystring, and JSON formatted body. [block:callout] { "type": "danger", "title": "Verify the API Signature", "body": "The endpoint you expose for shipment notifications must not require authentication. However, all requests from ShippingEasy will be cryptographically signed and include the `api_signature` querystring. We highly recommend that you verify the signature using the algorithm outlined in our Authentication section. Requests without a valid signature should be ignored." } [/block] An example callback payload: [block:code] { "codes": [ { "code": "{ \n \"shipment\":{ \n \"id\":58,\n \"tracking_number\":\"0400110200828100896724\",\n \"carrier_key\":\"USPS\",\n \"carrier_service_key\":\"First\",\n \"shipment_cost\":209,\n \"weight_in_ounces\":\"12.0\",\n \"orders\":[ \n { \n \"id\":119,\n \"external_order_identifier\":\"ABC-635574609661580899\",\n \"ordered_at\":\"2015-01-22T00:16:06Z\",\n \"order_status\":\"shipped\",\n \"parent_order_id\":null,\n \"source_order_ids\":null,\n \"total_including_tax\":\"0.00\",\n \"total_excluding_tax\":\"0.00\",\n \"discount_amount\":\"0.00\",\n \"coupon_discount\":\"0.00\",\n \"subtotal_including_tax\":\"0.00\",\n \"subtotal_excluding_tax\":\"0.00\",\n \"subtotal_tax\":\"0.00\",\n \"total_tax\":\"0.00\",\n \"base_shipping_cost\":\"0.00\",\n \"shipping_cost_including_tax\":\"0.00\",\n \"shipping_cost_excluding_tax\":\"0.00\",\n \"shipping_cost_tax\":\"0.00\",\n \"base_handling_cost\":\"0.00\",\n \"handling_cost_excluding_tax\":\"0.00\",\n \"handling_cost_including_tax\":\"0.00\",\n \"handling_cost_tax\":\"0.00\",\n \"base_wrapping_cost\":\"0.00\",\n \"wrapping_cost_excluding_tax\":\"0.00\",\n \"wrapping_cost_including_tax\":\"0.00\",\n \"wrapping_cost_tax\":\"0.00\",\n \"billing_company\":null,\n \"billing_first_name\":null,\n \"billing_last_name\":null,\n \"billing_address\":null,\n \"billing_address2\":null,\n \"billing_city\":null,\n \"billing_state\":null,\n \"billing_country\":null,\n \"billing_postal_code\":null,\n \"billing_phone_number\":null,\n \"billing_email\":null,\n \"recipients\":[ \n { \n \"company\":null,\n \"first_name\":\"Jack\",\n \"last_name\":\"Ship\",\n \"address\":\"123 Main St\",\n \"address2\":\"Suite # 2\",\n \"address3\":null,\n \"city\": \"Somewhere\",\n \"residential\":null,\n \"state\": \"TX\",\n \"province\":null,\n \"country\":\"United States\",\n \"postal_code\":null,\n \"postal_code_plus_4\":null,\n \"phone_number\":null,\n \"email\":null,\n \"base_cost\":\"0.00\",\n \"cost_excluding_tax\":\"0.00\",\n \"cost_including_tax\":\"0.00\",\n \"cost_tax\":\"0.00\",\n \"base_handling_cost\":\"0.00\",\n \"handling_cost_excluding_tax\":\"0.00\",\n \"handling_cost_including_tax\":\"0.00\",\n \"handling_cost_tax\":\"0.00\",\n \"shipping_zone_id\":null,\n \"shipping_zone_name\":null,\n \"items_total\":0,\n \"shipping_method\":null,\n \"items_shipped\":0,\n \"ext_shipping_detail_id\":null,\n \"line_items\":[ \n { \n \"item_name\":\"Sprocket\",\n \"sku\":null,\n \"bin_picking_number\":null,\n \"weight_in_ounces\":\"0.0\",\n \"quantity\":7,\n \"total_excluding_tax\":\"0.00\",\n \"price_excluding_tax\":\"0.00\",\n \"unit_price\":\"0.00\",\n \"ext_line_item_id\":null,\n \"ext_product_id\":null,\n \"product_options\":null,\n \"uuid\":null,\n \"order_source_id\":null\n }\n ]\n }\n ],\n \"store_api_key\":\"c71dc6da574eea04e2c926906bcb4eec\",\n \"shipments\":[ \n { \n \"id\":58,\n \"tracking_number\":\"0400110200828100896724\",\n \"carrier_key\":\"USPS\",\n \"carrier_service_key\":\"First\",\n \"shipment_cost\":209,\n \"ship_date\":\"2015-01-29\"\n }\n ],\n \"updated_at\":\"2015-01-29T18:50:35Z\",\n }\n ]\n }\n}", "language": "json", "name": "Shipment notification payload" } ] } [/block]