{"openapi":"3.1.0","info":{"title":"Temsor Stitch","version":"0.2.0"},"paths":{"/v1/digitize/{job_id}/share":{"post":{"summary":"Create Share","operationId":"create_share_v1_digitize__job_id__share_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a/{share_id}/answer":{"post":{"summary":"Answer","operationId":"answer_a__share_id__answer_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a/{share_id}/pins":{"post":{"summary":"Add Pin","description":"A comment pinned on a spot of the design (gap #5): stored with the link, so it expires with it.\nThe note is plain text (control characters stripped; pages render it with textContent).","operationId":"add_pin_a__share_id__pins_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a/{share_id}/pins/{pin_id}":{"delete":{"summary":"Delete Pin","description":"Whoever pinned it (their delete token) or the link owner can remove a pin.","operationId":"delete_pin_a__share_id__pins__pin_id__delete","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"pin_id","in":"path","required":true,"schema":{"type":"string","title":"Pin Id"}},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"T"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a/{share_id}/revise":{"post":{"summary":"Revise","description":"The owner sends an updated design (another job) to the same link: v2, v3... The answer history\nand pins stay (each tagged with its version); the customer is asked again.","operationId":"revise_a__share_id__revise_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a/{share_id}/sewout":{"post":{"summary":"Add Sewout","description":"Raw image body (JPEG/PNG/WebP). Re-encoded to a plain JPEG (EXIF/GPS dropped, orientation applied),\nat most SEWOUT_EDGE px; one photo per link, replaced by the next upload.","operationId":"add_sewout_a__share_id__sewout_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Sewout","operationId":"delete_sewout_a__share_id__sewout_delete","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a/{share_id}/status":{"get":{"summary":"Status","operationId":"status_a__share_id__status_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/handoff":{"post":{"summary":"Create Handoff","description":"A short-lived link + QR code that downloads one of this job's files on another device.\nSame gate as the download itself (402 when signed out / out of files).","operationId":"create_handoff_v1_digitize__job_id__handoff_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lookbooks":{"post":{"summary":"Create Lookbook","description":"Combine approval links you own (id + owner key each) into one client link.","operationId":"create_lookbook_v1_lookbooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookbookIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/l/{set_id}/status":{"get":{"summary":"Status","operationId":"status_l__set_id__status_get","parameters":[{"name":"set_id","in":"path","required":true,"schema":{"type":"string","title":"Set Id"}},{"name":"k","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","description":"Liveness + digitize latency over the last LAT_WINDOW requests (numbers only; the warm-up is not one).\n\n\"lettering\" is the Phase 1 font self-check (stitch.text.fonts.state): when the text deps are\ninstalled but a PHASE1 font file is missing, lettering is silently off for every logo, so\nstatus turns \"degraded\" (HTTP stays 200: the process is alive, the container must not restart\nin a loop; scripts/ops/smoke_fr.py fails the deploy on anything but \"ok\").\n\n\"lettering.add_text\" (only when the text deps are installed) stats the Studio add-text fonts, the same set\n_check_addition's fonts.available() gate uses: {\"fonts\": n} or {\"missing\": [keys]}. One missing file there\n422s every add-text request (font_unavailable) while the PHASE1 check above stays \"ready\", so it is reported\nhere; it is informational and never changes \"status\" or \"lettering.status\" (the deploy gate).","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/view":{"post":{"summary":"View Endpoint","description":"Read an uploaded PES/DST/JEF/EXP/VP3 and return its needle path and stats. Nothing is stored.","operationId":"view_endpoint_v1_view_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_view_endpoint_v1_view_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/names/batch":{"post":{"summary":"Names Batch Endpoint","description":"A CSV (multipart field `csv`) or a list (form field `names`, one per line, \"Name | Surname\")\nof up to namebatch.MAX_NAMES names -> a zip with one file per name per format + names.csv.\nNeeds an API key; each name counts as one job against it.","operationId":"names_batch_endpoint_v1_names_batch_post","parameters":[{"name":"width_mm","in":"query","required":false,"schema":{"type":"number","maximum":300.0,"minimum":10.0,"description":"Finished width of each name","default":80.0,"title":"Width Mm"},"description":"Finished width of each name"},{"name":"font","in":"query","required":false,"schema":{"type":"string","description":"sans, serif, slab or script (bundled OFL fonts)","default":"sans","title":"Font"},"description":"sans, serif, slab or script (bundled OFL fonts)"},{"name":"fabric","in":"query","required":false,"schema":{"type":"string","default":"woven","title":"Fabric"}},{"name":"color","in":"query","required":false,"schema":{"type":"string","description":"Thread colour #rrggbb","default":"#1a1a1a","title":"Color"},"description":"Thread colour #rrggbb"},{"name":"formats","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated: dst,pes,jef,exp,vp3,pec,xxx,u01,tbf,tap,dsb,dsz","default":"pes,dst","title":"Formats"},"description":"Comma-separated: dst,pes,jef,exp,vp3,pec,xxx,u01,tbf,tap,dsb,dsz"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/login":{"post":{"summary":"Account Login","description":"Email a one-time sign-in link (always 200: no account enumeration).","operationId":"account_login_v1_account_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/verify":{"get":{"summary":"Account Verify","operationId":"account_verify_account_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/logout":{"post":{"summary":"Account Logout","operationId":"account_logout_v1_account_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/account":{"get":{"summary":"Account Info","description":"The signed-in account. `optional=1` (the Studio's background balance check): a visitor without a session gets\n200 {\"signed_in\": false} instead of 401, so an anonymous page load logs no failed request (audit6).","operationId":"account_info_v1_account_get","parameters":[{"name":"optional","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Optional"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/library":{"get":{"summary":"Library List","operationId":"library_list_v1_account_library_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Library Keep","description":"Copy this job's stitch files into the signed-in library. keep must be true (the box starts unticked).","operationId":"library_keep_v1_account_library_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/library/{design_id}/{fmt}":{"get":{"summary":"Library Download","operationId":"library_download_v1_account_library__design_id___fmt__get","parameters":[{"name":"design_id","in":"path","required":true,"schema":{"type":"string","title":"Design Id"}},{"name":"fmt","in":"path","required":true,"schema":{"type":"string","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/library/{design_id}":{"delete":{"summary":"Library Remove","operationId":"library_remove_v1_account_library__design_id__delete","parameters":[{"name":"design_id","in":"path","required":true,"schema":{"type":"string","title":"Design Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/checkout":{"post":{"summary":"Account Checkout","operationId":"account_checkout_v1_account_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys":{"get":{"summary":"Account Keys","operationId":"account_keys_v1_account_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Account Key Create","description":"Business plan: a self-serve API key whose downloads draw on the account's credits (shown once).","operationId":"account_key_create_v1_account_api_keys_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks/polar":{"post":{"summary":"Polar Webhook","operationId":"polar_webhook_v1_webhooks_polar_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/fonts":{"get":{"summary":"Fonts Json","description":"The lettering fonts and the cap heights each sews at (stitch.text.fonts.size_range_mm).","operationId":"fonts_json_v1_fonts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pricing":{"get":{"summary":"Pricing Json","operationId":"pricing_json_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/plans":{"get":{"summary":"Pricing Page","operationId":"pricing_page_plans_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"summary":"Pricing Page","operationId":"pricing_page_plans_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/google/start":{"get":{"summary":"Account Google Start","description":"Send this browser to Google. The authorize URL is built here (PKCE, state, nonce). Off without both env vars.","operationId":"account_google_start_account_google_start_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/google":{"get":{"summary":"Account Google Return","description":"Google returns ?code= and ?state=. The code is exchanged only for the browser that started this\nflow (state cookie). It is not copied into the next URL. With the env vars unset, the code is dropped.","operationId":"account_google_return_account_google_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"summary":"Account Page","operationId":"account_page_account_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"summary":"Account Page","operationId":"account_page_account_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"summary":"Usage Endpoint","description":"The presented API key's usage this month (UTC) and its limits.","operationId":"usage_endpoint_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/sewout-report":{"post":{"summary":"Sewout Report","operationId":"sewout_report_v1_sewout_report_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sewout_report_v1_sewout_report_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sewout-feedback":{"post":{"summary":"Sewout Feedback","operationId":"sewout_feedback_v1_sewout_feedback_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_sewout_feedback_v1_sewout_feedback_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize":{"post":{"summary":"Digitize Endpoint","operationId":"digitize_endpoint_v1_digitize_post","parameters":[{"name":"width_mm","in":"query","required":false,"schema":{"type":"number","maximum":300.0,"minimum":10.0,"default":90.0,"title":"Width Mm"}},{"name":"fabric","in":"query","required":false,"schema":{"type":"string","default":"woven","title":"Fabric"}},{"name":"text","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Text"}},{"name":"max_colors","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8,"minimum":1},{"type":"null"}],"title":"Max Colors"}},{"name":"thicken","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Thicken"}},{"name":"drop_strays","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Drop Strays"}},{"name":"sew_knockouts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Sew Knockouts"}},{"name":"garment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Garment colour #rrggbb: thread close to it is sewn lighter","title":"Garment"},"description":"Garment colour #rrggbb: thread close to it is sewn lighter"},{"name":"skip_garment","in":"query","required":false,"schema":{"type":"boolean","description":"With garment: leave regions in the garment's own colour unsewn","default":false,"title":"Skip Garment"},"description":"With garment: leave regions in the garment's own colour unsewn"},{"name":"garment_auto","in":"query","required":false,"schema":{"type":"boolean","description":"With garment (the page's default, not one the user chose): when every thread touching the fabric vanishes on it, sew for the contrasting garment instead (result body garment.auto = {from, to}, plus, when there are any, a nested garment.auto.match = {regions, area_mm2, stitches, share}: the regions in `from`'s own colour a skip_garment run on `from` would leave unsewn, with stitches = their cost in this run (sewn on `to`) and share = their part of the design's area; from 4 mm2 of them quality.checks then has a garment_match with for_from: true whose fix is skip_garment on `from`)","default":false,"title":"Garment Auto"},"description":"With garment (the page's default, not one the user chose): when every thread touching the fabric vanishes on it, sew for the contrasting garment instead (result body garment.auto = {from, to}, plus, when there are any, a nested garment.auto.match = {regions, area_mm2, stitches, share}: the regions in `from`'s own colour a skip_garment run on `from` would leave unsewn, with stitches = their cost in this run (sewn on `to`) and share = their part of the design's area; from 4 mm2 of them quality.checks then has a garment_match with for_from: true whose fix is skip_garment on `from`)"},{"name":"keep_signature","in":"query","required":false,"schema":{"type":"boolean","description":"Sew an artist's signature in a corner too (left out by default)","default":false,"title":"Keep Signature"},"description":"Sew an artist's signature in a corner too (left out by default)"},{"name":"palette","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Declared SVG paints, comma-separated #rrggbb (flat artwork only)","title":"Palette"},"description":"Declared SVG paints, comma-separated #rrggbb (flat artwork only)"},{"name":"thread_brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A web/threadbrands.json id, or \"custom\" with thread_chart: match threads[].codes against this brand instead of showing every brand.","title":"Thread Brand"},"description":"A web/threadbrands.json id, or \"custom\" with thread_chart: match threads[].codes against this brand instead of showing every brand."},{"name":"thread_chart","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A CSV thread chart (code,name,hex or code,name,r,g,b) to match threads[].codes.custom against -- send as a multipart form field, not a query string, for anything but a tiny file.","title":"Thread Chart"},"description":"A CSV thread chart (code,name,hex or code,name,r,g,b) to match threads[].codes.custom against -- send as a multipart form field, not a query string, for anything but a tiny file."},{"name":"async","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"1/true: 202 + poll (same as POST /v1/jobs) instead of waiting for a 200; also triggered by a `Prefer: respond-async` header (RFC 7240).","title":"Async"},"description":"1/true: 202 + poll (same as POST /v1/jobs) instead of waiting for a 200; also triggered by a `Prefer: respond-async` header (RFC 7240)."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_digitize_endpoint_v1_digitize_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs":{"post":{"summary":"Submit Job Endpoint","description":"Same upload and options as POST /v1/digitize, answered with a job to poll (202, this\nalways async) instead of a wait: GET /v1/jobs/{job_id} for status and, once done, the body\nPOST /v1/digitize would have given back synchronously, \"simulation\" included (docs/plan/\nasync-jobs.md Faz 1). 404 unless the server has STITCH_ASYNC_JOBS=on.","operationId":"submit_job_endpoint_v1_jobs_post","parameters":[{"name":"width_mm","in":"query","required":false,"schema":{"type":"number","maximum":300.0,"minimum":10.0,"default":90.0,"title":"Width Mm"}},{"name":"fabric","in":"query","required":false,"schema":{"type":"string","default":"woven","title":"Fabric"}},{"name":"text","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Text"}},{"name":"max_colors","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8,"minimum":1},{"type":"null"}],"title":"Max Colors"}},{"name":"thicken","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Thicken"}},{"name":"drop_strays","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Drop Strays"}},{"name":"sew_knockouts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Sew Knockouts"}},{"name":"garment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Garment colour #rrggbb: thread close to it is sewn lighter","title":"Garment"},"description":"Garment colour #rrggbb: thread close to it is sewn lighter"},{"name":"skip_garment","in":"query","required":false,"schema":{"type":"boolean","description":"With garment: leave regions in the garment's own colour unsewn","default":false,"title":"Skip Garment"},"description":"With garment: leave regions in the garment's own colour unsewn"},{"name":"garment_auto","in":"query","required":false,"schema":{"type":"boolean","description":"With garment (the page's default, not one the user chose): when every thread touching the fabric vanishes on it, sew for the contrasting garment instead (result body garment.auto = {from, to}, plus, when there are any, a nested garment.auto.match = {regions, area_mm2, stitches, share}: the regions in `from`'s own colour a skip_garment run on `from` would leave unsewn, with stitches = their cost in this run (sewn on `to`) and share = their part of the design's area; from 4 mm2 of them quality.checks then has a garment_match with for_from: true whose fix is skip_garment on `from`)","default":false,"title":"Garment Auto"},"description":"With garment (the page's default, not one the user chose): when every thread touching the fabric vanishes on it, sew for the contrasting garment instead (result body garment.auto = {from, to}, plus, when there are any, a nested garment.auto.match = {regions, area_mm2, stitches, share}: the regions in `from`'s own colour a skip_garment run on `from` would leave unsewn, with stitches = their cost in this run (sewn on `to`) and share = their part of the design's area; from 4 mm2 of them quality.checks then has a garment_match with for_from: true whose fix is skip_garment on `from`)"},{"name":"callback_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"https URL to POST a signed job.done / job.failed event to","title":"Callback Url"},"description":"https URL to POST a signed job.done / job.failed event to"},{"name":"keep_signature","in":"query","required":false,"schema":{"type":"boolean","description":"Sew an artist's signature in a corner too (left out by default)","default":false,"title":"Keep Signature"},"description":"Sew an artist's signature in a corner too (left out by default)"},{"name":"palette","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Declared SVG paints, comma-separated #rrggbb (flat artwork only)","title":"Palette"},"description":"Declared SVG paints, comma-separated #rrggbb (flat artwork only)"},{"name":"thread_brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A web/threadbrands.json id, or \"custom\" with thread_chart: match threads[].codes against this brand instead of showing every brand.","title":"Thread Brand"},"description":"A web/threadbrands.json id, or \"custom\" with thread_chart: match threads[].codes against this brand instead of showing every brand."},{"name":"thread_chart","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A CSV thread chart (code,name,hex or code,name,r,g,b) to match threads[].codes.custom against -- send as a multipart form field, not a query string, for anything but a tiny file.","title":"Thread Chart"},"description":"A CSV thread chart (code,name,hex or code,name,r,g,b) to match threads[].codes.custom against -- send as a multipart form field, not a query string, for anything but a tiny file."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_job_endpoint_v1_jobs_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{async_id}":{"get":{"summary":"Get Job Endpoint","description":"Poll an async job: status is always 200 for a known id (the job's own outcome is in the\nbody, not the HTTP status) -- queued (+ \"position\", a cheap estimate)|running|done|failed,\nwith \"result\" (done: the same body POST /v1/digitize returns, \"simulation\" included while the\ndesign job lives) or \"error\"\n(failed: the same error body a sync 4xx/5xx would have had). Queued/running answers carry\n\"poll_after_s\" and the same Retry-After header (L-b). An id whose record expired (JOB_TTL_S, or\nthe finished cap): 410 job_expired (L-d); an id never issued here (or lost in a restart), or the\nfeature not enabled (STITCH_ASYNC_JOBS): 404 not_found. ?regions=<pass> (Q148): a running job's progress\nalso carries its sew pass's region map while that is newer than <pass>, and sew.active.","operationId":"get_job_endpoint_v1_jobs__async_id__get","parameters":[{"name":"async_id","in":"path","required":true,"schema":{"type":"string","title":"Async Id"}},{"name":"regions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regions"}},{"name":"seen","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"Comma list of running-job progress keys the poller already holds (only `preview`): left out of progress","default":"","title":"Seen"},"description":"Comma list of running-job progress keys the poller already holds (only `preview`): left out of progress"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel Job Endpoint","description":"Cancel an async job (Studio's Cancel button, or a client that gave up): 200 {status:\n\"cancelled\"}. Queued: its task is cancelled, it never runs. Running: the record says cancelled at\nonce and the result is discarded when the digitize finishes (the engine can't be interrupted\nmid-run, L2). Already done/failed: 409 already_finished. Another client's job: 403. Expired\nid: 410 job_expired (L-d). Unknown id, or async jobs off: 404. No quota is refunded (the caller chose to cancel).\ngrace_s > 0 (Faz 5.1 resume, 1025y; the Studio's page-leave): 202 {status: <unchanged>, cancel_in_s} -- the job\nkeeps its place and is cancelled only if no GET /v1/jobs/{id} comes within grace_s, so a reloaded Studio\npicks it up again; a plain DELETE (or a second one without grace) cancels at once as before.","operationId":"cancel_job_endpoint_v1_jobs__async_id__delete","parameters":[{"name":"async_id","in":"path","required":true,"schema":{"type":"string","title":"Async Id"}},{"name":"grace_s","in":"query","required":false,"schema":{"type":"number","maximum":30.0,"minimum":0.0,"description":"Deferred cancel: only if no GET poll comes within this many seconds","default":0.0,"title":"Grace S"},"description":"Deferred cancel: only if no GET poll comes within this many seconds"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/text/add":{"post":{"summary":"Add Text Endpoint","description":"Studio editor E-2 \"Add text here\": a line of vector lettering sewn on top of the design (new job).","operationId":"add_text_endpoint_v1_digitize__job_id__text_add_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/split":{"post":{"summary":"Split Region Endpoint","description":"Studio editor E-3 \"Split\": cut one part in pieces along a drawn line; each piece is then a part of its\nown (colour, stitch, angle, remove). A new job comes back; its pieces are regions[] with origin \"split\".","operationId":"split_region_endpoint_v1_digitize__job_id__split_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitEdit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/merge":{"post":{"summary":"Merge Regions Endpoint","description":"Studio editor E-4 \"Join\": touching parts become one part, sewn as one shape in `into`'s thread and stitch\n(the hairline gaps between them closed, stitch.params.MERGE_MAX_GAP_MM). A new job comes back; the joined\npart is a regions[] entry with origin \"merged\" (and new_piece on this job).","operationId":"merge_regions_endpoint_v1_digitize__job_id__merge_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeEdit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/outline":{"get":{"summary":"Region Outline Endpoint","description":"Studio \"Reshape\": the starting outline of part `id`: its outer contour simplified to at most RESHAPE_MAX_NODES\nnodes, [[x, y], ...] in simulation units (holes are kept as they are and not edited).","operationId":"region_outline_endpoint_v1_digitize__job_id__outline_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"id","in":"query","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/reshape":{"post":{"summary":"Reshape Region Endpoint","description":"Studio \"Reshape\": part `id` is re-sewn inside the polygon (never over a neighbouring part; its own holes stay\nopen). A new job comes back; the part is a regions[] entry with origin \"reshaped\" (and new_piece on this job).","operationId":"reshape_region_endpoint_v1_digitize__job_id__reshape_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReshapeEdit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/text":{"post":{"summary":"Edit Text Endpoint","description":"Re-digitize a text=\"auto\" job with corrected / disabled text blocks.\n\nReturns a new job (same response shape as POST /v1/digitize); the\noriginal job and its downloads stay as they were. Edits are cumulative:\nthe new job remembers them, so editing it again only needs the change.","operationId":"edit_text_endpoint_v1_digitize__job_id__text_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"machine","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TextEdit"},"title":"Edits"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/garment":{"post":{"summary":"Edit Garment Endpoint","description":"Re-digitize a job for another garment colour (density follows it; stitch.regions.garment_hides_light).","operationId":"edit_garment_endpoint_v1_digitize__job_id__garment_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GarmentEdit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/regions":{"post":{"summary":"Edit Regions Endpoint","description":"Re-digitize a job with per-region overrides (Studio: click a region, change it).\n\nRegion ids are the `regions[].id` of the job being edited. Returns a new\njob; overrides are cumulative (and survive text edits) like text edits.","operationId":"edit_regions_endpoint_v1_digitize__job_id__regions_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RegionEdit"},"title":"Edits"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/preview":{"get":{"summary":"Download Preview","operationId":"download_preview_v1_digitize__job_id__preview_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/patch":{"get":{"summary":"Patch Outline Json","description":"The design as an embroidered patch: cut outline (in the simulation's 0.1 mm frame, so it\noverlays `simulation.ops`), edge type and width, size, twill and border colours. Free, like the\npreview; the sewn files never change (the patch edge is sewn by the patch maker).","operationId":"patch_outline_json_v1_digitize__job_id__patch_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"shape","in":"query","required":false,"schema":{"type":"string","description":"auto | oval | circle | rect | shield | diecut","default":"auto","title":"Shape"},"description":"auto | oval | circle | rect | shield | diecut"},{"name":"twill","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"twill (patch base) colour, hex RGB; default: picked to stand out from the threads","title":"Twill"},"description":"twill (patch base) colour, hex RGB; default: picked to stand out from the threads"},{"name":"border","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"merrow / edge thread colour, hex RGB; default: the most-sewn thread that shows on the twill","title":"Border"},"description":"merrow / edge thread colour, hex RGB; default: the most-sewn thread that shows on the twill"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/patch.png":{"get":{"summary":"Patch Png","description":"The finished patch as a transparent PNG (10 px/mm): twill, merrowed or satin edge, the\nstitches and a soft drop shadow -- ready to drop onto a product photo. Free, like the preview.","operationId":"patch_png_v1_digitize__job_id__patch_png_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"shape","in":"query","required":false,"schema":{"type":"string","description":"auto | oval | circle | rect | shield | diecut","default":"auto","title":"Shape"},"description":"auto | oval | circle | rect | shield | diecut"},{"name":"twill","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"twill colour, hex RGB (default: auto)","title":"Twill"},"description":"twill colour, hex RGB (default: auto)"},{"name":"border","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"edge thread colour, hex RGB (default: auto)","title":"Border"},"description":"edge thread colour, hex RGB (default: auto)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/hoop/info":{"get":{"summary":"Hoop Split Info","description":"How many hoopings a design would need for a given hoop -- cheap (no file export), for the page's offer button.\n\nAlso returns the cut-line geometry (design_frame_geometry): cut\npositions, the design bbox and each part's center, all mapped back onto\nthe ORIGINAL (never rotated) design frame -- the same frame the page's\npreview canvas draws in -- so the page can overlay the cut lines even\nwhen the split itself turned the design 90deg to fit the hoop.","operationId":"hoop_split_info_v1_digitize__job_id__hoop_info_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"hoop","in":"query","required":true,"schema":{"type":"string","description":"WxH in mm, e.g. 200x300","title":"Hoop"},"description":"WxH in mm, e.g. 200x300"},{"name":"margin","in":"query","required":false,"schema":{"type":"number","minimum":0,"default":10.0,"title":"Margin"}},{"name":"overlap","in":"query","required":false,"schema":{"type":"number","minimum":0,"default":6.0,"title":"Overlap"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/hoop":{"get":{"summary":"Download Hoop Split","description":"A design too big for one hooping, split into N -- a zip of each part's\nfiles (every EXPORT_FORMATS format) plus a README production note.\nDefault digitize/download behaviour is unchanged; this is opt-in only.","operationId":"download_hoop_split_v1_digitize__job_id__hoop_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"hoop","in":"query","required":true,"schema":{"type":"string","description":"WxH in mm, e.g. 200x300","title":"Hoop"},"description":"WxH in mm, e.g. 200x300"},{"name":"margin","in":"query","required":false,"schema":{"type":"number","minimum":0,"default":10.0,"title":"Margin"}},{"name":"overlap","in":"query","required":false,"schema":{"type":"number","minimum":0,"default":6.0,"title":"Overlap"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/sequence":{"get":{"summary":"Sequence View","description":"Colour stops in sewing order: the needle plan, and warnings when the order lays one colour over another\nor the plan doesn't fit the machine. Computed from the stored stitches (stitch.sequence), not a new digitize.","operationId":"sequence_view_v1_digitize__job_id__sequence_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"Colour-stop sewing order: comma-separated original indices, a permutation","default":"","title":"Order"},"description":"Colour-stop sewing order: comma-separated original indices, a permutation"},{"name":"needles","in":"query","required":false,"schema":{"type":"string","description":"Needle (1-99) for each colour stop in that order","default":"","title":"Needles"},"description":"Needle (1-99) for each colour stop in that order"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: merge neighbouring stops of the same thread into one colour change","default":"","title":"Merge"},"description":"1: merge neighbouring stops of the same thread into one colour change"},{"name":"machine","in":"query","required":false,"schema":{"type":"string","description":"Machine profile id for the needle-count warning, e.g. kingstar","default":"","title":"Machine"},"description":"Machine profile id for the needle-count warning, e.g. kingstar"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/threadchart":{"post":{"summary":"Thread Chart Endpoint","description":"The shop's own thread chart for this job's downloads (?brand=custom on dst.zip / exp.zip): kept with the job,\nnot its recipe, so it never changes a stitch; at most THREAD_CHART_POST_MAX_ROWS rows.","operationId":"thread_chart_endpoint_v1_digitize__job_id__threadchart_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadChartPost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/exp.zip":{"get":{"summary":"Download Exp Inf","description":"MED-8: NAME.exp + NAME.inf (its thread colours, stitch.export.write_inf) in one zip, one base name --\nBernina machines and Melco heads read the colours from the INF next to the EXP (EXP holds none).\n?order=&needles=&merge= rewrite it from the same pattern in that sewing order (stitch.sequence).","operationId":"download_exp_inf_v1_digitize__job_id__exp_zip_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"rotate","in":"query","required":false,"schema":{"type":"integer","description":"Turn the file clockwise: 0, 90, 180 or 270 degrees","default":0,"title":"Rotate"},"description":"Turn the file clockwise: 0, 90, 180 or 270 degrees"},{"name":"mirror","in":"query","required":false,"schema":{"type":"string","description":"\"h\" mirrors left-right, \"v\" top-bottom (before the turn)","default":"","title":"Mirror"},"description":"\"h\" mirrors left-right, \"v\" top-bottom (before the turn)"},{"name":"baste","in":"query","required":false,"schema":{"type":"string","description":"1: sew a basting frame first (tacks fabric to stabiliser; pull out after); contour: follow the design's outline","default":"","title":"Baste"},"description":"1: sew a basting frame first (tacks fabric to stabiliser; pull out after); contour: follow the design's outline"},{"name":"baste_margin","in":"query","required":false,"schema":{"type":"string","description":"Frame distance from the design in mm (default BASTE_MARGIN_MM)","default":"","title":"Baste Margin"},"description":"Frame distance from the design in mm (default BASTE_MARGIN_MM)"},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"Colour-stop sewing order: comma-separated original indices, a permutation","default":"","title":"Order"},"description":"Colour-stop sewing order: comma-separated original indices, a permutation"},{"name":"needles","in":"query","required":false,"schema":{"type":"string","description":"Needle (1-99) for each colour stop in that order","default":"","title":"Needles"},"description":"Needle (1-99) for each colour stop in that order"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: merge neighbouring stops of the same thread into one colour change","default":"","title":"Merge"},"description":"1: merge neighbouring stops of the same thread into one colour change"},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name the DST colour sheet / EXP INF threads from this line: a web/threadbrands.json id, or \"custom\" for the chart sent to POST .../threadchart (or the digitize thread_chart). Default: the job's thread_brand, else the files as written.","title":"Brand"},"description":"Name the DST colour sheet / EXP INF threads from this line: a web/threadbrands.json id, or \"custom\" for the chart sent to POST .../threadchart (or the digitize thread_chart). Default: the job's thread_brand, else the files as written."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/dst.zip":{"get":{"summary":"Download Dst Colours","description":"NAME.dst + NAME.txt (its colour sequence, stitch.export.dst_colour_sheet) in one zip: a DST holds no thread\ncolours, so Tajima / Ricoma / Kingstar operators set the needles from the sheet (what Wilcom/Pulse print).\nTakes the same variant query as every machine file (review 3.1: the Studio showed a turned / basted design\nbut this zip was the plain one): DST and sheet are then written together from _job_pattern.\n?order=&needles=&merge= rewrite both from that sewing order.","operationId":"download_dst_colours_v1_digitize__job_id__dst_zip_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"rotate","in":"query","required":false,"schema":{"type":"integer","description":"Turn the file clockwise: 0, 90, 180 or 270 degrees","default":0,"title":"Rotate"},"description":"Turn the file clockwise: 0, 90, 180 or 270 degrees"},{"name":"mirror","in":"query","required":false,"schema":{"type":"string","description":"\"h\" mirrors left-right, \"v\" top-bottom (before the turn)","default":"","title":"Mirror"},"description":"\"h\" mirrors left-right, \"v\" top-bottom (before the turn)"},{"name":"baste","in":"query","required":false,"schema":{"type":"string","description":"1: sew a basting frame first (tacks fabric to stabiliser; pull out after); contour: follow the design's outline","default":"","title":"Baste"},"description":"1: sew a basting frame first (tacks fabric to stabiliser; pull out after); contour: follow the design's outline"},{"name":"baste_margin","in":"query","required":false,"schema":{"type":"string","description":"Frame distance from the design in mm (default BASTE_MARGIN_MM)","default":"","title":"Baste Margin"},"description":"Frame distance from the design in mm (default BASTE_MARGIN_MM)"},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"Colour-stop sewing order: comma-separated original indices, a permutation","default":"","title":"Order"},"description":"Colour-stop sewing order: comma-separated original indices, a permutation"},{"name":"needles","in":"query","required":false,"schema":{"type":"string","description":"Needle (1-99) for each colour stop in that order","default":"","title":"Needles"},"description":"Needle (1-99) for each colour stop in that order"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: merge neighbouring stops of the same thread into one colour change","default":"","title":"Merge"},"description":"1: merge neighbouring stops of the same thread into one colour change"},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name the DST colour sheet / EXP INF threads from this line: a web/threadbrands.json id, or \"custom\" for the chart sent to POST .../threadchart (or the digitize thread_chart). Default: the job's thread_brand, else the files as written.","title":"Brand"},"description":"Name the DST colour sheet / EXP INF threads from this line: a web/threadbrands.json id, or \"custom\" for the chart sent to POST .../threadchart (or the digitize thread_chart). Default: the job's thread_brand, else the files as written."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/worksheet.json":{"get":{"summary":"Production Worksheet","description":"Industrial production worksheet (DST heads): needle per colour stop, counts the head reads, run time at spm.","operationId":"production_worksheet_v1_digitize__job_id__worksheet_json_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"spm","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spm"}},{"name":"needles","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Needles"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"The Studio's colour-stop order (as ?order= on the machine files): the sheet then reads the DST written in that order","default":"","title":"Order"},"description":"The Studio's colour-stop order (as ?order= on the machine files): the sheet then reads the DST written in that order"},{"name":"stop_needles","in":"query","required":false,"schema":{"type":"string","description":"The needle per stop the shop set (?needles= on the machine files; named stop_needles here because needles is the head's needle count)","default":"","title":"Stop Needles"},"description":"The needle per stop the shop set (?needles= on the machine files; named stop_needles here because needles is the head's needle count)"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: neighbouring stops of one thread merged, as ?merge= on the machine files","default":"","title":"Merge"},"description":"1: neighbouring stops of one thread merged, as ?merge= on the machine files"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/worksheet.png":{"get":{"summary":"Production Worksheet Png","operationId":"production_worksheet_png_v1_digitize__job_id__worksheet_png_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"spm","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spm"}},{"name":"needles","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Needles"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"The Studio's colour-stop order (as ?order= on the machine files): the sheet then reads the DST written in that order","default":"","title":"Order"},"description":"The Studio's colour-stop order (as ?order= on the machine files): the sheet then reads the DST written in that order"},{"name":"stop_needles","in":"query","required":false,"schema":{"type":"string","description":"The needle per stop the shop set (?needles= on the machine files; named stop_needles here because needles is the head's needle count)","default":"","title":"Stop Needles"},"description":"The needle per stop the shop set (?needles= on the machine files; named stop_needles here because needles is the head's needle count)"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: neighbouring stops of one thread merged, as ?merge= on the machine files","default":"","title":"Merge"},"description":"1: neighbouring stops of one thread merged, as ?merge= on the machine files"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/worksheet.pdf":{"get":{"summary":"Production Worksheet Pdf","description":"The worksheet as an A4 PDF (TR/EN): thumbnail + colour stops, needle table, counts, run time at spm, size,\nthe machine's smallest hoop/frame that holds it, start point, frame travel and end offset.","operationId":"production_worksheet_pdf_v1_digitize__job_id__worksheet_pdf_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"spm","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spm"}},{"name":"needles","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Needles"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"machine","in":"query","required":false,"schema":{"type":"string","default":"kingstar","title":"Machine"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"The Studio's colour-stop order (as ?order= on the machine files): the sheet then reads the DST written in that order","default":"","title":"Order"},"description":"The Studio's colour-stop order (as ?order= on the machine files): the sheet then reads the DST written in that order"},{"name":"stop_needles","in":"query","required":false,"schema":{"type":"string","description":"The needle per stop the shop set (?needles= on the machine files; named stop_needles here because needles is the head's needle count)","default":"","title":"Stop Needles"},"description":"The needle per stop the shop set (?needles= on the machine files; named stop_needles here because needles is the head's needle count)"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: neighbouring stops of one thread merged, as ?merge= on the machine files","default":"","title":"Merge"},"description":"1: neighbouring stops of one thread merged, as ?merge= on the machine files"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/digitize/{job_id}/{fmt}":{"get":{"summary":"Download Format","operationId":"download_format_v1_digitize__job_id___fmt__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"fmt","in":"path","required":true,"schema":{"type":"string","title":"Fmt"}},{"name":"rotate","in":"query","required":false,"schema":{"type":"integer","description":"Turn the file clockwise: 0, 90, 180 or 270 degrees","default":0,"title":"Rotate"},"description":"Turn the file clockwise: 0, 90, 180 or 270 degrees"},{"name":"mirror","in":"query","required":false,"schema":{"type":"string","description":"\"h\" mirrors left-right, \"v\" top-bottom (before the turn)","default":"","title":"Mirror"},"description":"\"h\" mirrors left-right, \"v\" top-bottom (before the turn)"},{"name":"baste","in":"query","required":false,"schema":{"type":"string","description":"1: sew a basting frame first (tacks fabric to stabiliser; pull out after); contour: follow the design's outline","default":"","title":"Baste"},"description":"1: sew a basting frame first (tacks fabric to stabiliser; pull out after); contour: follow the design's outline"},{"name":"baste_margin","in":"query","required":false,"schema":{"type":"string","description":"Frame distance from the design in mm (default BASTE_MARGIN_MM)","default":"","title":"Baste Margin"},"description":"Frame distance from the design in mm (default BASTE_MARGIN_MM)"},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"Colour-stop sewing order: comma-separated original indices, a permutation","default":"","title":"Order"},"description":"Colour-stop sewing order: comma-separated original indices, a permutation"},{"name":"needles","in":"query","required":false,"schema":{"type":"string","description":"Needle (1-99) for each colour stop in that order","default":"","title":"Needles"},"description":"Needle (1-99) for each colour stop in that order"},{"name":"merge","in":"query","required":false,"schema":{"type":"string","description":"1: merge neighbouring stops of the same thread into one colour change","default":"","title":"Merge"},"description":"1: merge neighbouring stops of the same thread into one colour change"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnswerIn":{"properties":{"status":{"type":"string","title":"Status"},"note":{"type":"string","title":"Note","default":""},"rev":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rev"}},"type":"object","required":["status"],"title":"AnswerIn"},"Body_digitize_endpoint_v1_digitize_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe","description":"A result body's `recipe_token`, sent as a form field with the same file that result was made from: sews that design again, edits included, as a new job (for a job that has expired). Every other option is then ignored, the answer is a 200 as for an edit, and a token that is not ours, is older than 12 hours or was issued for another file is a 422 invalid_recipe."}},"type":"object","required":["file"],"title":"Body_digitize_endpoint_v1_digitize_post"},"Body_sewout_feedback_v1_sewout_feedback_post":{"properties":{"verdict":{"type":"string","title":"Verdict","default":""}},"type":"object","title":"Body_sewout_feedback_v1_sewout_feedback_post"},"Body_sewout_report_v1_sewout_report_post":{"properties":{"photo":{"type":"string","contentMediaType":"application/octet-stream","title":"Photo"},"note":{"type":"string","title":"Note","default":""},"email":{"type":"string","title":"Email","default":""},"job":{"type":"string","title":"Job","default":""},"machine":{"type":"string","title":"Machine","default":""},"design":{"type":"string","title":"Design","default":""}},"type":"object","required":["photo"],"title":"Body_sewout_report_v1_sewout_report_post"},"Body_submit_job_endpoint_v1_jobs_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_submit_job_endpoint_v1_jobs_post"},"Body_view_endpoint_v1_view_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_view_endpoint_v1_view_post"},"CheckoutIn":{"properties":{"item":{"type":"string","title":"Item"}},"type":"object","required":["item"],"title":"CheckoutIn"},"GarmentEdit":{"properties":{"garment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Garment"}},"type":"object","title":"GarmentEdit"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandoffIn":{"properties":{"fmt":{"type":"string","title":"Fmt"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"baste":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baste"},"baste_margin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baste Margin"}},"type":"object","required":["fmt"],"title":"HandoffIn"},"ItemIn":{"properties":{"id":{"type":"string","title":"Id"},"k":{"type":"string","title":"K"},"label":{"type":"string","title":"Label","default":""}},"type":"object","required":["id","k"],"title":"ItemIn"},"LibraryIn":{"properties":{"job_id":{"type":"string","title":"Job Id"},"keep":{"type":"boolean","title":"Keep","default":false}},"type":"object","required":["job_id"],"title":"LibraryIn"},"LoginIn":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"LoginIn"},"LookbookIn":{"properties":{"title":{"type":"string","title":"Title","default":""},"items":{"items":{"$ref":"#/components/schemas/ItemIn"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"LookbookIn"},"MergeEdit":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"into":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Into"}},"type":"object","required":["ids"],"title":"MergeEdit"},"PinIn":{"properties":{"u":{"type":"number","title":"U"},"v":{"type":"number","title":"V"},"note":{"type":"string","title":"Note"}},"type":"object","required":["u","v","note"],"title":"PinIn"},"QuoteIn":{"properties":{"rate":{"type":"number","title":"Rate","default":0},"min":{"type":"number","title":"Min","default":0},"flat":{"type":"number","title":"Flat","default":0},"cur":{"type":"string","title":"Cur","default":"$"},"stitches":{"type":"integer","title":"Stitches","default":0}},"type":"object","title":"QuoteIn","description":"The owner's quote calculator (index.html calcQuote): total = max(min, flat + stitches/1000 * rate)."},"RegionEdit":{"properties":{"id":{"type":"integer","title":"Id"},"reset":{"type":"boolean","title":"Reset","default":false},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"stitch_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stitch Type"},"angle":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Angle"},"density":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Density"},"underlay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Underlay"},"remove":{"type":"boolean","title":"Remove","default":false},"restore":{"type":"boolean","title":"Restore","default":false}},"type":"object","required":["id"],"title":"RegionEdit"},"ReshapeEdit":{"properties":{"id":{"type":"integer","title":"Id"},"polygon":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Polygon"}},"type":"object","required":["id","polygon"],"title":"ReshapeEdit"},"ReviseIn":{"properties":{"garment":{"type":"string","title":"Garment","default":"flat"},"fabric":{"type":"string","title":"Fabric","default":"#f4f2ec"},"quote":{"anyOf":[{"$ref":"#/components/schemas/QuoteIn"},{"type":"null"}]},"patch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patch"},"twill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twill"},"material":{"type":"string","title":"Material","default":"twill"},"job_id":{"type":"string","title":"Job Id"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["job_id"],"title":"ReviseIn"},"ShareIn":{"properties":{"garment":{"type":"string","title":"Garment","default":"flat"},"fabric":{"type":"string","title":"Fabric","default":"#f4f2ec"},"quote":{"anyOf":[{"$ref":"#/components/schemas/QuoteIn"},{"type":"null"}]},"patch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patch"},"twill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twill"},"material":{"type":"string","title":"Material","default":"twill"}},"type":"object","title":"ShareIn"},"SplitEdit":{"properties":{"id":{"type":"integer","title":"Id"},"line":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Line"},"dry":{"type":"boolean","title":"Dry","default":false}},"type":"object","required":["id","line"],"title":"SplitEdit"},"TextAdd":{"properties":{"text":{"type":"string","title":"Text"},"at":{"items":{"type":"number"},"type":"array","title":"At"},"height_mm":{"type":"number","title":"Height Mm"},"font":{"type":"string","title":"Font","default":"block"},"color":{"type":"string","title":"Color","default":"#000000"},"angle":{"type":"number","title":"Angle","default":0.0},"align":{"type":"string","title":"Align","default":"center"},"arc":{"type":"number","title":"Arc","default":0.0},"outline":{"type":"string","title":"Outline","default":""},"machine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine"}},"type":"object","required":["text","at","height_mm"],"title":"TextAdd"},"TextEdit":{"properties":{"id":{"type":"string","title":"Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"enabled":{"type":"boolean","title":"Enabled","default":true},"drop":{"type":"boolean","title":"Drop","default":false}},"type":"object","required":["id"],"title":"TextEdit"},"ThreadChartPost":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"rows":{"anyOf":[{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Rows"},"csv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Csv"}},"type":"object","title":"ThreadChartPost"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}