{"_id":"54cc2149380ecd0d00ca18c3","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"},"__v":1,"parentDoc":null,"category":{"_id":"54cc2149380ecd0d00ca18b1","version":"54cc2148380ecd0d00ca18aa","pages":["54cc2149380ecd0d00ca18c3"],"project":"5436a1e1d0ffee0e00f18f8c","__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-27T19:49:29.797Z","from_sync":false,"order":9,"slug":"making-requests-via-curl","title":"Making requests via curl"},"project":"5436a1e1d0ffee0e00f18f8c","user":"5436a1afb7cf0e1c0020d9ca","updates":["54be9f27ffb79c320030daec"],"next":{"pages":[],"description":""},"createdAt":"2014-10-27T19:50:18.862Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Before starting\"\n}\n[/block]\nAs with all ShippingEasy API calls, you will need to [calculate a signature](http://shippingeasy.readme.io/docs/authentication-signing-requests) to authenticate each request.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples\"\n}\n[/block]\n## Creating an order\n\n````shell\ncurl -H \"Content-Type: application/json\" --data :::at:::body.json \"https://app.shippingeasy.com/api/stores/27aa472e16faa83dd13b7758d31974ed/orders?api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&api_signature=c65f43beed46e581939898a78acd10064cfa146845e97885ec02124d7ad648e4\"\n````\n\nAn example body.json can be found here:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\\"order\\\": \\n   {\\n      \\\"external_order_identifier\\\":\\\"ABC-100\\\",\\n      \\\"ordered_at\\\":\\\"2014-01-16 14:37:56 -0600\\\",\\n      \\\"order_status\\\":\\\"awaiting_shipment\\\",\\n      \\\"subtotal_including_tax\\\":\\\"10.00\\\",\\n      \\\"total_including_tax\\\":\\\"10.00\\\",\\n      \\\"total_excluding_tax\\\":\\\"10.00\\\",\\n      \\\"discount_amount\\\":\\\"0.00\\\",\\n      \\\"coupon_discount\\\":\\\"1.00\\\",\\n      \\\"subtotal_including_tax\\\":\\\"0.00\\\",\\n      \\\"subtotal_excluding_tax\\\":\\\"0.00\\\",\\n      \\\"subtotal_excluding_tax\\\":\\\"0.00\\\",\\n      \\\"subtotal_tax\\\":\\\"0.00\\\",\\n      \\\"total_tax\\\":\\\"0\\\",\\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      \\\"notes\\\":\\\"Please send promptly.\\\",\\n      \\\"billing_company\\\":\\\"Acme Inc.\\\",\\n      \\\"billing_first_name\\\":\\\"Fred\\\",\\n      \\\"billing_last_name\\\":\\\"Jones\\\",\\n      \\\"billing_address\\\":\\\"1234 Street\\\",\\n      \\\"billing_address2\\\":\\\"Suite 100\\\",\\n      \\\"billing_city\\\":\\\"Austin\\\",\\n      \\\"billing_state\\\":\\\"TX\\\",\\n      \\\"billing_postal_code\\\":\\\"78701\\\",\\n      \\\"billing_country\\\":\\\"USA\\\",\\n      \\\"billing_phone_number\\\":\\\"512-123-1234\\\",\\n      \\\"billing_email\\\":\\\"test@test.com\\\",\\n      \\\"recipients\\\":[{\\n         \\\"first_name\\\":\\\"Colin\\\",\\n         \\\"last_name\\\":\\\"Homenick\\\",\\n         \\\"company\\\":\\\"Wintheiser-Hickle\\\",\\n         \\\"email\\\":\\\"charles.crona@okeefe.org\\\",\\n         \\\"phone_number\\\":\\\"637-481-6505\\\",\\n         \\\"residential\\\":\\\"true\\\",\\n         \\\"address\\\":\\\"21937 Adelbert Springs\\\",\\n         \\\"address2\\\":\\\"\\\",\\n         \\\"province\\\":\\\"\\\",\\n         \\\"state\\\":\\\"CT\\\",\\n         \\\"city\\\":\\\"Terryfurt\\\",\\n         \\\"postal_code\\\":\\\"93322\\\",\\n         \\\"postal_code_plus_4\\\":\\\"1234\\\",\\n         \\\"country\\\":\\\"Andorra\\\",\\n         \\\"shipping_method\\\":\\\"Ground\\\",\\n         \\\"base_cost\\\":\\\"10.00\\\",\\n         \\\"cost_excluding_tax\\\":\\\"10.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\\\":\\\"123\\\",\\n         \\\"shipping_zone_name\\\":\\\"XYZ\\\",\\n         \\\"items_total\\\":\\\"1\\\",\\n         \\\"items_shipped\\\":\\\"0\\\",\\n         \\\"line_items\\\":[{\\n            \\\"item_name\\\":\\\"Pencil Holder\\\",\\n            \\\"sku\\\":\\\"9876543\\\",\\n            \\\"bin_picking_number\\\":\\\"7\\\",\\n            \\\"unit_price\\\":\\\"1.30\\\",\\n            \\\"total_excluding_tax\\\":\\\"1.30\\\",\\n            \\\"weight_in_ounces\\\":\\\"10\\\",\\n            \\\"product_options\\\":{\\n               \\\"pa_size\\\":\\\"large\\\",\\n               \\\"Colour\\\":\\\"Blue\\\"\\n            },\\n            \\\"quantity\\\":\\\"1\\\"\\n         }]\\n      }]\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"body.json\"\n    }\n  ]\n}\n[/block]\n## Cancelling an order\n\n````shell\ncurl -X POST \"https://app.shippingeasy.com/api/stores/86eac265e87ea9a74a86fe248f2e79d2/orders/ABC123/cancellations?api_key=XXX&api_signature=c24c5118a2b2af27557af721145991594d00a0d914f0d9bc2b9a2fa26efb30cc&api_timestamp=1409173624\"\n````\n\n## Searching orders\n\n````shell\ncurl \"https://app.shippingeasy.com/api/orders?api_key=XXX&api_signature=a6ab10918d435ad2abfbbe6004dc2fc7faac62a291f4d66e4a36e5a654d15a54&api_timestamp=1409174329&page=3&per_page=10&status%5B0%5D=ready_for_shipment&status%5B1%5D=shipped\"\n````","excerpt":"","slug":"creating-a-signature","type":"basic","title":"Example requests"}
[block:api-header] { "type": "basic", "title": "Before starting" } [/block] As with all ShippingEasy API calls, you will need to [calculate a signature](http://shippingeasy.readme.io/docs/authentication-signing-requests) to authenticate each request. [block:api-header] { "type": "basic", "title": "Examples" } [/block] ## Creating an order ````shell curl -H "Content-Type: application/json" --data @body.json "https://app.shippingeasy.com/api/stores/27aa472e16faa83dd13b7758d31974ed/orders?api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&api_signature=c65f43beed46e581939898a78acd10064cfa146845e97885ec02124d7ad648e4" ```` An example body.json can be found here: [block:code] { "codes": [ { "code": "{ \"order\": \n {\n \"external_order_identifier\":\"ABC-100\",\n \"ordered_at\":\"2014-01-16 14:37:56 -0600\",\n \"order_status\":\"awaiting_shipment\",\n \"subtotal_including_tax\":\"10.00\",\n \"total_including_tax\":\"10.00\",\n \"total_excluding_tax\":\"10.00\",\n \"discount_amount\":\"0.00\",\n \"coupon_discount\":\"1.00\",\n \"subtotal_including_tax\":\"0.00\",\n \"subtotal_excluding_tax\":\"0.00\",\n \"subtotal_excluding_tax\":\"0.00\",\n \"subtotal_tax\":\"0.00\",\n \"total_tax\":\"0\",\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 \"notes\":\"Please send promptly.\",\n \"billing_company\":\"Acme Inc.\",\n \"billing_first_name\":\"Fred\",\n \"billing_last_name\":\"Jones\",\n \"billing_address\":\"1234 Street\",\n \"billing_address2\":\"Suite 100\",\n \"billing_city\":\"Austin\",\n \"billing_state\":\"TX\",\n \"billing_postal_code\":\"78701\",\n \"billing_country\":\"USA\",\n \"billing_phone_number\":\"512-123-1234\",\n \"billing_email\":\"test@test.com\",\n \"recipients\":[{\n \"first_name\":\"Colin\",\n \"last_name\":\"Homenick\",\n \"company\":\"Wintheiser-Hickle\",\n \"email\":\"charles.crona@okeefe.org\",\n \"phone_number\":\"637-481-6505\",\n \"residential\":\"true\",\n \"address\":\"21937 Adelbert Springs\",\n \"address2\":\"\",\n \"province\":\"\",\n \"state\":\"CT\",\n \"city\":\"Terryfurt\",\n \"postal_code\":\"93322\",\n \"postal_code_plus_4\":\"1234\",\n \"country\":\"Andorra\",\n \"shipping_method\":\"Ground\",\n \"base_cost\":\"10.00\",\n \"cost_excluding_tax\":\"10.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\":\"123\",\n \"shipping_zone_name\":\"XYZ\",\n \"items_total\":\"1\",\n \"items_shipped\":\"0\",\n \"line_items\":[{\n \"item_name\":\"Pencil Holder\",\n \"sku\":\"9876543\",\n \"bin_picking_number\":\"7\",\n \"unit_price\":\"1.30\",\n \"total_excluding_tax\":\"1.30\",\n \"weight_in_ounces\":\"10\",\n \"product_options\":{\n \"pa_size\":\"large\",\n \"Colour\":\"Blue\"\n },\n \"quantity\":\"1\"\n }]\n }]\n }\n}", "language": "json", "name": "body.json" } ] } [/block] ## Cancelling an order ````shell curl -X POST "https://app.shippingeasy.com/api/stores/86eac265e87ea9a74a86fe248f2e79d2/orders/ABC123/cancellations?api_key=XXX&api_signature=c24c5118a2b2af27557af721145991594d00a0d914f0d9bc2b9a2fa26efb30cc&api_timestamp=1409173624" ```` ## Searching orders ````shell curl "https://app.shippingeasy.com/api/orders?api_key=XXX&api_signature=a6ab10918d435ad2abfbbe6004dc2fc7faac62a291f4d66e4a36e5a654d15a54&api_timestamp=1409174329&page=3&per_page=10&status%5B0%5D=ready_for_shipment&status%5B1%5D=shipped" ````