{"openapi":"3.1.0","info":{"title":"Artwork readiness API","version":"1"},"paths":{"/api/v1/artwork-checks/quote":{"post":{"tags":["Artwork readiness"],"summary":"Quote","operationId":"quote_api_v1_artwork_checks_quote_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationQuote"}}},"headers":{"X-Request-ID":{"description":"Server-generated support correlation ID.","schema":{"type":"string","format":"uuid"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before another submission attempt. Preserve the original Idempotency-Key.","schema":{"type":"string"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ArtworkKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file","width","height","unit"],"properties":{"file":{"type":"string","format":"binary","description":"PNG, JPEG or PDF; actual file bytes <=25 MiB. PDF <=20 pages. Raster source <=40 million pixels; PDF previews use a 40 million placed-source-pixel budget and bounded rendering."},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","enum":["in","mm"]},"garment_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}}}}}}}},"/api/v1/artwork-checks":{"get":{"tags":["Artwork readiness"],"summary":"History","operationId":"history_api_v1_artwork_checks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckHistory"}}},"headers":{"X-Request-ID":{"description":"Server-generated support correlation ID.","schema":{"type":"string","format":"uuid"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before another submission attempt. Preserve the original Idempotency-Key.","schema":{"type":"string"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ArtworkKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["queued","running","completed","failed"]}},{"name":"key_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["Artwork readiness"],"summary":"Create","operationId":"create_api_v1_artwork_checks_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedCheck"}}},"headers":{"X-Request-ID":{"description":"Server-generated support correlation ID.","schema":{"type":"string","format":"uuid"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before another submission attempt. Preserve the original Idempotency-Key.","schema":{"type":"string"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ArtworkKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Artwork-Input-Hash","in":"header","required":false,"description":"Quote input_hash; send together with expected credits. Admission revalidates identical bytes/options.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"X-Artwork-Expected-Credits","in":"header","required":false,"description":"Confirmed quote credits; paired with input hash. Mismatch returns 409 quote_changed before reservation.","schema":{"type":"integer","minimum":1,"maximum":20}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file","width","height","unit"],"properties":{"file":{"type":"string","format":"binary","description":"PNG, JPEG or PDF; actual file bytes <=25 MiB. PDF <=20 pages. Raster source <=40 million pixels; PDF previews use a 40 million placed-source-pixel budget and bounded rendering."},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","enum":["in","mm"]},"garment_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}}}},"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["quote_id"],"properties":{"quote_id":{"type":"string","format":"uuid"}}}}},"description":"Either the multipart file and print size, or JSON {\"quote_id\": ...} from a /quote response to reuse that validated upload (valid 30 minutes, once)."}}},"/api/v1/artwork-checks/{job_id}":{"get":{"tags":["Artwork readiness"],"summary":"Get","operationId":"get_api_v1_artwork_checks__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDetail"}}},"headers":{"X-Request-ID":{"description":"Server-generated support correlation ID.","schema":{"type":"string","format":"uuid"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Payment Required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Method Not Allowed"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests","headers":{"Retry-After":{"description":"Seconds to wait before another submission attempt. Preserve the original Idempotency-Key.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"ArtworkKey":[]}]}},"/api/v1/artwork-checks/{job_id}/preview":{"get":{"tags":["Artwork readiness"],"summary":"Get Preview","operationId":"get_preview_api_v1_artwork_checks__job_id__preview_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"image/png":{}},"headers":{"X-Request-ID":{"description":"Server-generated support correlation ID.","schema":{"type":"string","format":"uuid"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Payment Required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Method Not Allowed"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests","headers":{"Retry-After":{"description":"Seconds to wait before another submission attempt. Preserve the original Idempotency-Key.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"ArtworkKey":[]}]}}},"components":{"schemas":{"AcceptedCheck":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"processing_status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Processing Status"},"reserved_credits":{"type":"integer","title":"Reserved Credits"},"report_url":{"type":"string","title":"Report Url"}},"type":"object","required":["id","processing_status","reserved_credits","report_url"],"title":"AcceptedCheck"},"CheckDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"processing_status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Processing Status"},"credits":{"type":"integer","title":"Credits"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Key Id"},"source":{"type":"string","enum":["api","web"],"title":"Source","default":"web"},"key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Label"},"key_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Suffix"},"requested_size":{"anyOf":[{"$ref":"#/components/schemas/PrintSpec"},{"type":"null"}]},"reservation_status":{"anyOf":[{"type":"string","enum":["reserved","settled","released"]},{"type":"null"}],"title":"Reservation Status"},"report_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Report Expires At"},"report_state":{"type":"string","enum":["unavailable","retained","expired"],"title":"Report State","default":"unavailable"},"readiness":{"anyOf":[{"type":"string","enum":["no_flags","issues_found","inconclusive"]},{"type":"null"}],"title":"Readiness"},"report":{"anyOf":[{"$ref":"#/components/schemas/ReportPayload"},{"type":"null"}]},"preview_urls":{"items":{"type":"string"},"type":"array","title":"Preview Urls"},"previews":{"items":{"$ref":"#/components/schemas/PreviewDescriptor"},"type":"array","title":"Previews"},"media_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Media Expires At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"additionalProperties":false,"type":"object","required":["id","processing_status","credits","created_at","report","preview_urls"],"title":"CheckDetail"},"CheckHistory":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/CheckSummary"},"type":"array","title":"Checks"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["checks","next_cursor"],"title":"CheckHistory"},"CheckSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"processing_status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Processing Status"},"credits":{"type":"integer","title":"Credits"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Key Id"},"source":{"type":"string","enum":["api","web"],"title":"Source","default":"web"},"key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Label"},"key_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Suffix"},"requested_size":{"anyOf":[{"$ref":"#/components/schemas/PrintSpec"},{"type":"null"}]},"reservation_status":{"anyOf":[{"type":"string","enum":["reserved","settled","released"]},{"type":"null"}],"title":"Reservation Status"},"report_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Report Expires At"},"report_state":{"type":"string","enum":["unavailable","retained","expired"],"title":"Report State","default":"unavailable"},"readiness":{"anyOf":[{"type":"string","enum":["no_flags","issues_found","inconclusive"]},{"type":"null"}],"title":"Readiness"}},"additionalProperties":false,"type":"object","required":["id","processing_status","credits","created_at"],"title":"CheckSummary"},"ErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorBody"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"},"request_id":{"type":"string","format":"uuid","title":"Request Id"}},"type":"object","required":["error","request_id"],"title":"ErrorResponse"},"PreviewDescriptor":{"properties":{"url":{"type":"string","title":"Url"},"page_number":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Page Number"},"background":{"anyOf":[{"type":"string","enum":["checkerboard","light","dark"]},{"type":"null"}],"title":"Background"},"ordinal":{"anyOf":[{"type":"integer","maximum":59.0,"minimum":0.0},{"type":"null"}],"title":"Ordinal"}},"type":"object","required":["url"],"title":"PreviewDescriptor"},"PrintSpec":{"properties":{"width":{"type":"number","exclusiveMinimum":0.0,"title":"Width"},"height":{"type":"number","exclusiveMinimum":0.0,"title":"Height"},"unit":{"type":"string","enum":["in","mm"],"title":"Unit"}},"additionalProperties":false,"type":"object","required":["width","height","unit"],"title":"PrintSpec"},"ReportPayload":{"properties":{"schema_version":{"type":"integer","title":"Schema Version"},"processing_status":{"type":"string","const":"completed","title":"Processing Status"},"readiness":{"type":"string","enum":["no_flags","issues_found","inconclusive"],"title":"Readiness"},"requested_size":{"additionalProperties":true,"type":"object","title":"Requested Size"},"rule_settings":{"additionalProperties":true,"type":"object","title":"Rule Settings"},"pages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pages"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Findings"},"customer_explanation":{"type":"string","title":"Customer Explanation"}},"type":"object","required":["schema_version","processing_status","readiness","requested_size","rule_settings","pages","findings","customer_explanation"],"title":"ReportPayload"},"ValidationQuote":{"properties":{"page_count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Page Count"},"credits":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Credits"},"input_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Input Hash"},"tariff_version":{"type":"integer","const":1,"title":"Tariff Version","default":1},"quote_id":{"type":"string","format":"uuid","title":"Quote Id"},"quote_expires_at":{"type":"string","format":"date-time","title":"Quote Expires At"}},"type":"object","required":["page_count","credits","input_hash","quote_id","quote_expires_at"],"title":"ValidationQuote"}},"securitySchemes":{"ArtworkKey":{"type":"http","scheme":"bearer","bearerFormat":"ip_art_ API key"}}}}