{"openapi":"3.1.0","info":{"title":"Physikit API","version":"2.0.3","x-logo":{"url":"https://docs.physikit.com/static/logo.svg","altText":"Physikit","backgroundColor":"transparent"}},"paths":{"/panels":{"get":{"tags":["Panels"],"summary":"List all panels","description":"Retrieve a paginated list of all available panels. Each panel includes its unique identifier and name. To get detailed information including biomarkers for a specific panel, use the GET /panels/{id} endpoint.","operationId":"list_panels_panels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of items per page","default":50,"title":"Limit"},"description":"Number of items per page"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based page offset","default":0,"title":"Offset"},"description":"Zero-based page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelListDataResponse"},"example":{"data":[{"id":"VITD","name":"Vitamin D Panel"},{"id":"BMP","name":"Basic Metabolic Panel"},{"id":"HOMP","name":"Hormone Panel - Female"}],"meta":{"total":3,"limit":50,"offset":0}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/panels/{id}":{"get":{"tags":["Panels"],"summary":"Retrieve a single panel","description":"Get detailed information for a single panel by its unique identifier. Useful for displaying the panel’s name, creation time, biomarkers, and other metadata.","operationId":"retrieve_panel_panels__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Panel ID","title":"Id"},"description":"Panel ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelResponse"},"example":{"id":"VITD","name":"Vitamin D Panel","panel_biomarkers":[{"biomarker":{"id":"1hq2","name":"Stearic acid","description":"A long-chain fatty acid found in cocoa butter and animal fats.","unit":"%","biomarker_category":{"name":"Saturated fatty acids","description":"Fats with no double bonds, common in meat and dairy products."}},"reference_range":{"range_min_value":0.0,"range_max_value":40.0,"range_optimal_min_value":9.0,"range_optimal_max_value":12.0,"range_acceptable_min_value":7.0,"range_acceptable_max_value":15.0,"range_risky_min_value":3.0,"range_risky_max_value":20.0,"range_value_min_open":false,"range_value_max_open":false}}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/orders":{"post":{"tags":["Orders"],"summary":"Create a new order","description":"Create a new order entry in the system. The order is associated with a kit ID. The response includes the full order record with timestamps.","operationId":"create_order_orders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreateRequest"},"example":{"panel_id":"VITD","customer_order_id":"BESTELLUNG-2025-1234","customer_order_id_2":"REFERENZ-9988","kit_id":"KIT001","first_name":"Anna","last_name":"Schmidt","email":"anna.schmidt@example.de","address_line_1":"Musterstraße 12","address_line_2":"EG rechts","city":"Berlin","zip_code":"10115","country":"Germany","consent":true}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailResponse"},"example":{"id":"5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","panel_id":"VITD","kit_id":"KIT001","status":10,"note":"","first_name":"Anna","last_name":"Schmidt","email":"anna.schmidt@example.de","address_line_1":"Musterstraße 12","address_line_2":"EG rechts","city":"Berlin","zip_code":"10115","country":"Germany","consent":true,"created_at":"2025-07-08T10:00:00.000Z","updated_at":"2025-07-08T10:00:00.000Z"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}},"get":{"tags":["Orders"],"summary":"List all orders","description":"Return a paginated list of orders. Supports optional filtering by panel ID or order status. Each order includes metadata such as status, note, and timestamps.","operationId":"list_orders_orders_get","parameters":[{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return only orders that belong to this panel ID","title":"Panel Id"},"description":"Return only orders that belong to this panel ID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by order status (public status code)","title":"Status"},"description":"Filter by order status (public status code)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Number of items per page","default":50,"title":"Limit"},"description":"Number of items per page"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based page offset","default":0,"title":"Offset"},"description":"Zero-based page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderListResponse"},"example":{"data":[{"id":"5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","panel_id":"VITD","kit_id":"KIT12345","status":10,"note":"This is a test note.","created_at":"2025-07-04T17:12:27.235Z","updated_at":"2025-07-04T17:12:27.235Z"},{"id":"c7f0f7d1-2f1a-4a7c-9c0b-5c4e9a1b2d3e","panel_id":"BMP","kit_id":"KIT67890","status":20,"note":"Second order.","created_at":"2025-07-04T17:13:11.511Z","updated_at":"2025-07-04T17:13:11.511Z"}],"meta":{"total":1050,"limit":50,"offset":0}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/orders/{id}":{"get":{"tags":["Orders"],"summary":"Retrieve an order","description":"Fetch a single order by its unique ID. Returns order metadata, including status, note, and timestamps.","operationId":"get_order_orders__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Order ID","title":"Id"},"description":"Order ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailResponse"},"example":{"id":"5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","panel_id":"VITD","kit_id":"KIT12345","status":10,"note":"This is a test note.","customer_order_id":"BESTELLUNG-2025-1234","customer_order_id_2":"REFERENZ-9988","first_name":"Anna","last_name":"Schmidt","email":"anna.schmidt@example.de","address_line_1":"Musterstraße 12","address_line_2":"EG rechts","city":"Berlin","zip_code":"10115","country":"Germany","consent":true,"created_at":"2025-07-04T17:12:27.235Z","updated_at":"2025-07-04T17:12:27.235Z"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}},"patch":{"tags":["Orders"],"summary":"Update an order","description":"Partially update a specific order. Currently supports updating the order status. Returns the updated order object with new timestamps.","operationId":"update_order_orders__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Order ID","title":"Id"},"description":"Order ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailResponse"},"example":{"id":"5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","panel_id":"VITD","kit_id":"KIT12345","status":20,"note":"Updated note.","created_at":"2025-07-04T17:12:27.235Z","updated_at":"2025-07-09T09:00:00.000Z"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/orders/status/batch":{"post":{"tags":["Orders"],"summary":"Bulk-update order status","description":"Updates the status of multiple orders in a single request. Returns a list of successfully updated order IDs along with pagination metadata.","operationId":"batch_update_status_orders_status_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderChangeStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderBatchUpdateResponse"},"example":{"data":["5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","c7f0f7d1-2f1a-4a7c-9c0b-5c4e9a1b2d3e","0f6f5a7e-1e3a-4d9b-8f21-7f1bb40e9d9f"],"meta":{"total":3,"limit":50,"offset":0}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}}}}}},"/results":{"get":{"tags":["Results"],"summary":"List all results","description":"Retrieve biomarker results.\n\n**Usage modes**\n1. **Filtered** – add one or more `order_id` **or** `kit_id` query parameters (max 100 each). Only orders that already have results are returned.\n2. **Browse** – omit both filters to page through all finished results.\n\nIn both cases the response contains:\n* `data` – the list of result objects (may be empty), and\n* `meta` – pagination info (`total`, `limit`, `offset`).\n`limit`/`offset` are respected even when filters are supplied.","operationId":"list_results_results_get","parameters":[{"name":"order_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Repeat for each order ID, e.g. `?order_id=...&order_id=...`","title":"Order Id"},"description":"Repeat for each order ID, e.g. `?order_id=...&order_id=...`"},{"name":"kit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeat for each kit ID, e.g. `?kit_id=KIT0001&kit_id=KIT0002`.\n\n**Note:** Filtering by `kit_id` is **case-sensitive**. Most laboratory systems store and report kit identifiers in **uppercase** (e.g. `KIT0001`), and the API matches them exactly. Ensure you use the correct letter case when querying.","title":"Kit Id"},"description":"Repeat for each kit ID, e.g. `?kit_id=KIT0001&kit_id=KIT0002`.\n\n**Note:** Filtering by `kit_id` is **case-sensitive**. Most laboratory systems store and report kit identifiers in **uppercase** (e.g. `KIT0001`), and the API matches them exactly. Ensure you use the correct letter case when querying."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page when filters are omitted","default":50,"title":"Limit"},"description":"Items per page when filters are omitted"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based page offset","default":0,"title":"Offset"},"description":"Zero-based page offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultListResponse"},"example":{"data":[{"order_id":"5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","kit_id":"KIT0001","panels":[{"panel_id":"VITD","panel_name":"Vitamin D Panel","panel_biomarkers":[{"biomarker_id":"25HD","biomarker_name":"25-Hydroxyvitamin D","biomarker_unit":"%","measured_value":52.3}]}]},{"order_id":"c7f0f7d1-2f1a-4a7c-9c0b-5c4e9a1b2d3e","kit_id":"KIT0002","panels":[{"panel_id":"AMAP","panel_name":"Amino acids panel","panel_biomarkers":[{"biomarker_id":"TYR1","biomarker_name":"Tyrosine","biomarker_unit":"μmol/l","measured_value":null}]}]}],"meta":{"total":1,"limit":50,"offset":0}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/sandbox/orders/{id}/results/seed":{"post":{"tags":["Sandbox"],"summary":"Seed results for an order","operationId":"seed_order_results_sandbox_sandbox_orders__id__results_seed_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Order ID","title":"Id"},"description":"Order ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxResultsSeedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxResultsSeedResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/sandbox/orders/{id}":{"patch":{"tags":["Sandbox"],"summary":"Update order (any status allowed)","operationId":"update_order_sandbox_sandbox_orders__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Order ID","title":"Id"},"description":"Order ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxOrderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailResponse"},"example":{"id":"5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","panel_id":"VITD","kit_id":"KIT12345","status":41,"note":"Updated note.","created_at":"2025-07-04T17:12:27.235Z","updated_at":"2025-07-09T09:00:00.000Z"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResourceNotFoundResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Unprocessable Content"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}},"description":"Internal Server Error"}}}},"/sandbox/orders/status/batch":{"post":{"tags":["Sandbox"],"summary":"Bulk-update order status (any status allowed)","operationId":"batch_update_status_sandbox_sandbox_orders_status_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxOrderChangeStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderBatchUpdateResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInvalidTokenResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInsufficientScopeResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRateLimitedResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorServerErrorResponse"}}}}}}}},"components":{"schemas":{"Biomarker":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"unit":{"type":"string","title":"Unit"},"biomarker_category":{"$ref":"#/components/schemas/BiomarkerCategory"}},"type":"object","required":["id","name","description","unit","biomarker_category"],"title":"Biomarker"},"BiomarkerCategory":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["name","description"],"title":"BiomarkerCategory"},"BiomarkerResult":{"properties":{"biomarker_id":{"type":"string","title":"Biomarker Id"},"biomarker_name":{"type":"string","title":"Biomarker Name"},"biomarker_unit":{"type":"string","title":"Biomarker Unit"},"measured_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Measured Value","description":"Measured value; null when not available"}},"type":"object","required":["biomarker_id","biomarker_name","biomarker_unit"],"title":"BiomarkerResult"},"ErrorInsufficientScopeResponse":{"properties":{"code":{"type":"string","const":"INSUFFICIENT_SCOPE","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorInsufficientScopeResponse","example":{"code":"INSUFFICIENT_SCOPE","message":"Missing required scope."}},"ErrorInvalidTokenResponse":{"properties":{"code":{"type":"string","const":"INVALID_TOKEN","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorInvalidTokenResponse","example":{"code":"INVALID_TOKEN","message":"The provided token is invalid."}},"ErrorRateLimitedResponse":{"properties":{"code":{"type":"string","const":"RATE_LIMITED","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorRateLimitedResponse","example":{"code":"RATE_LIMITED","message":"Rate limit exceeded. Please try again later."}},"ErrorResourceNotFoundResponse":{"properties":{"code":{"type":"string","const":"RESOURCE_NOT_FOUND","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorResourceNotFoundResponse","example":{"code":"RESOURCE_NOT_FOUND","message":"Resource not found."}},"ErrorServerErrorResponse":{"properties":{"error":{"type":"string","const":"SERVER_ERROR","title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["error","message"],"title":"ErrorServerErrorResponse","example":{"error":{"code":"SERVER_ERROR","message":"An unexpected error occurred."}}},"Meta":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["total","limit","offset"],"title":"Meta"},"OrderBatchUpdateResponse":{"properties":{"data":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"OrderBatchUpdateResponse"},"OrderChangeStatusRequest":{"properties":{"order_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Order Ids"},"status":{"$ref":"#/components/schemas/OrderStatusUpdate","description":"Allowed status transitions:\n- `20`: PATIENT_KIT_RECEIVED – The patient has received the test kit\n- `21`: PATIENT_KIT_USED - The kit was used and prepared by the patient for return\n- `22`: PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient\n- `42`: CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n"}},"type":"object","required":["order_ids","status"],"title":"OrderChangeStatusRequest","example":{"order_ids":["8c86e4c8-ae5a-4812-aedf-119cbaf57e6f","c7f0f7d1-2f1a-4a7c-9c0b-5c4e9a1b2d3e"],"status":30}},"OrderCreateRequest":{"properties":{"panel_id":{"type":"string","title":"Panel Id","description":"ID of the panel this order belongs to"},"kit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kit Id","description":"Assigned Physikit kit identifier (if known at order time)"},"customer_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Order Id","description":"Primary reference in the customer’s system"},"customer_order_id_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Order Id 2","description":"Secondary reference in the customer’s system"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Patient’s first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Patient’s last name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"E-mail for the patient"},"address_line_1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line 1","description":"Street address (line 1)"},"address_line_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line 2","description":"Address complement (line 2)"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code","description":"Postal / ZIP code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO country name or code, e.g. “Germany”"},"consent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consent","description":"Whether the patient has given consent (true / false)"}},"type":"object","required":["panel_id"],"title":"OrderCreateRequest"},"OrderDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"panel_id":{"type":"string","title":"Panel Id"},"kit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kit Id"},"status":{"$ref":"#/components/schemas/OrderStatus","description":"Current order status:\n- `10`: ORDERED – Order created in the system.\n- `11`: KIT_SHIPPED – Test kit has been shipped to the customer.\n- `20`: PATIENT_KIT_RECEIVED – The patient has received the test kit.\n- `21`: PATIENT_KIT_USED – The kit was used and prepared by the patient for return.\n- `22`: PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient.\n- `30`: SAMPLES_RECEIVED – Samples received at the local logistics hub.\n- `31`: SAMPLES_SHIPPED – Samples forwarded to the lab.\n- `40`: LAB_SAMPLES_RECEIVED – Lab has received the samples.\n- `41`: LAB_SAMPLES_ANALYZED – Lab completed the analysis.\n- `42`: CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n- `98`: ARCHIVED – Order archived.\n- `99`: ISSUE – Order has encountered an issue.\n"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"address_line_1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line 1"},"address_line_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"consent":{"type":"boolean","title":"Consent","default":true},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","panel_id","kit_id","status","note","created_at","updated_at"],"title":"OrderDetailResponse"},"OrderListDataResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"panel_id":{"type":"string","title":"Panel Id"},"kit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kit Id"},"status":{"$ref":"#/components/schemas/OrderStatus","description":"Current order status:\n- `10`: ORDERED – Order created in the system.\n- `11`: KIT_SHIPPED – Test kit has been shipped to the customer.\n- `20`: PATIENT_KIT_RECEIVED – The patient has received the test kit.\n- `21`: PATIENT_KIT_USED – The kit was used and prepared by the patient for return.\n- `22`: PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient.\n- `30`: SAMPLES_RECEIVED – Samples received at the local logistics hub.\n- `31`: SAMPLES_SHIPPED – Samples forwarded to the lab.\n- `40`: LAB_SAMPLES_RECEIVED – Lab has received the samples.\n- `41`: LAB_SAMPLES_ANALYZED – Lab completed the analysis.\n- `42`: CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n- `98`: ARCHIVED – Order archived.\n- `99`: ISSUE – Order has encountered an issue.\n"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","panel_id","kit_id","status","created_at","updated_at"],"title":"OrderListDataResponse"},"OrderListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderListDataResponse"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"OrderListResponse"},"OrderResults":{"properties":{"order_id":{"type":"string","title":"Order Id"},"kit_id":{"type":"string","title":"Kit Id"},"panels":{"items":{"$ref":"#/components/schemas/PanelResults"},"type":"array","title":"Panels"}},"type":"object","required":["order_id","kit_id","panels"],"title":"OrderResults"},"OrderStatus":{"type":"integer","enum":[10,11,20,21,22,30,31,40,41,42,98,99],"title":"OrderStatus"},"OrderStatusUpdate":{"type":"integer","enum":[20,21,22,42],"title":"OrderStatusUpdate"},"OrderUpdateRequest":{"properties":{"status":{"$ref":"#/components/schemas/OrderStatusUpdate","description":"Allowed status transitions:\n- `20`: PATIENT_KIT_RECEIVED – The patient has received the test kit\n- `21`: PATIENT_KIT_USED - The kit was used and prepared by the patient for return\n- `22`: PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient\n- `42`: CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n"}},"type":"object","required":["status"],"title":"OrderUpdateRequest","example":{"status":30}},"PanelBiomarker":{"properties":{"biomarker":{"$ref":"#/components/schemas/Biomarker"},"reference_range":{"$ref":"#/components/schemas/ReferenceRange"}},"type":"object","required":["biomarker","reference_range"],"title":"PanelBiomarker"},"PanelListDataResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PanelListResponse"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"PanelListDataResponse"},"PanelListResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"PanelListResponse"},"PanelResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"biomarkers":{"items":{"$ref":"#/components/schemas/PanelBiomarker"},"type":"array","title":"Biomarkers"}},"type":"object","required":["id","name","biomarkers"],"title":"PanelResponse"},"PanelResults":{"properties":{"panel_id":{"type":"string","title":"Panel Id"},"panel_name":{"type":"string","title":"Panel Name"},"panel_biomarkers":{"items":{"$ref":"#/components/schemas/BiomarkerResult"},"type":"array","title":"Panel Biomarkers"}},"type":"object","required":["panel_id","panel_name","panel_biomarkers"],"title":"PanelResults"},"ReferenceRange":{"properties":{"range_min_value":{"type":"number","title":"Range Min Value"},"range_max_value":{"type":"number","title":"Range Max Value"},"range_optimal_min_value":{"type":"number","title":"Range Optimal Min Value"},"range_optimal_max_value":{"type":"number","title":"Range Optimal Max Value"},"range_acceptable_min_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Acceptable Min Value"},"range_acceptable_max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Acceptable Max Value"},"range_risky_min_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Risky Min Value"},"range_risky_max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Risky Max Value"},"range_value_min_open":{"type":"boolean","title":"Range Value Min Open"},"range_value_max_open":{"type":"boolean","title":"Range Value Max Open"}},"type":"object","required":["range_min_value","range_max_value","range_optimal_min_value","range_optimal_max_value","range_value_min_open","range_value_max_open"],"title":"ReferenceRange"},"ResultListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderResults"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"ResultListResponse"},"SandboxOrderChangeStatusRequest":{"properties":{"order_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Order Ids","description":"List of order IDs to update (sandbox accepts any valid order IDs)."},"status":{"type":"integer","title":"Status","description":"Target order status applied to all provided orders **(sandbox only)**. Sandbox permits setting **any** status code in any direction.\n\n**Status Lifecycle (Code → Description):**\n- `10` → ORDERED – Order created in the system.\n- `11` → KIT_SHIPPED – Test kit has been shipped to the customer.\n- `20` → PATIENT_KIT_RECEIVED – The patient has received the test kit.\n- `21` → PATIENT_KIT_USED – The kit was used and prepared by the patient for return.\n- `22` → PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient.\n- `30` → SAMPLES_RECEIVED – Samples received at the local logistics hub.\n- `31` → SAMPLES_SHIPPED – Samples forwarded to the lab.\n- `40` → LAB_SAMPLES_RECEIVED – Lab has received the samples.\n- `41` → LAB_SAMPLES_ANALYZED – Lab completed the analysis.\n- `42` → CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n- `98` → ARCHIVED – Order archived.\n- `99` → ISSUE – Order has encountered an issue.\n"}},"type":"object","required":["order_ids","status"],"title":"SandboxOrderChangeStatusRequest","example":{"order_ids":["5a3c9f6d-9a6e-4f98-b2a1-2b79c1a0b2b1","c7f0f7d1-2f1a-4a7c-9c0b-5c4e9a1b2d3e","0f6f5a7e-1e3a-4d9b-8f21-7f1bb40e9d9f"],"status":22}},"SandboxOrderUpdateRequest":{"properties":{"status":{"type":"integer","title":"Status","description":"Target order status **(sandbox only)**. In sandbox you may set **any** status code, including moving backward or skipping stages. No transition validation is applied.\n\n**Status Lifecycle (Code → Description):**\n- `10` → ORDERED – Order created in the system.\n- `11` → KIT_SHIPPED – Test kit has been shipped to the customer.\n- `20` → PATIENT_KIT_RECEIVED – The patient has received the test kit.\n- `21` → PATIENT_KIT_USED – The kit was used and prepared by the patient for return.\n- `22` → PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient.\n- `30` → SAMPLES_RECEIVED – Samples received at the local logistics hub.\n- `31` → SAMPLES_SHIPPED – Samples forwarded to the lab.\n- `40` → LAB_SAMPLES_RECEIVED – Lab has received the samples.\n- `41` → LAB_SAMPLES_ANALYZED – Lab completed the analysis.\n- `42` → CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n- `98` → ARCHIVED – Order archived.\n- `99` → ISSUE – Order has encountered an issue.\n"}},"type":"object","required":["status"],"title":"SandboxOrderUpdateRequest","example":{"status":41}},"SandboxResultsSeedRequest":{"properties":{"overwrite":{"type":"boolean","title":"Overwrite"}},"type":"object","required":["overwrite"],"title":"SandboxResultsSeedRequest"},"SandboxResultsSeedResponse":{"properties":{"order_id":{"type":"string","format":"uuid","title":"Order Id"},"replaced":{"type":"boolean","title":"Replaced"},"inserted_count":{"type":"integer","title":"Inserted Count"}},"type":"object","required":["order_id","replaced","inserted_count"],"title":"SandboxResultsSeedResponse"},"ValidationErrorCode":{"type":"string","enum":["REQUIRED","INVALID","INVALID_CHOICE","TOO_SHORT","TOO_LONG","MIN_VALUE","MAX_VALUE","PATTERN_MISMATCH","TYPE_MISMATCH","FORMAT_ERROR","UNIQUE","DATE_IN_PAST","DATE_IN_FUTURE","NOT_ALLOWED"],"title":"ValidationErrorCode"},"ValidationErrorDetail":{"properties":{"field":{"type":"string","title":"Field"},"code":{"$ref":"#/components/schemas/ValidationErrorCode"},"message":{"type":"string","title":"Message"}},"type":"object","required":["field","code","message"],"title":"ValidationErrorDetail"},"ValidationErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ValidationErrorDetail"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"ValidationErrorResponse","example":{"errors":[{"code":"INVALID_CHOICE","field":"status","message":"Invalid status choice."},{"code":"REQUIRED","field":"order_id","message":"This field is required."},{"code":"MIN_VALUE","field":"limit","message":"Limit must be greater than 0."}]}}},"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://auth.physikit.com/oauth2/token","scopes":{"orders.read":"Read orders","orders.write":"Create or update orders","panels.read":"Read panels","results.read":"Read biomarker results"}}}},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use the token from the step above:\n\n`Authorization: Bearer <access_token>`"}},"headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current time window (300/minute, 5000/hour)","schema":{"type":"integer","example":300}},"X-RateLimit-Remaining":{"description":"Number of requests left in the current window","schema":{"type":"integer","example":287}},"X-RateLimit-Reset":{"description":"UNIX timestamp when the current rate-limit window resets","schema":{"type":"integer","example":1728394837}}}},"tags":[{"name":"Introduction","description":"Welcome to the Physikit API documentation.\n\nThis API allows external partners to interact with Physikit's infrastructure. It provides access to orders, panels, and results.\n\n**Key Terms:**\n- **Order**: Represents a single test kit ordered by a Physikit customer. It tracks the full lifecycle from kit shipment to result delivery.\n- **Panel**: A predefined collection of biomarkers grouped together for analysis. Each order is associated with one or more panels.\n- **Result**: Contains the measured values for biomarkers within a panel, once the lab analysis is complete.\n\n## Authentication\n\nPhysikit uses **OAuth 2.0 Client‑Credentials** (see RFC 6749 §4.4 <https://www.rfc-editor.org/rfc/rfc6749#section-4.4>) for machine‑to‑machine access.\n\n1.  You will receive a `client_id` and `client_secret`. These are provisioned by Physikit and must be kept confidential.\n2.  Request an access token (valid for 60 min by default):\n\n```bash\ncurl -u \"<client_id>:<client_secret>\" \\\n     -d \"grant_type=client_credentials\" \\\n     -d \"scope=orders.read orders.write panels.read results.read\" \\\n     https://auth.physikit.com/oauth2/token\n```\n\n**Available OAuth2 Scopes:**\n- `orders.read` – Read order details and statuses\n- `orders.write` – Create or update test orders\n- `panels.read` – List and fetch available panels\n- `results.read` – Retrieve test result values\n\n3.  Call the API using the token:\n\n```bash\nexport TOKEN=\"<access_token>\"\ncurl -H \"Authorization: Bearer $TOKEN\" \\\n     https://api.physikit.com/v2/orders?limit=10\n```\n\n> Access tokens expire **60 minutes** after issuance. When a token expires, request a new one. The Client‑Credentials flow does **not** return refresh tokens.\n\n## Sandbox Environment\n\nThe sandbox environment uses the same base URL (`https://api.physikit.com/v2`) – simply request sandbox credentials and use them instead of production ones.\n\nFor support, contact: [admin@physikit.com](mailto:admin@physikit.com)\n"},{"name":"Panels","description":"Panels represent predefined groups of biomarkers used to structure lab tests. They define how a test is organized and which biomarkers are included, such as in a 'Vitamin D Panel'."},{"name":"Orders","description":"Orders represent individual test kits requested by customers. Each order tracks the lifecycle of a test kit — from creation and shipping, through sample collection and analysis, to final result delivery. Orders are updated over time as their status progresses through predefined stages.\n\n**Status Lifecycle (Code → Description):**\n- `10` → ORDERED – Order created in the system\n- `11` → KIT_SHIPPED – Test kit has been shipped to the customer\n- `20` → PATIENT_KIT_RECEIVED – The patient has received the test kit\n- `21` → PATIENT_KIT_USED – The kit was used and prepared by the patient for return\n- `22` → PATIENT_SAMPLES_SHIPPED – Samples were shipped back by the patient\n- `30` → SAMPLES_RECEIVED – Samples received at the local logistics hub\n- `31` → SAMPLES_SHIPPED – Samples forwarded to the lab\n- `40` → LAB_SAMPLES_RECEIVED – Lab has received the samples\n- `41` → LAB_SAMPLES_ANALYZED – Lab completed the analysis\n- `42` → CUSTOMER_RESULTS_RETRIEVED – Results have been retrieved by the integration partner.\n- `98` → ARCHIVED – Order archived\n- `99` → ISSUE – Order has encountered an issue\n\n**Allowed statuses that can be set:**\n- `20` → PATIENT_KIT_RECEIVED\n- `21` → PATIENT_KIT_USED\n- `22` → PATIENT_SAMPLES_SHIPPED\n- `42` → CUSTOMER_RESULTS_RETRIEVED\n"},{"name":"Results","description":"Results contain the biomarker measurements produced by laboratory analysis. A results payload is linked to one or more panels within an order and includes only the numeric values, units, and biomarker identifiers. Use this endpoint to batch‑fetch results for up to 100 orders; orders still in progress return an empty `panels` array."},{"name":"Sandbox","description":"The **Sandbox** collection provides endpoints intended for **testing and integration**. It mirrors production behavior but adds sandbox-specific capabilities:\n\n- Endpoints are exposed under `/sandbox`.\n- Use **sandbox credentials** and **sandbox data only** — they do **not** affect production records.\n- Orders in sandbox can transition **freely between any statuses**, back and forth, to simulate different lifecycle stages during development.\n- Other functionality (creating orders, listing, fetching results, etc.) behaves the same as in production.\n\n**Sandbox environment**\n\nThe sandbox environment uses the same base URL (`https://api.physikit.com/v2`) – simply request sandbox credentials and use them instead of production ones.\n\n**Note:** These additional capabilities (free status transitions, test data isolation) are only available in the **sandbox environment**. In production, status transitions follow the strict lifecycle rules.\n\nUse this environment whenever you integrate or test your systems before going live."},{"name":"Changelog","description":"### Version 2.0.3 (November 2025)\n\n**Improvements**\n- Corrected API documentation examples and descriptions\n\n---\n\n### Version 2.0.2 (October 2025)\n\n**Panel Identifiers**\n- `panel_id` now returns string identifiers (e.g. `\"VITD\"`, `\"BMP\"`) instead of UUIDs\n- **Migration**: Update your code to handle string identifiers\n  - Before: `\"panel_id\": \"2a9b2e0e-1d55-4b0a-9f3b-5dcf62a3d0c0\"`\n  - After: `\"panel_id\": \"VITD\"`\n\n---\n\n### Version 2.0.1 (September 2025)\n\n**Sandbox Endpoints**\n- Added `/sandbox` endpoints for testing and integration\n- Sandbox orders can transition freely between any status\n- Added `/sandbox/orders/{id}/results/seed` endpoint for generating test results\n\n---\n\n### Version 2.0.0 (August 2025)\n- Initial v2 API release with OAuth 2.0 authentication\n"}],"servers":[{"url":"https://api.physikit.com/v2","description":"API base URL – use your **production** or **sandbox** credentials"}],"security":[{"BearerAuth":[]}]}