{"openapi":"3.1.0","info":{"title":"JukeLingo for Business API","version":"1.0.0","description":"Submit documents for translator-certified translation, track status, download deliverables, request corrections, and receive webhooks. Authenticate with `Authorization: Bearer jlb_live_…`; use a `jlb_test_…` key against the same base URL for the sandbox (orders are delivered with a SAMPLE file and never billed). Pricing is per your organization's account; quotes are returned in cents."},"servers":[{"url":"https://jukelingo.com/api/v1/business"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","enum":["order"]},"status":{"type":"string","enum":["received","awaiting_approval","in_progress","needs_input","delivered","correction_in_progress","cancelled","failed"]},"sandbox":{"type":"boolean"},"external_reference":{"type":["string","null"]},"source_language":{"type":"string"},"target_language":{"type":"string"},"skip_the_line":{"type":"boolean"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"pages":{"type":["integer","null"]},"quote":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]}}},"billing_owner":{"type":"string","enum":["partner","customer"]},"due_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Document":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"filename":{"type":["string","null"]},"pages":{"type":["integer","null"]},"status":{"type":"string","enum":["received","in_progress","delivered"]},"deliverables":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer"},"certification_id":{"type":"string"},"pdf":{"type":["string","null"],"format":"uri"},"docx":{"type":["string","null"],"format":"uri"},"created_at":{"type":"string","format":"date-time"}}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}},"paths":{"/me":{"get":{"summary":"The key's organization and permissions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}}}},"/uploads":{"post":{"summary":"Create a presigned upload for one document","description":"PUT the file bytes to `upload_url` (same `Content-Type`), then reference `upload_id` in a quote or order. Accepted: PDF, JPEG, PNG, WEBP, HEIC; up to 25 MB and 30 pages per document.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","content_type","size_bytes"],"properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"}}}}}},"responses":{"200":{"description":"upload_url + upload_id","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"upload_url":{"type":"string","format":"uri"},"expires_in":{"type":"integer"}}}}}}}}},"/quotes":{"post":{"summary":"Quote uploaded documents (no order created)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documents"],"properties":{"documents":{"type":"array","items":{"type":"object","required":["upload_id"],"properties":{"upload_id":{"type":"string"},"content_type":{"type":"string"},"filename":{"type":"string"}}}},"skip_the_line":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Pages and amount in cents"}}}},"/orders":{"post":{"summary":"Create an order","description":"One order per call, up to 10 documents. `end_customer` (name, email, phone) is required so the translator can ask questions and the customer can track delivery; it is stored encrypted and never logged. `billing_owner` defaults to `partner` (your organization is billed); `customer` is not available yet.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Required on every write. Same key + same body replays the original response; same key + different body → 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documents","source_language","end_customer"],"properties":{"documents":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"object","required":["upload_id","content_type"],"properties":{"upload_id":{"type":"string"},"content_type":{"type":"string"},"filename":{"type":"string"}}}},"source_language":{"type":"string","example":"es"},"target_language":{"type":"string","default":"en"},"skip_the_line":{"type":"boolean","default":false},"external_reference":{"type":"string","maxLength":120},"instructions":{"type":"string","maxLength":4000},"key_facts":{"type":"array","maxItems":40,"items":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string"},"value":{"type":"string"}}},"description":"Names and dates the translator must double-check (not fed to AI)."},"end_customer":{"type":"object","required":["name","email","phone"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"sms_consent":{"type":"boolean","description":"Only true if the customer agreed to receive texts (TCPA)."},"notify":{"type":"boolean","default":true,"description":"false = you handle all customer communication; JukeLingo sends no tracking emails/SMS."}}},"workspace_id":{"type":"string","format":"uuid","description":"Store / office; defaults to your organization's default workspace."},"billing_owner":{"type":"string","enum":["partner","customer"],"default":"partner"}}}}}},"responses":{"201":{"description":"Order","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","enum":["order"]},"status":{"type":"string","enum":["received","awaiting_approval","in_progress","needs_input","delivered","correction_in_progress","cancelled","failed"]},"sandbox":{"type":"boolean"},"external_reference":{"type":["string","null"]},"source_language":{"type":"string"},"target_language":{"type":"string"},"skip_the_line":{"type":"boolean"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"pages":{"type":["integer","null"]},"quote":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]}}},"billing_owner":{"type":"string","enum":["partner","customer"]},"due_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Validation","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"409":{"description":"Idempotency conflict"}}},"get":{"summary":"List orders (newest first)","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"},"description":"A public status value; filters server-side."},{"name":"external_reference","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","enum":["order"]},"status":{"type":"string","enum":["received","awaiting_approval","in_progress","needs_input","delivered","correction_in_progress","cancelled","failed"]},"sandbox":{"type":"boolean"},"external_reference":{"type":["string","null"]},"source_language":{"type":"string"},"target_language":{"type":"string"},"skip_the_line":{"type":"boolean"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"pages":{"type":["integer","null"]},"quote":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]}}},"billing_owner":{"type":"string","enum":["partner","customer"]},"due_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}},"next_cursor":{"type":["string","null"]}}}}}}}}},"/orders/{id}":{"get":{"summary":"Fetch an order","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","enum":["order"]},"status":{"type":"string","enum":["received","awaiting_approval","in_progress","needs_input","delivered","correction_in_progress","cancelled","failed"]},"sandbox":{"type":"boolean"},"external_reference":{"type":["string","null"]},"source_language":{"type":"string"},"target_language":{"type":"string"},"skip_the_line":{"type":"boolean"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"pages":{"type":["integer","null"]},"quote":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]}}},"billing_owner":{"type":"string","enum":["partner","customer"]},"due_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Not found"}}}},"/orders/{id}/documents/{document_id}/download":{"get":{"summary":"Download a deliverable (PDF or DOCX)","description":"Streams the file (`Content-Disposition: attachment`). Every download is audited.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Bytes"}}}},"/orders/{id}/edit-requests":{"post":{"summary":"Request a correction","description":"Within 60 days of delivery. A genuine translator error is corrected free (same translator first); firm-side changes need a new order.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Required on every write. Same key + same body replays the original response; same key + different body → 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["document_id","category","description"],"properties":{"document_id":{"type":"string"},"category":{"type":"string","enum":["name_spelling","date","missing_content","wrong_document_type","formatting","other"]},"description":{"type":"string","minLength":5,"maxLength":2000}}}}}},"responses":{"201":{"description":"Created"}}}},"/webhooks":{"get":{"summary":"List webhook endpoints","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Endpoints"}}},"post":{"summary":"Create a webhook endpoint","description":"The signing secret is returned ONCE. Verify `JL-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<body>\">` with it; reject timestamps older than 5 minutes. Events: order.status_changed, order.delivered, edit_request.resolved.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Required on every write. Same key + same body replays the original response; same key + different body → 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}}}}}},"responses":{"201":{"description":"Endpoint + secret"}}}},"/webhooks/{id}":{"delete":{"summary":"Delete a webhook endpoint","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/webhooks/{id}/test":{"post":{"summary":"Send a ping event to this endpoint only","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Queued"}}}}},"x-webhook-events":{"order.status_changed":{"order_id":"uuid","external_reference":"string|null","status":"public status","previous_status":"public status"},"order.delivered":{"order_id":"uuid","document_id":"uuid","version":0,"certification_id":"CT-…","pdf":"download url","docx":"download url|null"},"edit_request.resolved":{"order_id":"uuid","document_id":"uuid","edit_request_id":"uuid","resolution":"corrected|no_change_needed|new_order_required","version":"integer|null"}}}