{"templateId":"markdown","versions":[{"version":"shipengine","label":"ShipStation API (formerly ShipEngine)","link":"/apis/shipengine/docs/sales-orders/quickstart-tutorial","default":false,"active":true,"folderId":"58c9a61d"},{"version":"shipstation-v2","label":"ShipStation V2 API","link":"/apis/shipstation-v2/docs/sales-orders/quickstart-tutorial","default":true,"active":false,"folderId":"58c9a61d"},{"version":"shipstation-v1","label":"ShipStation V1 API","link":"/apis/shipstation-v1/docs/sales-orders/quickstart-tutorial","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@shipengine/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Sales Orders Quickstart","keywords":"shipping, labels, shipstation, documentation, api","siteUrl":"https://docs.shipstation.com","lang":"en-US","llmstxt":{"hide":false,"title":"ShipStation API LLM Docs","description":"Find links and references to all markdown documentation for use with LLMs","excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"sales-orders-quickstart","__idx":0},"children":["Sales Orders Quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial demonstrates a complete order fulfillment workflow: creating an order in Shopify, importing it into ShipEngine, creating a shipping label, and notifying Shopify of shipment."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In-cart rates via Sales Order API require a Shopify Plus account."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"workflow-steps","__idx":1},"children":["Workflow Steps"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-create-an-order-in-shopify","__idx":2},"children":["1. Create an Order in Shopify"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a test order in Shopify. The generated order ID becomes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["external_order_id"]}," when imported into ShipEngine."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-refresh-the-order-source","__idx":3},"children":["2. Refresh the Order Source"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Trigger ShipEngine to import the newly created order:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PUT /v-beta/order_sources/__YOUR_ORDER_SOURCE_ID_HERE__/refresh HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-query-sales-orders","__idx":4},"children":["3. Query Sales Orders"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Find your order by sorting descending by order date:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /v-beta/sales_orders?order_source_id=__YOUR_ORDER_SOURCE_ID_HERE__&sort_dir=desc&sort_by=order_date&page=1&page_size=1 HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Or query directly by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["external_order_id"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /v-beta/sales_orders?external_order_id=1011295486011 HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"4-create-label-from-sales-order","__idx":5},"children":["4. Create Label from Sales Order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sales_order_id"]}," from the previous response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v-beta/labels/sales_order/:sales_order_id HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"label_format\": \"pdf\",\n  \"shipment\": {\n    \"carrier_id\": \"se-123890\",\n    \"service_code\": \"usps_priority_mail\",\n    \"ship_from\": {\n      \"company_name\": \"Example Corp.\",\n      \"name\": \"John Doe\",\n      \"phone\": \"111-111-1111\",\n      \"address_line1\": \"4009 Marathon Blvd\",\n      \"city_locality\": \"Austin\",\n      \"state_province\": \"TX\",\n      \"postal_code\": \"78756\",\n      \"country_code\": \"US\"\n    },\n    \"packages\": [{\n      \"package_code\": \"package\",\n      \"weight\": {\n        \"value\": 2,\n        \"unit\": \"pound\"\n      }\n    }]\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"5-notify-order-source-of-shipment","__idx":6},"children":["5. Notify Order Source of Shipment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Inform Shopify the order has shipped:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v-beta/sales_orders/:sales_order_id/notify_shipped HTTP/1.1\nHost: api.shipengine.com\nAPI-Key: __YOUR_API_KEY_HERE__\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"tracking_number\": \"9374869901600064074368\",\n  \"carrier_code\": \"usps\",\n  \"sales_order_items\": [{\n    \"sales_order_item_id\": \":sales_order_item_id\",\n    \"quantity\": 1\n  }]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Successful submission returns ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP 204 No Content"]},". Refresh your order source to update the sales order status."]}]},"headings":[{"value":"Sales Orders Quickstart","id":"sales-orders-quickstart","depth":1},{"value":"Workflow Steps","id":"workflow-steps","depth":2},{"value":"1. Create an Order in Shopify","id":"1-create-an-order-in-shopify","depth":3},{"value":"2. Refresh the Order Source","id":"2-refresh-the-order-source","depth":3},{"value":"3. Query Sales Orders","id":"3-query-sales-orders","depth":3},{"value":"4. Create Label from Sales Order","id":"4-create-label-from-sales-order","depth":3},{"value":"5. Notify Order Source of Shipment","id":"5-notify-order-source-of-shipment","depth":3}],"frontmatter":{"seo":{"title":"Sales Orders Quickstart"}},"lastModified":"2026-07-29T23:05:43.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/shipengine/docs/sales-orders/quickstart-tutorial","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}