{"info":{"_postman_id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","name":"Yuzu API documentation","description":"<html><head></head><body><h1 id=\"getting-started\">📄 Getting started</h1>\n<p>The Yuzu API provides engineers with all the tools necessary to build an integration between your order management systems and Yuzu.</p>\n<p>To start using the Yuzu API, you need to:</p>\n<ul>\n<li><p>Sign into <a href=\"https://app.yuzu.so\">app.yuzu.so</a> and setup your team</p>\n</li>\n<li><p>Create an API key to authenticate requests to the Yuzu API</p>\n</li>\n</ul>\n<h2 id=\"authentication\">Authentication</h2>\n<p>The Yuzu API uses the <code>X-API-Key</code> header for authentication.</p>\n<p>You can generate a Yuzu API key for your team in the <a href=\"https://app.yuzu.so/settings/teams/api-keys\">API keys</a> (Settings &gt; API Keys &gt; Create API Key) section of your Yuzu team settings.</p>\n<p>You must include an API key in each request to the Yuzu API with the <code>X-API-Key</code> request header.</p>\n<blockquote>\n<p>⚠️ Warning: Once you confirm you have securely copied an API Key, there is no way of viewing that key again and a new key will need to be created if the secret is lost </p>\n</blockquote>\n<h3 id=\"authentication-error-response\">Authentication error response</h3>\n<p>If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.</p>\n<h3 id=\"503-response\">503 response</h3>\n<p>An HTTP <code>503</code> response from our servers indicates there is an unexpected spike in API access traffic. The server is usually operational within the next five minutes. If the outage persists or you receive any other form of an HTTP <code>5XX</code> error, contact support.</p>\n<h3 id=\"need-some-help\"><strong>Need some help?</strong></h3>\n<p>If you have any questions or need additional support, feel free to reach out to our CTO, Mitch, via email.</p>\n<p>Email: <a href=\"https://mailto:developers@yuzu.so\">developers@yuzu.so</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"📄 Getting started","slug":"getting-started"}],"owner":"23943032","collectionId":"18608a0e-014d-4fb1-8f8d-9a022bb15381","publishedId":"2sA3s7kpKi","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"7183FA"},"publishDate":"2024-08-16T17:42:29.000Z"},"item":[{"name":"Orders","item":[{"name":"Create order","id":"e3bbcace-a1ac-4b0a-b39d-cc2c8d8d94e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"sourceId\": \"EXAMPLE_SOURCE_ID\",\n  \"order\": {\n    \"orderNumber\": \"#1286101\",\n    \"orderDate\": \"2024-08-01T12:00:00.000000Z\",\n    \"note\": \"\",\n    \"customer\": {\n      \"firstName\": \"Jill\",\n      \"lastName\": \"Blogs\",\n      \"email\": \"jill@blogs.com\",\n      \"orderCount\": 3,\n      \"lifetimeValue\": {\n        \"amount\": 1,\n        \"currency\": \"USD\"\n      },\n      \"averageOrderValue\": {\n        \"amount\": 1,\n        \"currency\": \"USD\"\n      }\n    },\n    \"billingAddress\": {\n      \"firstName\": \"Jill\",\n      \"lastName\": \"Blogs\",\n      \"company\": \"Blog Inc.\",\n      \"address1\": \"456 Joe Road\",\n      \"address2\": \"\",\n      \"address3\": \"\",\n      \"city\": \"Joesville\",\n      \"state\": \"Delaware\",\n      \"postalCode\": \"54321\",\n      \"country\": \"US\"\n    },\n    \"shippingAddress\": {\n      \"firstName\": \"Joe\",\n      \"lastName\": \"Blogs\",\n      \"company\": \"Blog Inc.\",\n      \"address1\": \"123 Joe Road\",\n      \"address2\": \"\",\n      \"address3\": \"\",\n      \"city\": \"Joesville\",\n      \"state\": \"Delaware\",\n      \"postalCode\": \"12345\",\n      \"country\": \"US\"\n    },\n    \"lineItems\": [\n      {\n        \"name\": \"Example product\",\n        \"quantity\": 1,\n        \"sku\": \"SKU-0001\",\n        \"price\": {\n          \"amount\": 1,\n          \"currency\": \"USD\"\n        }\n      }\n    ],\n    \"orderTotal\": {\n      \"amount\": 1,\n      \"currency\": \"USD\"\n    },\n    \"tags\": [\n      {\n        \"label\": \"Example tag\"\n      }\n    ],\n    \"overrides\": {\n      \"template\": \"TEMPLATE_ID_HERE\",\n      \"printer\": \"PRINTER_ID_HERE\",\n      \"tray\": \"TRAY_HERE\"\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://app.yuzu.so/api/orders","description":"<p>The create order endpoint allows you to create/update orders by providing a source, sourceId and order payload.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","name":"Yuzu API documentation","type":"collection"}},"urlObject":{"path":["orders"],"host":["https://app.yuzu.so/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e3bbcace-a1ac-4b0a-b39d-cc2c8d8d94e7"},{"name":"Print Orders","id":"dfb637e5-8d3c-4a2c-9185-0062047c4006","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"orderIds\": [],\n    \"overrides\": {\n        \"printer\": \"\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://app.yuzu.so/api/print","description":"<p>Now that you’ve configured the authentication headers, you’re able to use the Print Orders endpoint to start automating prints.</p>\n<p>To print one or more orders, make a <code>POST</code> request to <code>/api/print</code>. The endpoint requires that you pass a valid JSON formatted body containing a key <code>orderIds</code> which should be an array of one or more Order Keys.</p>\n<p>If a print request is successful, the request will return a status code of 200.</p>\n<p>The response will be an array, structured into successful and failed batches. Failed batches will include details about why the print batch failed.</p>\n<p>The typings for succesful and failed print requests are shown in the types below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">  type SuccessBatch = {\n    id: string                    // Print batch UUID\n    name: string                  // Print job title\n    status: string             \n    team: { authId: string }      // Team identifier\n    orders: Array&lt;{\n      id: string                  // Order ID\n      orderKeys: string[]         // Source order keys\n    }&gt;\n    printer: {                    // Printer details\n      id: number\n      name: string\n      nickname: string | null\n      paper_sizes: unknown[]\n      trays: unknown[]\n      status: string\n    }\n    printQueue: { id: string }    // Reference to print queue\n    createdAt: Date\n    updatedAt: Date\n  }\n\n  type ErrorBatch = {\n    id: 'missing-orders' | 'printer-not-found' | 'paper-size-not-found' | 'template-not-found'\n    name: string                  // Error description\n    status: 'error'               \n    team: { authId: string }\n    orders: Array&lt;{\n      id: string\n      orderKeys: string[]\n    }&gt;\n    // No printer field for errors\n  }\n\n  // Full response type\n  type Response = Array\n</code></pre>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","name":"Yuzu API documentation","type":"collection"}},"urlObject":{"path":["print"],"host":["https://app.yuzu.so/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"dfb637e5-8d3c-4a2c-9185-0062047c4006"}],"id":"a4760352-098a-4020-b810-3f8510016c0f","description":"<p>The order endpoints let you send order data to Yuzu and print orders at the perfect point in your process.</p>\n<h3 id=\"order-keys\">Order Keys</h3>\n<p>An Order Key is a compound identifier made by joining the app ID and order source ID with a hyphen. For example: Given an app with ID <code>app_123abc</code> and an order who’s source ID for that app is <code>order_456def</code>, the Order Key would be <code>app_123abc-order_456def</code>.</p>\n<p>App IDs can be found by selecting the relevant app in the Yuzu platform and copying the ID from the URL.</p>\n<p>An Order Source ID is the order’s identifier within whatever app send the order to Yuzu. For example, if a Shopify app has created the order, the order source ID will be the Shopify Order ID.</p>\n<blockquote>\n<p>📌 Note: An order can have multiple order keys associated to it if the order has been enriched by multiple apps. Providing any valid order key will trigger a print of that order.</p>\n</blockquote>\n","_postman_id":"a4760352-098a-4020-b810-3f8510016c0f","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","id":"18608a0e-014d-4fb1-8f8d-9a022bb15381","name":"Yuzu API documentation","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{apiKey}}"}]}},"event":[{"listen":"prerequest","script":{"id":"799d787b-0bec-4640-a12a-6cc510655686","type":"text/javascript","requests":{},"exec":[""]}},{"listen":"test","script":{"id":"91b13162-c861-4b83-8bfa-d1a86a0e0ab1","type":"text/javascript","requests":{},"exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://app.yuzu.so/api"},{"key":"apiKey","value":"{{apiKey}}"}]}