{"openapi":"3.0.3","info":{"title":"The Genome API","version":"1.0.0","description":"AI-native genomic infrastructure for sequencing, hosted genomes, interpretations, and bounded biological context generation."},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{}},"paths":{"/v2/genome_connections":{"get":{"summary":"List genome connections.","tags":["Genome connections"],"description":"Returns this organization's connections for the API key environment, newest first. User identity is never returned.","parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Maximum number of connections to return."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"Opaque cursor returned by the previous page."},{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"query","name":"client_user_reference","required":false,"description":"Exact opaque client user reference to match."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_user_reference":{"type":"string"},"status":{"type":"string","enum":["awaiting_customer","connected","expired"]},"access_status":{"nullable":true,"type":"string","enum":["pending_genome","active","revoked"]},"journey":{"nullable":true,"type":"string","enum":["existing_genome","new_order"]},"client_genome_id":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"connected_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"permissions":{"type":"array","items":{"type":"object","properties":{"permission":{"type":"string","enum":["genome_bundle_downloads","genome_connection","insight_panels"]},"status":{"type":"string","enum":["pending","granted","declined","expired","revoked"]}},"required":["permission","status"]},"description":"The typed permissions in the latest customer decision. Missing permissions are not granted."}},"required":["genome_connection_id","client_user_reference","status","access_status","journey","client_genome_id","created_at","connected_at","permissions"]}},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","next_cursor"]}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"genome_connections:read"},"post":{"summary":"Create a hosted genome connection.","tags":["Genome connections"],"description":"Creates a short-lived Genome Computer URL from the client's authenticated backend.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_user_reference":{"type":"string","minLength":1,"maxLength":255,"description":"Your opaque reference for the signed-in user. Do not send an email address, name, or other direct identifier."},"return_url":{"type":"string","maxLength":2048,"format":"uri","description":"An HTTPS URL whose origin has been approved for your organization."}},"required":["client_user_reference","return_url"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":8,"maxLength":255},"in":"header","name":"idempotency-key","required":true,"description":"A unique key for this create attempt. Reuse it only when retrying the same request."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_connection":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_user_reference":{"type":"string"},"status":{"type":"string","enum":["awaiting_customer","connected","expired"]},"access_status":{"nullable":true,"type":"string","enum":["pending_genome","active","revoked"]},"journey":{"nullable":true,"type":"string","enum":["existing_genome","new_order"]},"client_genome_id":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"connected_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"permissions":{"type":"array","items":{"type":"object","properties":{"permission":{"type":"string","enum":["genome_bundle_downloads","genome_connection","insight_panels"]},"status":{"type":"string","enum":["pending","granted","declined","expired","revoked"]}},"required":["permission","status"]},"description":"The typed permissions in the latest customer decision. Missing permissions are not granted."}},"required":["genome_connection_id","client_user_reference","status","access_status","journey","client_genome_id","created_at","connected_at","permissions"]},"customer_url":{"type":"string","format":"uri"},"customer_url_expires_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["genome_connection","customer_url","customer_url_expires_at"]}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"409":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"503":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"genome_connections:write"}},"/v2/genome_connections/{genome_connection_id}/permission_requests":{"post":{"summary":"Request customer permission again.","tags":["Genome connections"],"description":"Creates a fresh short-lived customer URL for the same durable connection after its previous permission request was declined or expired.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."},{"schema":{"type":"string","minLength":8,"maxLength":255},"in":"header","name":"idempotency-key","required":true,"description":"A unique key for this create attempt. Reuse it only when retrying the same request."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_connection":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_user_reference":{"type":"string"},"status":{"type":"string","enum":["awaiting_customer","connected","expired"]},"access_status":{"nullable":true,"type":"string","enum":["pending_genome","active","revoked"]},"journey":{"nullable":true,"type":"string","enum":["existing_genome","new_order"]},"client_genome_id":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"connected_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"permissions":{"type":"array","items":{"type":"object","properties":{"permission":{"type":"string","enum":["genome_bundle_downloads","genome_connection","insight_panels"]},"status":{"type":"string","enum":["pending","granted","declined","expired","revoked"]}},"required":["permission","status"]},"description":"The typed permissions in the latest customer decision. Missing permissions are not granted."}},"required":["genome_connection_id","client_user_reference","status","access_status","journey","client_genome_id","created_at","connected_at","permissions"]},"customer_url":{"type":"string","format":"uri"},"customer_url_expires_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["genome_connection","customer_url","customer_url_expires_at"]}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"409":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"503":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"genome_connections:write"}},"/v2/genome_connections/{genome_connection_id}":{"get":{"summary":"Get a genome connection.","tags":["Genome connections"],"description":"Returns the durable client-scoped connection and its current access state. User identity is never returned.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_user_reference":{"type":"string"},"status":{"type":"string","enum":["awaiting_customer","connected","expired"]},"access_status":{"nullable":true,"type":"string","enum":["pending_genome","active","revoked"]},"journey":{"nullable":true,"type":"string","enum":["existing_genome","new_order"]},"client_genome_id":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"connected_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"permissions":{"type":"array","items":{"type":"object","properties":{"permission":{"type":"string","enum":["genome_bundle_downloads","genome_connection","insight_panels"]},"status":{"type":"string","enum":["pending","granted","declined","expired","revoked"]}},"required":["permission","status"]},"description":"The typed permissions in the latest customer decision. Missing permissions are not granted."}},"required":["genome_connection_id","client_user_reference","status","access_status","journey","client_genome_id","created_at","connected_at","permissions"]}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"genome_connections:read"}},"/v2/genome_connections/{genome_connection_id}/progress":{"get":{"summary":"Get normalized genome progress.","tags":["Progress"],"description":"Returns the latest coarse progress stage for either a shared existing genome or a new Genome Computer order.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_genome_id":{"nullable":true,"type":"string"},"stage":{"type":"string","enum":["awaiting_customer","order_confirmed","outbound_to_customer","with_customer","inbound_to_lab","at_lab","processing","ready"]},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["genome_connection_id","client_genome_id","stage","updated_at"]}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"genome_connections:read"}},"/v2/genome_connections/{genome_connection_id}/bundle":{"get":{"summary":"Create a signed .genome bundle download link.","tags":["Genome connections"],"description":"Returns a short-lived signed link only when bundle downloads are enabled for the organization and the connection still has an active genome grant.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_genome_id":{"type":"string"},"bundle_version":{"nullable":true,"type":"string"},"download_url":{"type":"string","format":"uri"},"expires_in_seconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["genome_connection_id","client_genome_id","bundle_version","download_url","expires_in_seconds"]}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"genome_connections:read"}},"/v2/genome_connections/{genome_connection_id}/insight_panels":{"get":{"summary":"List insight panels for a connection.","tags":["Insight panels"],"description":"Returns the panels enabled for the organization and their current status.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_connection_id":{"type":"string"},"client_genome_id":{"nullable":true,"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"insight_panel_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["waiting_for_genome","subscription_required","processing","ready"]},"interpretation_version":{"nullable":true,"type":"string"},"generated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["insight_panel_id","title","status","interpretation_version","generated_at"]}}},"required":["genome_connection_id","client_genome_id","data"]}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"insight_panels:read"}},"/v2/genome_connections/{genome_connection_id}/insight_panels/{insight_panel_id}":{"get":{"summary":"Get an insight panel.","tags":["Insight panels"],"description":"Returns the current panel state and, when ready, its derived findings. Raw genome files and user identity are not returned.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."},{"schema":{"type":"string","minLength":1,"maxLength":100},"in":"path","name":"insight_panel_id","required":true,"description":"A stable insight panel identifier configured for the organization."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"insight_panel_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["waiting_for_genome","subscription_required","processing","ready"]},"interpretation_version":{"nullable":true,"type":"string"},"generated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"genome_connection_id":{"type":"string"},"client_genome_id":{"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"section_id":{"type":"string"},"title":{"type":"string"},"evidence_level":{"type":"string","enum":["high","moderate","emerging"]},"findings":{"type":"array","items":{"type":"object","properties":{"finding_id":{"type":"string"},"title":{"type":"string"},"gene":{"nullable":true,"type":"string"},"result_label":{"type":"string"},"meaning":{"type":"string"},"evidence_level":{"type":"string","enum":["high","moderate","emerging"]},"evidence":{"type":"object","properties":{"basis":{"type":"string"},"clinical_review":{"type":"string"}},"required":["basis","clinical_review"]}},"required":["finding_id","title","gene","result_label","meaning","evidence_level","evidence"]}}},"required":["section_id","title","evidence_level","findings"]}},"citations":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"}},"required":["source","url"]}},"limitations":{"type":"array","items":{"type":"string"}},"clinical_boundary":{"nullable":true,"type":"string"}},"required":["insight_panel_id","title","status","interpretation_version","generated_at","genome_connection_id","client_genome_id","summary","sections","citations","limitations","clinical_boundary"]}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"insight_panels:read"}},"/v2/test/genome_connections/{genome_connection_id}/insight_panels/{insight_panel_id}/generate":{"post":{"summary":"Request generation for a synthetic staging insight panel.","tags":["Staging"],"description":"Makes an explicitly synthetic staging panel eligible for the hosted generator. Production keys and non-synthetic genomes are rejected.","parameters":[{"schema":{"type":"string","pattern":"^gconn_[0-9a-z]{12,64}$"},"in":"path","name":"genome_connection_id","required":true,"description":"The durable genome connection identifier."},{"schema":{"type":"string","minLength":1,"maxLength":100},"in":"path","name":"insight_panel_id","required":true,"description":"A stable insight panel identifier configured for the organization."}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"insight_panel_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["waiting_for_genome","subscription_required","processing","ready"]},"interpretation_version":{"nullable":true,"type":"string"},"generated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"genome_connection_id":{"type":"string"},"client_genome_id":{"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"section_id":{"type":"string"},"title":{"type":"string"},"evidence_level":{"type":"string","enum":["high","moderate","emerging"]},"findings":{"type":"array","items":{"type":"object","properties":{"finding_id":{"type":"string"},"title":{"type":"string"},"gene":{"nullable":true,"type":"string"},"result_label":{"type":"string"},"meaning":{"type":"string"},"evidence_level":{"type":"string","enum":["high","moderate","emerging"]},"evidence":{"type":"object","properties":{"basis":{"type":"string"},"clinical_review":{"type":"string"}},"required":["basis","clinical_review"]}},"required":["finding_id","title","gene","result_label","meaning","evidence_level","evidence"]}}},"required":["section_id","title","evidence_level","findings"]}},"citations":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"}},"required":["source","url"]}},"limitations":{"type":"array","items":{"type":"string"}},"clinical_boundary":{"nullable":true,"type":"string"}},"required":["insight_panel_id","title","status","interpretation_version","generated_at","genome_connection_id","client_genome_id","summary","sections","citations","limitations","clinical_boundary"]}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"insight_panels:read"}},"/v1/orders":{"post":{"summary":"Create a sequencing or genotyping order.","tags":["Orders"],"description":"Creates a 3x/30x whole-genome sequencing or GSA genotyping order and returns activation details. Send an Idempotency-Key header (required in production) so retries are safe.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["wgs_3x","wgs_30x","gsa"],"description":"Sequencing/genotyping product type."},"client_name":{"description":"Label for the end customer shown on internal dashboards.","type":"string","maxLength":200},"user_reference":{"description":"Your own identifier for this order; echoed back on reads and webhooks.","type":"string","maxLength":500},"retention":{"default":"delete_after_30_days","description":"How long sequencing artifacts are retained.","type":"string","enum":["delete_after_30_days","hosted_runtime"]},"deliverables":{"description":"Which artifacts to deliver for the order.","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["genome_bundle","gvcf","fastq"]}},"customer":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"Required for sequencing orders.","type":"string","maxLength":80}}},"shipping_address":{"type":"object","properties":{"line1":{"type":"string","maxLength":500},"line2":{"type":"string","maxLength":500},"city":{"type":"string","maxLength":200},"state":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"postal_code":{"type":"string","maxLength":64},"postalCode":{"type":"string","maxLength":64},"country":{"type":"string","maxLength":2},"country_code":{"type":"string","maxLength":2},"countryCode":{"type":"string","maxLength":2}}},"shipping":{"description":"Free-form shipping metadata merged into the shipping payload.","type":"object","additionalProperties":{}}},"required":["type"]}}}},"parameters":[{"schema":{"type":"string","minLength":8,"maxLength":200},"in":"header","name":"idempotency-key","required":false,"description":"Idempotency key. Required in production; retries with the same key+body are deduplicated."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"client_name":{"nullable":true,"type":"string"},"user_reference":{"nullable":true,"type":"string"},"retention":{"type":"string","description":"One of: delete_after_30_days, hosted_runtime."},"deliverables":{"type":"array","items":{"type":"string"},"description":"Subset of: genome_bundle, gvcf, fastq."},"activation_code":{"nullable":true,"type":"string"},"activation_url":{"nullable":true,"type":"string"},"status":{"type":"string","description":"One of: created, payment_pending, paid, kit_preparing, kit_shipped, kit_delivered, sample_registered, sample_returned, sample_received, lab_processing, sequencing, bioinformatics_processing, genome_bundle_generating, completed, failed, cancelled."},"status_label":{"type":"string"},"price_cents":{"type":"number","description":"Sequencing list price before shipping."},"shipping_fee_cents":{"type":"number","description":"Shipping fee added for the destination country."},"total_cents":{"type":"number","description":"Total charged or invoiced for the order."},"currency":{"type":"string"},"estimated_completion_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"shipment":{"nullable":true,"description":"Current active shipment summary. Use /shipment for carrier scan history or /shipments for every fulfillment attempt.","type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"additionalProperties":false},"genome_id":{"nullable":true,"type":"string"},"storage_expires_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["order_id","type","type_label","client_name","user_reference","retention","deliverables","activation_code","activation_url","status","status_label","price_cents","shipping_fee_cents","total_cents","currency","estimated_completion_date","shipment","genome_id","storage_expires_at","created_at","updated_at"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"client_name":{"nullable":true,"type":"string"},"user_reference":{"nullable":true,"type":"string"},"retention":{"type":"string","description":"One of: delete_after_30_days, hosted_runtime."},"deliverables":{"type":"array","items":{"type":"string"},"description":"Subset of: genome_bundle, gvcf, fastq."},"activation_code":{"nullable":true,"type":"string"},"activation_url":{"nullable":true,"type":"string"},"status":{"type":"string","description":"One of: created, payment_pending, paid, kit_preparing, kit_shipped, kit_delivered, sample_registered, sample_returned, sample_received, lab_processing, sequencing, bioinformatics_processing, genome_bundle_generating, completed, failed, cancelled."},"status_label":{"type":"string"},"price_cents":{"type":"number","description":"Sequencing list price before shipping."},"shipping_fee_cents":{"type":"number","description":"Shipping fee added for the destination country."},"total_cents":{"type":"number","description":"Total charged or invoiced for the order."},"currency":{"type":"string"},"estimated_completion_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"shipment":{"nullable":true,"description":"Current active shipment summary. Use /shipment for carrier scan history or /shipments for every fulfillment attempt.","type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"additionalProperties":false},"genome_id":{"nullable":true,"type":"string"},"storage_expires_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["order_id","type","type_label","client_name","user_reference","retention","deliverables","activation_code","activation_url","status","status_label","price_cents","shipping_fee_cents","total_cents","currency","estimated_completion_date","shipment","genome_id","storage_expires_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:write"},"get":{"summary":"List recent orders.","tags":["Orders"],"parameters":[{"schema":{"type":"string","enum":["created","payment_pending","paid","kit_preparing","kit_shipped","kit_delivered","sample_registered","sample_returned","sample_received","lab_processing","sequencing","bioinformatics_processing","genome_bundle_generating","completed","failed","cancelled"]},"in":"query","name":"status","required":false,"description":"Filter by order status."},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Maximum orders to return."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"order_id":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"client_name":{"nullable":true,"type":"string"},"user_reference":{"nullable":true,"type":"string"},"retention":{"type":"string","description":"One of: delete_after_30_days, hosted_runtime."},"deliverables":{"type":"array","items":{"type":"string"},"description":"Subset of: genome_bundle, gvcf, fastq."},"activation_code":{"nullable":true,"type":"string"},"activation_url":{"nullable":true,"type":"string"},"status":{"type":"string","description":"One of: created, payment_pending, paid, kit_preparing, kit_shipped, kit_delivered, sample_registered, sample_returned, sample_received, lab_processing, sequencing, bioinformatics_processing, genome_bundle_generating, completed, failed, cancelled."},"status_label":{"type":"string"},"price_cents":{"type":"number","description":"Sequencing list price before shipping."},"shipping_fee_cents":{"type":"number","description":"Shipping fee added for the destination country."},"total_cents":{"type":"number","description":"Total charged or invoiced for the order."},"currency":{"type":"string"},"estimated_completion_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"shipment":{"nullable":true,"description":"Current active shipment summary. Use /shipment for carrier scan history or /shipments for every fulfillment attempt.","type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"additionalProperties":false},"genome_id":{"nullable":true,"type":"string"},"storage_expires_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["order_id","type","type_label","client_name","user_reference","retention","deliverables","activation_code","activation_url","status","status_label","price_cents","shipping_fee_cents","total_cents","currency","estimated_completion_date","shipment","genome_id","storage_expires_at","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"orders:read"}},"/v1/orders/{orderId}":{"get":{"summary":"Read order status and activation details.","tags":["Orders"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"client_name":{"nullable":true,"type":"string"},"user_reference":{"nullable":true,"type":"string"},"retention":{"type":"string","description":"One of: delete_after_30_days, hosted_runtime."},"deliverables":{"type":"array","items":{"type":"string"},"description":"Subset of: genome_bundle, gvcf, fastq."},"activation_code":{"nullable":true,"type":"string"},"activation_url":{"nullable":true,"type":"string"},"status":{"type":"string","description":"One of: created, payment_pending, paid, kit_preparing, kit_shipped, kit_delivered, sample_registered, sample_returned, sample_received, lab_processing, sequencing, bioinformatics_processing, genome_bundle_generating, completed, failed, cancelled."},"status_label":{"type":"string"},"price_cents":{"type":"number","description":"Sequencing list price before shipping."},"shipping_fee_cents":{"type":"number","description":"Shipping fee added for the destination country."},"total_cents":{"type":"number","description":"Total charged or invoiced for the order."},"currency":{"type":"string"},"estimated_completion_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"shipment":{"nullable":true,"description":"Current active shipment summary. Use /shipment for carrier scan history or /shipments for every fulfillment attempt.","type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"additionalProperties":false},"genome_id":{"nullable":true,"type":"string"},"storage_expires_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["order_id","type","type_label","client_name","user_reference","retention","deliverables","activation_code","activation_url","status","status_label","price_cents","shipping_fee_cents","total_cents","currency","estimated_completion_date","shipment","genome_id","storage_expires_at","created_at","updated_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:read"}},"/v1/orders/{orderId}/events":{"get":{"summary":"Read order lifecycle events.","tags":["Orders"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"nullable":true,"type":"string"},"payload":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["event_id","event_type","status","payload","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:read"}},"/v1/orders/{orderId}/shipment":{"get":{"summary":"Read shipment carrier and tracking data.","tags":["Orders"],"description":"Returns the active shipment from the current fulfillment attempt, including carrier scan history. Use /shipments to read every attempt and shipment.","parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"shipment":{"nullable":true,"type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"service":{"nullable":true,"type":"string"},"tracking_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"status_detail":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"occurred_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["status","status_detail","message","occurred_at"],"additionalProperties":false},"description":"Carrier scan events, newest first."}},"required":["tracking_history"],"additionalProperties":false}},"required":["order_id","shipment"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:read"}},"/v1/orders/{orderId}/shipments":{"get":{"summary":"Read every shipment and its carrier tracking history.","tags":["Orders"],"description":"Returns shipments grouped by fulfillment attempt. The current attempt can be empty while a replacement shipment is being prepared.","parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"fulfillment_attempts":{"type":"array","items":{"type":"object","properties":{"is_current":{"type":"boolean"},"shipments":{"type":"array","items":{"type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"service":{"nullable":true,"type":"string"},"tracking_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"status_detail":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"occurred_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["status","status_detail","message","occurred_at"],"additionalProperties":false},"description":"Carrier scan events, newest first."}},"required":["tracking_history"],"additionalProperties":false}}},"required":["is_current","shipments"],"additionalProperties":false},"description":"All known fulfillment attempts, current first. A replacement attempt can have no shipments until its fulfillment events arrive."}},"required":["order_id","fulfillment_attempts"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:read"}},"/v1/orders/{orderId}/files":{"get":{"summary":"Return signed links for completed deliverables.","tags":["Orders"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"genome_id":{"nullable":true,"type":"string"},"retention":{"type":"string"},"storage_expires_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"files":{"type":"array","items":{},"description":"Signed download links for completed deliverables."}},"required":["order_id","genome_id","retention","storage_expires_at","files"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:read"}},"/v1/test/orders/{orderId}/advance":{"post":{"summary":"Advance a sandbox order to a new status (staging keys only).","tags":["Staging"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Target order status to transition the sandbox order to."}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"client_name":{"nullable":true,"type":"string"},"user_reference":{"nullable":true,"type":"string"},"retention":{"type":"string","description":"One of: delete_after_30_days, hosted_runtime."},"deliverables":{"type":"array","items":{"type":"string"},"description":"Subset of: genome_bundle, gvcf, fastq."},"activation_code":{"nullable":true,"type":"string"},"activation_url":{"nullable":true,"type":"string"},"status":{"type":"string","description":"One of: created, payment_pending, paid, kit_preparing, kit_shipped, kit_delivered, sample_registered, sample_returned, sample_received, lab_processing, sequencing, bioinformatics_processing, genome_bundle_generating, completed, failed, cancelled."},"status_label":{"type":"string"},"price_cents":{"type":"number","description":"Sequencing list price before shipping."},"shipping_fee_cents":{"type":"number","description":"Shipping fee added for the destination country."},"total_cents":{"type":"number","description":"Total charged or invoiced for the order."},"currency":{"type":"string"},"estimated_completion_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"shipment":{"nullable":true,"description":"Current active shipment summary. Use /shipment for carrier scan history or /shipments for every fulfillment attempt.","type":"object","properties":{"carrier":{"nullable":true,"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"tracking_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string"},"shipped_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"delivered_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"estimated_delivery_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"created_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"additionalProperties":false},"genome_id":{"nullable":true,"type":"string"},"storage_expires_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["order_id","type","type_label","client_name","user_reference","retention","deliverables","activation_code","activation_url","status","status_label","price_cents","shipping_fee_cents","total_cents","currency","estimated_completion_date","shipment","genome_id","storage_expires_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:write"}},"/v1/orders/{orderId}/gvcf":{"post":{"summary":"Queue FASTQ to gVCF generation for a WGS order.","tags":["Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sample_id":{"type":"string","minLength":1,"maxLength":128},"reference_uri":{"type":"string","minLength":1,"maxLength":2000},"fastq_r1":{"type":"object","properties":{"bucket":{"type":"string","minLength":1,"maxLength":200},"path":{"type":"string","minLength":1,"maxLength":2000}},"required":["path"]},"fastq_r2":{"type":"object","properties":{"bucket":{"type":"string","minLength":1,"maxLength":200},"path":{"type":"string","minLength":1,"maxLength":2000}},"required":["path"]},"output_bucket":{"type":"string","minLength":1,"maxLength":200},"output_path":{"type":"string","minLength":1,"maxLength":2000}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"orderId","required":true,"description":"Public order id (ord_...)."}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"order_id":{"type":"string"},"status":{"type":"string"},"sample_id":{"type":"string"},"reference_uri":{"type":"string"},"batch_job_name":{"nullable":true,"type":"string"},"output_supabase_bucket":{"nullable":true,"type":"string"},"output_supabase_path":{"nullable":true,"type":"string"},"output_supabase_index_path":{"nullable":true,"type":"string"},"output_gcs_prefix":{"nullable":true,"type":"string"},"error_message":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"failed_at":{"nullable":true,"type":"string"}},"required":["job_id","order_id","status","sample_id","reference_uri","batch_job_name","output_supabase_bucket","output_supabase_path","output_supabase_index_path","output_gcs_prefix","error_message","created_at","submitted_at","completed_at","failed_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:write"}},"/v1/gvcf/jobs/{jobId}":{"get":{"summary":"Read FASTQ to gVCF job status.","tags":["Orders"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"jobId","required":true,"description":"Public gVCF job id (gvj_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"order_id":{"type":"string"},"status":{"type":"string"},"sample_id":{"type":"string"},"reference_uri":{"type":"string"},"batch_job_name":{"nullable":true,"type":"string"},"output_supabase_bucket":{"nullable":true,"type":"string"},"output_supabase_path":{"nullable":true,"type":"string"},"output_supabase_index_path":{"nullable":true,"type":"string"},"output_gcs_prefix":{"nullable":true,"type":"string"},"error_message":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"failed_at":{"nullable":true,"type":"string"}},"required":["job_id","order_id","status","sample_id","reference_uri","batch_job_name","output_supabase_bucket","output_supabase_path","output_supabase_index_path","output_gcs_prefix","error_message","created_at","submitted_at","completed_at","failed_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"orders:read"}},"/v1/uploads/gvcf/initiate":{"post":{"summary":"Begin a signed (resumable) VCF/gVCF upload for large files.","tags":["Uploads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":512,"description":"Original VCF/gVCF filename (.hard-filtered.gvcf.gz, .vcf.gz, .g.vcf.gz, .gvcf.gz)."},"content_type":{"description":"MIME type of the upload.","type":"string","maxLength":128},"size_bytes":{"description":"Expected file size in bytes.","type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["filename"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"source_type":{"type":"string"},"status":{"type":"string"},"filename":{"nullable":true,"type":"string"},"content_type":{"nullable":true,"type":"string"},"size_bytes":{"nullable":true,"type":"number"},"sha256":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"uploaded_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"upload_url":{"type":"string"},"upload_token":{"type":"string"},"storage_path":{"type":"string"}},"required":["upload_id","source_type","status","filename","content_type","size_bytes","sha256","created_at","uploaded_at","upload_url","upload_token","storage_path"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"uploads:write"}},"/v1/uploads/gvcf/complete":{"post":{"summary":"Finalize a signed VCF/gVCF upload after the file is sent to storage.","tags":["Uploads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string","description":"Public upload id returned by initiate."},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Hex SHA-256 of the uploaded file."},"size_bytes":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Actual uploaded size in bytes."}},"required":["upload_id","sha256","size_bytes"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"source_type":{"type":"string"},"status":{"type":"string"},"filename":{"nullable":true,"type":"string"},"content_type":{"nullable":true,"type":"string"},"size_bytes":{"nullable":true,"type":"number"},"sha256":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"uploaded_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["upload_id","source_type","status","filename","content_type","size_bytes","sha256","created_at","uploaded_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"409":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"uploads:write"}},"/v1/uploads/gvcf":{"post":{"summary":"Upload an existing VCF/gVCF directly (multipart).","tags":["Uploads"],"description":"multipart/form-data with a single file field. Best for files within the multipart size limit; use the signed upload flow for larger files.","responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"source_type":{"type":"string"},"status":{"type":"string"},"filename":{"nullable":true,"type":"string"},"content_type":{"nullable":true,"type":"string"},"size_bytes":{"nullable":true,"type":"number"},"sha256":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"uploaded_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["upload_id","source_type","status","filename","content_type","size_bytes","sha256","created_at","uploaded_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"uploads:write"}},"/v1/conversions":{"post":{"summary":"Convert an uploaded VCF/gVCF into a .genome bundle.","tags":["Conversions"],"description":"Staging completes synchronously and returns 201; production enqueues the job and returns 202.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_type":{"type":"string","enum":["gvcf"],"description":"Legacy API source-type identifier for supported VCF/gVCF uploads."},"upload_id":{"type":"string","description":"Public id of a completed upload."},"retention":{"default":"hosted_runtime","description":"Retention policy for the resulting genome.","type":"string","enum":["delete_after_30_days","hosted_runtime"]}},"required":["source_type","upload_id"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversion_id":{"type":"string"},"upload_id":{"nullable":true,"type":"string"},"source_type":{"type":"string"},"status":{"type":"string"},"genome_id":{"nullable":true,"type":"string"},"price_cents":{"nullable":true,"type":"number"},"currency":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"completed_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["conversion_id","upload_id","source_type","status","genome_id","price_cents","currency","created_at","completed_at"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversion_id":{"type":"string"},"upload_id":{"nullable":true,"type":"string"},"source_type":{"type":"string"},"status":{"type":"string"},"genome_id":{"nullable":true,"type":"string"},"price_cents":{"nullable":true,"type":"number"},"currency":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"completed_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["conversion_id","upload_id","source_type","status","genome_id","price_cents","currency","created_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"conversions:write"}},"/v1/genomes":{"get":{"summary":"List hosted genomes.","tags":["Genomes"],"parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Maximum genomes to return."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"genome_id":{"type":"string"},"status":{"type":"string"},"bundle_version":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"source":{"nullable":true,"type":"string"},"interpretation_version":{"nullable":true,"type":"string"},"retention":{"type":"string"},"hosted_runtime_enabled":{"type":"boolean"},"delete_after":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["genome_id","status","bundle_version","created_at","source","interpretation_version","retention","hosted_runtime_enabled","delete_after"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}":{"get":{"summary":"Read hosted genome runtime metadata.","tags":["Genomes"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string"},"status":{"type":"string"},"bundle_version":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"source":{"nullable":true,"type":"string"},"interpretation_version":{"nullable":true,"type":"string"},"retention":{"type":"string"},"hosted_runtime_enabled":{"type":"boolean"},"delete_after":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["genome_id","status","bundle_version","created_at","source","interpretation_version","retention","hosted_runtime_enabled","delete_after"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/bundle":{"get":{"summary":"Download a signed .genome bundle link.","tags":["Genomes"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string"},"bundle_version":{"nullable":true,"type":"string"},"download_url":{"type":"string"},"expires_in_seconds":{"type":"number"}},"required":["genome_id","bundle_version","download_url","expires_in_seconds"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/manifest":{"get":{"summary":"Read the genome bundle manifest.","tags":["Genomes"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string"},"manifest":{}},"required":["genome_id","manifest"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/files":{"get":{"summary":"Return signed links for a hosted genome's files.","tags":["Genomes"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string"},"files":{"type":"array","items":{}},"download_url":{"type":"string"},"expires_in_seconds":{"type":"number"}},"required":["genome_id"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/retention":{"patch":{"summary":"Change whether the genome is hosted or delivery-only.","tags":["Genomes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"retention":{"type":"string","enum":["delete_after_30_days","hosted_runtime"],"description":"New retention policy."}},"required":["retention"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string"},"status":{"type":"string"},"bundle_version":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"source":{"nullable":true,"type":"string"},"interpretation_version":{"nullable":true,"type":"string"},"retention":{"type":"string"},"hosted_runtime_enabled":{"type":"boolean"},"delete_after":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["genome_id","status","bundle_version","created_at","source","interpretation_version","retention","hosted_runtime_enabled","delete_after"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:write"}},"/v1/genomes/{genomeId}/interpretations/latest":{"get":{"summary":"Read the latest interpretation for a genome.","tags":["Interpretations"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interpretation_id":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"summary":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["interpretation_id","version","status","summary","created_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/interpretations/latest/artifact":{"get":{"summary":"Read the latest interpretation artifact.","tags":["Interpretations"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interpretation_id":{"type":"string"},"genome_id":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"artifact":{"nullable":true}},"required":["interpretation_id","genome_id","version","status","artifact"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/interpretations/{version}":{"get":{"summary":"Read a specific interpretation version.","tags":["Interpretations"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."},{"schema":{"type":"string"},"in":"path","name":"version","required":true,"description":"Interpretation version string."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interpretation_id":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"summary":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["interpretation_id","version","status","summary","created_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/genomes/{genomeId}/reinterpret":{"post":{"summary":"Queue a fresh interpretation for a genome.","tags":["Interpretations"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interpretation_id":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"summary":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["interpretation_id","version","status","summary","created_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:write"}},"/v1/test/genomes":{"get":{"summary":"Seed and list the sandbox genome (staging keys only).","tags":["Staging"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:read"}},"/v1/test/genomes/seed":{"post":{"summary":"Seed the sandbox genome (staging keys only).","tags":["Staging"],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string"}},"required":["genome_id"],"additionalProperties":{}}}}},"403":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"genomes:write"}},"/v1/context/build":{"post":{"summary":"Build a bounded structured context for a genome (advanced).","tags":["Context"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"genome_id":{"type":"string","description":"Public genome id (gen_...) to build context for."},"domain":{"default":"general","description":"Context domain.","type":"string","enum":["nutrition_diet_response","taste_and_smell","sleep_and_chronotype","body_traits","fitness_and_movement","growth_repair_inflammation_context","longevity_healthy_aging","skin_and_collagen","hormone_and_vitality","recovery_and_resilience","micronutrients_and_vitamins","pharmacogenomics_safety","cognition_and_focus","methylation_pathways","general"]},"detail_level":{"default":"standard","description":"Level of structured detail.","type":"string","enum":["brief","standard","deep"]}},"required":["genome_id"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"context_id":{"type":"string"},"genome_id":{"type":"string"},"domain":{"type":"string","description":"One of: nutrition_diet_response, taste_and_smell, sleep_and_chronotype, body_traits, fitness_and_movement, growth_repair_inflammation_context, longevity_healthy_aging, skin_and_collagen, hormone_and_vitality, recovery_and_resilience, micronutrients_and_vitamins, pharmacogenomics_safety, cognition_and_focus, methylation_pathways, general."},"detail_level":{"type":"string","description":"One of: brief, standard, deep."},"summary":{"nullable":true,"type":"string"},"structured_findings":{"type":"array","items":{}},"citations":{"type":"array","items":{}},"interpretation_version":{"nullable":true,"type":"string"},"cost_cents":{"type":"number"},"currency":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["context_id","genome_id","domain","detail_level","summary","structured_findings","citations","interpretation_version","cost_cents","currency","created_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"409":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:write"}},"/v1/context/{contextId}":{"get":{"summary":"Read a previously built context.","tags":["Context"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"contextId","required":true,"description":"Public context id (ctx_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"context_id":{"type":"string"},"genome_id":{"type":"string"},"domain":{"type":"string","description":"One of: nutrition_diet_response, taste_and_smell, sleep_and_chronotype, body_traits, fitness_and_movement, growth_repair_inflammation_context, longevity_healthy_aging, skin_and_collagen, hormone_and_vitality, recovery_and_resilience, micronutrients_and_vitamins, pharmacogenomics_safety, cognition_and_focus, methylation_pathways, general."},"detail_level":{"type":"string","description":"One of: brief, standard, deep."},"summary":{"nullable":true,"type":"string"},"structured_findings":{"type":"array","items":{}},"citations":{"type":"array","items":{}},"interpretation_version":{"nullable":true,"type":"string"},"cost_cents":{"type":"number"},"currency":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["context_id","genome_id","domain","detail_level","summary","structured_findings","citations","interpretation_version","cost_cents","currency","created_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:read"}},"/v1/panels":{"get":{"summary":"List available genetic insight panel definitions.","tags":["Panels"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":{},"description":"Genetic insight panel definition."}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"contexts:read"}},"/v1/panels/{panelId}":{"get":{"summary":"Read a single panel definition.","tags":["Panels"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"panelId","required":true,"description":"Genetic insight panel id (e.g. nutrition_diet_response)."}],"responses":{"200":{"description":"Genetic insight panel definition.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":{},"description":"Genetic insight panel definition."}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:read"}},"/v1/genomes/{genomeId}/panels":{"get":{"summary":"List built panels for a genome.","tags":["Panels"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"panel_result_id":{"type":"string"},"requires_regeneration":{"type":"boolean"},"genome_id":{"type":"string"},"panel_id":{"type":"string"},"title":{"type":"string"},"summary":{"nullable":true,"type":"string"},"sections":{"type":"array","items":{},"description":"Panel sections retain empty areas. coverage.by_type reports markers, derived_traits, pgx_genes, and models separately; findings expose analytical confidence and evidence references. PGx result.drug_contexts contains gene–drug-specific guideline context."},"citations":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}},"clinical_boundary":{"nullable":true,"type":"string"},"interpretation_version":{"nullable":true,"type":"string"},"model_name":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["panel_result_id","requires_regeneration","genome_id","panel_id","title","summary","sections","citations","limitations","clinical_boundary","interpretation_version","model_name","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:read"}},"/v1/genomes/{genomeId}/panels/{panelId}/preparation":{"get":{"summary":"Read panel evidence preparation status. This read does not start work.","tags":["Panels"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true},{"schema":{"type":"string"},"in":"path","name":"panelId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready","not_prepared","queued","processing","failed"]},"status_url":{"type":"string"},"retry_after_seconds":{"type":"number"},"message":{"type":"string"}},"required":["status","status_url","retry_after_seconds","message"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"409":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"503":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:read"}},"/v1/genomes/{genomeId}/panels/{panelId}/build":{"post":{"summary":"Build a genetic insight panel for a genome.","tags":["Panels"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{"include_sequence_context":{"description":"When true, WGS-backed variant findings include GRCh38 reference sequence context.","type":"boolean"},"sequence_window_bp":{"description":"Odd-sized reference window around the variant. Even values are rounded up.","type":"integer","minimum":21,"maximum":101}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."},{"schema":{"type":"string"},"in":"path","name":"panelId","required":true,"description":"Genetic insight panel id to build."}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"panel_result_id":{"type":"string"},"requires_regeneration":{"type":"boolean"},"genome_id":{"type":"string"},"panel_id":{"type":"string"},"title":{"type":"string"},"summary":{"nullable":true,"type":"string"},"sections":{"type":"array","items":{},"description":"Panel sections retain empty areas. coverage.by_type reports markers, derived_traits, pgx_genes, and models separately; findings expose analytical confidence and evidence references. PGx result.drug_contexts contains gene–drug-specific guideline context."},"citations":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}},"clinical_boundary":{"nullable":true,"type":"string"},"interpretation_version":{"nullable":true,"type":"string"},"model_name":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["panel_result_id","requires_regeneration","genome_id","panel_id","title","summary","sections","citations","limitations","clinical_boundary","interpretation_version","model_name","created_at"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready","not_prepared","queued","processing","failed"]},"status_url":{"type":"string"},"retry_after_seconds":{"type":"number"},"message":{"type":"string"}},"required":["status","status_url","retry_after_seconds","message"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"409":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}},"503":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:write"}},"/v1/genomes/{genomeId}/panels/{panelResultId}":{"get":{"summary":"Read a built panel result.","tags":["Panels"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"genomeId","required":true,"description":"Public genome id (gen_...)."},{"schema":{"type":"string"},"in":"path","name":"panelResultId","required":true,"description":"Public panel result id (pan_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"panel_result_id":{"type":"string"},"requires_regeneration":{"type":"boolean"},"genome_id":{"type":"string"},"panel_id":{"type":"string"},"title":{"type":"string"},"summary":{"nullable":true,"type":"string"},"sections":{"type":"array","items":{},"description":"Panel sections retain empty areas. coverage.by_type reports markers, derived_traits, pgx_genes, and models separately; findings expose analytical confidence and evidence references. PGx result.drug_contexts contains gene–drug-specific guideline context."},"citations":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}},"clinical_boundary":{"nullable":true,"type":"string"},"interpretation_version":{"nullable":true,"type":"string"},"model_name":{"nullable":true,"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["panel_result_id","requires_regeneration","genome_id","panel_id","title","summary","sections","citations","limitations","clinical_boundary","interpretation_version","model_name","created_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"contexts:read"}},"/v1/webhooks":{"post":{"summary":"Register a lifecycle webhook endpoint.","tags":["Webhooks"],"description":"Endpoints may not target private or local hosts; production endpoints must be HTTPS. Supported event types: order.created, order.payment_pending, order.paid, order.kit_preparing, order.kit_shipped, order.kit_delivered, order.sample_registered, order.sample_returned, order.sample_received, order.lab_processing, order.sequencing, order.bioinformatics_processing, order.genome_bundle_generating, order.completed, order.failed, order.cancelled, conversion.completed, genome.created, interpretation.updated, context.generated, panel.generated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive events."},"description":{"description":"Human-readable label.","type":"string","maxLength":500},"event_types":{"default":["order.created","order.payment_pending","order.paid","order.kit_preparing","order.kit_shipped","order.kit_delivered","order.sample_registered","order.sample_returned","order.sample_received","order.lab_processing","order.sequencing","order.bioinformatics_processing","order.genome_bundle_generating","order.completed","order.failed","order.cancelled","conversion.completed","genome.created","interpretation.updated","context.generated","panel.generated"],"description":"Event types to subscribe to. Defaults to all.","minItems":1,"type":"array","items":{"type":"string"}}},"required":["url"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"signing_secret_preview":{"nullable":true,"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"signing_secret":{"type":"string","description":"Returned only once, at creation time."}},"required":["webhook_id","url","description","event_types","signing_secret_preview","status","created_at","signing_secret"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"webhooks:write"},"get":{"summary":"List registered webhook endpoints.","tags":["Webhooks"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"webhook_id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"signing_secret_preview":{"nullable":true,"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["webhook_id","url","description","event_types","signing_secret_preview","status","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"webhooks:read"}},"/v1/webhooks/{webhookId}":{"delete":{"summary":"Disable a webhook endpoint.","tags":["Webhooks"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"webhookId","required":true,"description":"Public webhook id (wh_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"signing_secret_preview":{"nullable":true,"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["webhook_id","url","description","event_types","signing_secret_preview","status","created_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"webhooks:write"}},"/v2/webhooks":{"post":{"summary":"Register a lifecycle webhook endpoint.","tags":["Webhooks"],"description":"Endpoints may not target private or local hosts; production endpoints must be HTTPS. Supported event types: genome_connection.connected, genome_connection.progress.updated, genome_connection.ready, genome_connection.access.revoked, insight_panel.status.updated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive events."},"description":{"description":"Human-readable label.","type":"string","maxLength":500},"event_types":{"default":["genome_connection.connected","genome_connection.progress.updated","genome_connection.ready","genome_connection.access.revoked","insight_panel.status.updated"],"description":"Event types to subscribe to. Defaults to all.","minItems":1,"type":"array","items":{"type":"string"}}},"required":["url"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"signing_secret_preview":{"nullable":true,"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"signing_secret":{"type":"string","description":"Returned only once, at creation time."}},"required":["webhook_id","url","description","event_types","signing_secret_preview","status","created_at","signing_secret"]}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"webhooks:write"},"get":{"summary":"List registered webhook endpoints.","tags":["Webhooks"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"webhook_id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"signing_secret_preview":{"nullable":true,"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["webhook_id","url","description","event_types","signing_secret_preview","status","created_at"]}}},"required":["data"]}}}}},"x-required-scopes":"webhooks:read"}},"/v2/webhooks/{webhookId}":{"delete":{"summary":"Disable a webhook endpoint.","tags":["Webhooks"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"webhookId","required":true,"description":"Public webhook id (wh_...)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"signing_secret_preview":{"nullable":true,"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["webhook_id","url","description","event_types","signing_secret_preview","status","created_at"]}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"]}},"required":["error"],"description":"Standard error envelope."}}}}},"x-required-scopes":"webhooks:write"}},"/v1/usage":{"get":{"summary":"List metered usage events.","tags":["Usage"],"parameters":[{"schema":{"default":100,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Maximum events to return."},{"schema":{"type":"string"},"in":"query","name":"event_type","required":false,"description":"Filter by usage event type."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"usage_event_id":{"type":"string"},"event_type":{"type":"string"},"genome_id":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["usage_event_id","event_type","genome_id","quantity","metadata","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"usage:read"}},"/v1/usage/rollups":{"get":{"summary":"List daily usage rollups (up to 90 days).","tags":["Usage"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"hosted_genome_count":{"type":"number"},"context_generation_count":{"type":"number"},"sequencing_completed_count":{"type":"number"},"conversion_completed_count":{"type":"number"}},"required":["date","hosted_genome_count","context_generation_count","sequencing_completed_count","conversion_completed_count"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"usage:read"}},"/v1/billing/account":{"get":{"summary":"Read the billing account.","tags":["Billing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"billing_account_id":{"type":"string"},"organisation_id":{"type":"string"},"mode":{"type":"string","description":"One of: card_on_file, enterprise_prepaid, invoice_arrears."},"status":{"type":"string"},"stripe_customer_id":{"nullable":true,"type":"string"},"stripe_payment_method_id":{"nullable":true,"type":"string"},"invoice_terms_days":{"type":"number"},"monthly_minimum_cents":{"type":"number"},"enterprise_upfront_credit_cents":{"type":"number"},"auto_charge":{"type":"boolean"},"credit_balance_cents":{"type":"number"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["billing_account_id","organisation_id","mode","status","stripe_customer_id","stripe_payment_method_id","invoice_terms_days","monthly_minimum_cents","enterprise_upfront_credit_cents","auto_charge","credit_balance_cents","created_at","updated_at"],"additionalProperties":false}}}}},"x-required-scopes":"billing:read or usage:read"},"patch":{"summary":"Update the billing account.","tags":["Billing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["card_on_file","enterprise_prepaid","invoice_arrears"],"description":"Billing mode for the account."},"stripe_customer_id":{"nullable":true,"type":"string","minLength":1},"stripe_payment_method_id":{"nullable":true,"type":"string","minLength":1},"invoice_terms_days":{"type":"integer","minimum":0,"maximum":120},"monthly_minimum_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"enterprise_upfront_credit_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"auto_charge":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}}},"required":["mode"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"billing_account_id":{"type":"string"},"organisation_id":{"type":"string"},"mode":{"type":"string","description":"One of: card_on_file, enterprise_prepaid, invoice_arrears."},"status":{"type":"string"},"stripe_customer_id":{"nullable":true,"type":"string"},"stripe_payment_method_id":{"nullable":true,"type":"string"},"invoice_terms_days":{"type":"number"},"monthly_minimum_cents":{"type":"number"},"enterprise_upfront_credit_cents":{"type":"number"},"auto_charge":{"type":"boolean"},"credit_balance_cents":{"type":"number"},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["billing_account_id","organisation_id","mode","status","stripe_customer_id","stripe_payment_method_id","invoice_terms_days","monthly_minimum_cents","enterprise_upfront_credit_cents","auto_charge","credit_balance_cents","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"billing:write"}},"/v1/billing/balance-transactions":{"get":{"summary":"List billing balance transactions.","tags":["Billing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"balance_transaction_id":{"type":"string"},"type":{"type":"string"},"amount_cents":{"type":"number"},"currency":{"type":"string"},"description":{"nullable":true,"type":"string"},"source_type":{"nullable":true,"type":"string"},"source_id":{"nullable":true,"type":"string"},"metadata":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["balance_transaction_id","type","amount_cents","currency","description","source_type","source_id","metadata","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"billing:read or usage:read"}},"/v1/billing/periods":{"get":{"summary":"List billing periods.","tags":["Billing"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"billing_period_id":{"type":"string"},"period_start":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"period_end":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"status":{"type":"string"},"generated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"finalized_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"subtotal_cents":{"type":"number"},"line_item_count":{"type":"number"},"invoices":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string"},"billing_mode":{"type":"string"},"status":{"type":"string"},"subtotal_cents":{"type":"number"},"credit_applied_cents":{"type":"number"},"amount_due_cents":{"type":"number"},"currency":{"type":"string"},"stripe_invoice_id":{"nullable":true,"type":"string"},"hosted_invoice_url":{"nullable":true,"type":"string"},"due_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"issued_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"paid_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"line_items":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"charge_type":{"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"unit_price_cents":{"type":"number"},"amount_cents":{"type":"number"},"currency":{"type":"string"},"collection_mode":{"type":"string"},"status":{"type":"string"},"source_type":{"nullable":true,"type":"string"},"source_id":{"nullable":true,"type":"string"},"metadata":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["line_item_id","charge_type","description","quantity","unit_price_cents","amount_cents","currency","collection_mode","status","source_type","source_id","metadata","created_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["invoice_id","billing_mode","status","subtotal_cents","credit_applied_cents","amount_due_cents","currency","stripe_invoice_id","hosted_invoice_url","due_date","issued_at","paid_at","line_items","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["billing_period_id","period_start","period_end","status","generated_at","finalized_at","subtotal_cents","line_item_count","invoices","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"billing:read or usage:read"}},"/v1/billing/periods/{yearMonth}/generate":{"post":{"summary":"Generate charges for a billing period.","tags":["Billing"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"in":"path","name":"yearMonth","required":true,"description":"Billing period as YYYY-MM."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"billing_period_id":{"type":"string"},"period_start":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"period_end":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"status":{"type":"string"},"generated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"finalized_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"subtotal_cents":{"type":"number"},"line_item_count":{"type":"number"},"invoices":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string"},"billing_mode":{"type":"string"},"status":{"type":"string"},"subtotal_cents":{"type":"number"},"credit_applied_cents":{"type":"number"},"amount_due_cents":{"type":"number"},"currency":{"type":"string"},"stripe_invoice_id":{"nullable":true,"type":"string"},"hosted_invoice_url":{"nullable":true,"type":"string"},"due_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"issued_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"paid_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"line_items":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"charge_type":{"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"unit_price_cents":{"type":"number"},"amount_cents":{"type":"number"},"currency":{"type":"string"},"collection_mode":{"type":"string"},"status":{"type":"string"},"source_type":{"nullable":true,"type":"string"},"source_id":{"nullable":true,"type":"string"},"metadata":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["line_item_id","charge_type","description","quantity","unit_price_cents","amount_cents","currency","collection_mode","status","source_type","source_id","metadata","created_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["invoice_id","billing_mode","status","subtotal_cents","credit_applied_cents","amount_due_cents","currency","stripe_invoice_id","hosted_invoice_url","due_date","issued_at","paid_at","line_items","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["billing_period_id","period_start","period_end","status","generated_at","finalized_at","subtotal_cents","line_item_count","invoices","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"billing:write"}},"/v1/billing/periods/{yearMonth}/charges":{"get":{"summary":"Read charges for a billing period.","tags":["Billing"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"in":"path","name":"yearMonth","required":true,"description":"Billing period as YYYY-MM."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"billing_period":{"type":"object","properties":{"billing_period_id":{"type":"string"},"period_start":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"period_end":{"type":"string","description":"Calendar date (YYYY-MM-DD)."},"status":{"type":"string"},"generated_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"finalized_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"subtotal_cents":{"type":"number"},"line_item_count":{"type":"number"},"invoices":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string"},"billing_mode":{"type":"string"},"status":{"type":"string"},"subtotal_cents":{"type":"number"},"credit_applied_cents":{"type":"number"},"amount_due_cents":{"type":"number"},"currency":{"type":"string"},"stripe_invoice_id":{"nullable":true,"type":"string"},"hosted_invoice_url":{"nullable":true,"type":"string"},"due_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"issued_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"paid_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"line_items":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"charge_type":{"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"unit_price_cents":{"type":"number"},"amount_cents":{"type":"number"},"currency":{"type":"string"},"collection_mode":{"type":"string"},"status":{"type":"string"},"source_type":{"nullable":true,"type":"string"},"source_id":{"nullable":true,"type":"string"},"metadata":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["line_item_id","charge_type","description","quantity","unit_price_cents","amount_cents","currency","collection_mode","status","source_type","source_id","metadata","created_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["invoice_id","billing_mode","status","subtotal_cents","credit_applied_cents","amount_due_cents","currency","stripe_invoice_id","hosted_invoice_url","due_date","issued_at","paid_at","line_items","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["billing_period_id","period_start","period_end","status","generated_at","finalized_at","subtotal_cents","line_item_count","invoices","created_at","updated_at"],"additionalProperties":false},"totals_by_charge_type":{"type":"object","additionalProperties":{"type":"number"}},"data":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"charge_type":{"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"unit_price_cents":{"type":"number"},"amount_cents":{"type":"number"},"currency":{"type":"string"},"collection_mode":{"type":"string"},"status":{"type":"string"},"source_type":{"nullable":true,"type":"string"},"source_id":{"nullable":true,"type":"string"},"metadata":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["line_item_id","charge_type","description","quantity","unit_price_cents","amount_cents","currency","collection_mode","status","source_type","source_id","metadata","created_at"],"additionalProperties":false}}},"required":["billing_period","totals_by_charge_type","data"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"billing:read or usage:read"}},"/v1/billing/periods/{yearMonth}/finalize":{"post":{"summary":"Finalize a billing period into an invoice.","tags":["Billing"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"in":"path","name":"yearMonth","required":true,"description":"Billing period as YYYY-MM."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string"},"billing_mode":{"type":"string"},"status":{"type":"string"},"subtotal_cents":{"type":"number"},"credit_applied_cents":{"type":"number"},"amount_due_cents":{"type":"number"},"currency":{"type":"string"},"stripe_invoice_id":{"nullable":true,"type":"string"},"hosted_invoice_url":{"nullable":true,"type":"string"},"due_date":{"nullable":true,"type":"string","description":"Calendar date (YYYY-MM-DD)."},"issued_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"paid_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"line_items":{"type":"array","items":{"type":"object","properties":{"line_item_id":{"type":"string"},"charge_type":{"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"unit_price_cents":{"type":"number"},"amount_cents":{"type":"number"},"currency":{"type":"string"},"collection_mode":{"type":"string"},"status":{"type":"string"},"source_type":{"nullable":true,"type":"string"},"source_id":{"nullable":true,"type":"string"},"metadata":{"nullable":true},"created_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["line_item_id","charge_type","description","quantity","unit_price_cents","amount_cents","currency","collection_mode","status","source_type","source_id","metadata","created_at"],"additionalProperties":false}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"updated_at":{"type":"string","description":"ISO 8601 timestamp."}},"required":["invoice_id","billing_mode","status","subtotal_cents","credit_applied_cents","amount_due_cents","currency","stripe_invoice_id","hosted_invoice_url","due_date","issued_at","paid_at","line_items","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"billing:write"}},"/v1/api-keys":{"get":{"summary":"List API keys for the organisation.","tags":["API keys"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"api_key_id":{"type":"string"},"environment":{"type":"string"},"name":{"nullable":true,"type":"string"},"key_preview":{"nullable":true,"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"last_used_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"revoked_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["api_key_id","environment","name","key_preview","scopes","created_at","last_used_at","revoked_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"x-required-scopes":"api-keys:read"}},"/v1/api-keys/{apiKeyId}":{"delete":{"summary":"Revoke an API key.","tags":["API keys"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"apiKeyId","required":true,"description":"API key id (UUID)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"api_key_id":{"type":"string"},"environment":{"type":"string"},"name":{"nullable":true,"type":"string"},"key_preview":{"nullable":true,"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"ISO 8601 timestamp."},"last_used_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."},"revoked_at":{"nullable":true,"type":"string","description":"ISO 8601 timestamp."}},"required":["api_key_id","environment","name","key_preview","scopes","created_at","last_used_at","revoked_at"],"additionalProperties":false}}}},"404":{"description":"Standard error envelope.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string"},"request_id":{"type":"string","description":"Request identifier for support."},"retryable":{"type":"boolean"},"details":{}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard error envelope."}}}}},"x-required-scopes":"api-keys:write"}}},"servers":[{"url":"https://api.genome.computer","description":"Production"},{"url":"https://staging.api.genome.computer","description":"Staging"}],"security":[{"bearerAuth":[]}]}