{"openapi":"3.1.0","info":{"title":"BYD AGNSS 演示服务","description":"接口定义及签名规则为演示假设；不代表BYD已认可协议。合成RTCM不得用于导航。","version":"0.4.0-demo"},"servers":[{"url":"."}],"paths":{"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/cdn/auth":{"get":{"summary":"仅测试CDN远程鉴权决策，不返回星历文件","operationId":"cdn_auth_get","responses":{"200":{"description":"允许CDN继续处理本次请求","content":{"application/json":{"schema":{}}}},"403":{"description":"拒绝请求"},"503":{"description":"鉴权服务异常；CDN必须拒绝"}},"security":[{"CdnCallbackSecret":[]}],"x-cdn-allowed-host":"agnsstest.allystar.com"},"post":{"summary":"仅测试CDN远程鉴权决策，不返回星历文件","operationId":"cdn_auth_post","responses":{"200":{"description":"允许CDN继续处理本次请求","content":{"application/json":{"schema":{}}}},"403":{"description":"拒绝请求"},"503":{"description":"鉴权服务异常；CDN必须拒绝"}},"security":[{"CdnCallbackSecret":[]}],"x-cdn-allowed-host":"agnsstest.allystar.com"}},"/api/session":{"get":{"summary":"Session Status","operationId":"session_status_api_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Login","operationId":"login_api_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Logout","operationId":"logout_api_session_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/overview":{"get":{"summary":"Overview","operationId":"overview_api_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/devices":{"get":{"summary":"Devices","operationId":"devices_api_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]},"post":{"summary":"管理员原子创建模拟设备并可选激活","operationId":"create_device_api_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDevice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_DeviceState_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"AdminSession":[]}]}},"/api/orders":{"get":{"summary":"Orders","operationId":"orders_api_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/events":{"get":{"summary":"Events","operationId":"events_api_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/diagnostics":{"get":{"summary":"Diagnostics","operationId":"diagnostics_api_diagnostics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]},"post":{"summary":"Record Diagnostic","operationId":"record_diagnostic_api_diagnostics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Diagnostic"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/devices/{device_id}/actions":{"post":{"summary":"Actions","operationId":"actions_api_devices__device_id__actions_post","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/demo/run":{"post":{"summary":"Run Demo","operationId":"run_demo_api_demo_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/overview":{"get":{"summary":"Workflow Overview","operationId":"workflow_overview_api_workflow_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/runs":{"get":{"summary":"Workflow Runs","operationId":"workflow_runs_api_workflow_runs_get","parameters":[{"name":"deviceId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deviceid"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"enum":["cloud_demo","esp32"],"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/runs/{run_id}":{"get":{"summary":"Workflow Detail","operationId":"workflow_detail_api_workflow_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/runs/{run_id}/export":{"get":{"summary":"Workflow Export","operationId":"workflow_export_api_workflow_runs__run_id__export_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/run":{"post":{"summary":"Workflow Run","operationId":"workflow_run_api_workflow_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/agents":{"post":{"summary":"Workflow Register Agent","operationId":"workflow_register_agent_api_workflow_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/commands":{"post":{"summary":"Workflow Enqueue","operationId":"workflow_enqueue_api_workflow_commands_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCommandInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/workflow/commands/{command_id}":{"get":{"summary":"Workflow Command","operationId":"workflow_command_api_workflow_commands__command_id__get","parameters":[{"name":"command_id","in":"path","required":true,"schema":{"type":"string","title":"Command Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AdminSession":[]}]}},"/api/collector/heartbeat":{"post":{"summary":"Collector Heartbeat","operationId":"collector_heartbeat_api_collector_heartbeat_post","parameters":[{"name":"X-Collector-Token","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Collector-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectorHeartbeat"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CollectorToken":[]}],"x-evidence-type":"observed_serial_report"}},"/api/collector/report":{"post":{"summary":"Collector Report","operationId":"collector_report_api_collector_report_post","parameters":[{"name":"X-Collector-Token","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Collector-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectorReport"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CollectorToken":[]}],"x-evidence-type":"observed_serial_report"}},"/api/collector/commands":{"get":{"summary":"Collector Commands","operationId":"collector_commands_api_collector_commands_get","parameters":[{"name":"agentId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Agentid"}},{"name":"X-Collector-Token","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Collector-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CollectorToken":[]}],"x-evidence-type":"observed_serial_report"}},"/api/collector/commands/{command_id}/ack":{"post":{"summary":"Collector Ack","operationId":"collector_ack_api_collector_commands__command_id__ack_post","parameters":[{"name":"command_id","in":"path","required":true,"schema":{"type":"string","title":"Command Id"}},{"name":"X-Collector-Token","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Collector-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectorAck"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CollectorToken":[]}],"x-evidence-type":"observed_serial_report"}},"/api/source/status":{"get":{"summary":"Source Status","operationId":"source_status_api_source_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/source/probe":{"post":{"summary":"Probe Source","operationId":"probe_source_api_source_probe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/config":{"get":{"summary":"Config","operationId":"config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"AdminSession":[]}]}},"/api/v1/time":{"get":{"summary":"mTLS入口校时，无需HMAC或Bearer","operationId":"server_time_api_v1_time_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_TimeResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[]}]}},"/rest/device-status/sik/{sik}":{"post":{"summary":"BYD云端签名查询实时设备状态，不返回密码","operationId":"device_status_rest_device_status_sik__sik__post","parameters":[{"name":"sik","in":"path","required":true,"schema":{"type":"string","title":"Sik"}},{"name":"_sign","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名","title":" Sign"},"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名"},{"name":"X-Timestamp","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：当前UTC Unix秒数，允许偏差300秒","title":"X-Timestamp"},"description":"必需：当前UTC Unix秒数，允许偏差300秒"},{"name":"X-Nonce","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：8到128个字母数字_或-；重试必须使用新值","title":"X-Nonce"},"description":"必需：8到128个字母数字_或-；重试必须使用新值"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceIdentity"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_DeviceStatusResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"RequestHmac":[]}],"x-agnss-signature":"HMAC-SHA256 over METHOD\\nPATH\\nUTC_SECONDS\\nNONCE\\nSHA256(raw_body); lowercase hex; path excludes query and proxy prefix; shared secret belongs only to BYD cloud"}},"/rest/unbind/sik/{sik}":{"post":{"summary":"BYD云端幂等解绑并撤销旧Token，保留剩余权益","operationId":"unbind_rest_unbind_sik__sik__post","parameters":[{"name":"sik","in":"path","required":true,"schema":{"type":"string","title":"Sik"}},{"name":"_sign","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名","title":" Sign"},"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名"},{"name":"X-Timestamp","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：当前UTC Unix秒数，允许偏差300秒","title":"X-Timestamp"},"description":"必需：当前UTC Unix秒数，允许偏差300秒"},{"name":"X-Nonce","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：8到128个字母数字_或-；重试必须使用新值","title":"X-Nonce"},"description":"必需：8到128个字母数字_或-；重试必须使用新值"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUnbind"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_UnbindResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"RequestHmac":[]}],"x-agnss-signature":"HMAC-SHA256 over METHOD\\nPATH\\nUTC_SECONDS\\nNONCE\\nSHA256(raw_body); lowercase hex; path excludes query and proxy prefix; shared secret belongs only to BYD cloud"}},"/api/v1/diagnostics":{"post":{"summary":"设备上报诊断，设备身份仅从Bearer Token取得","operationId":"device_diagnostics_api_v1_diagnostics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceDiagnostic"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_DiagnosticResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"DeviceBearer":[]}]}},"/rest/purchase-bind/sik/{sik}":{"post":{"summary":"Purchase Bind","operationId":"purchase_bind_rest_purchase_bind_sik__sik__post","parameters":[{"name":"sik","in":"path","required":true,"schema":{"type":"string","title":"Sik"}},{"name":"_sign","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名","title":" Sign"},"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名"},{"name":"X-Timestamp","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：当前UTC Unix秒数，允许偏差300秒","title":"X-Timestamp"},"description":"必需：当前UTC Unix秒数，允许偏差300秒"},{"name":"X-Nonce","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：8到128个字母数字_或-；重试必须使用新值","title":"X-Nonce"},"description":"必需：8到128个字母数字_或-；重试必须使用新值"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bind"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_PurchaseResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"RequestHmac":[]}],"x-agnss-signature":"HMAC-SHA256 over METHOD\\nPATH\\nUTC_SECONDS\\nNONCE\\nSHA256(raw_body); lowercase hex; path excludes query and proxy prefix; shared secret belongs only to BYD cloud"}},"/rest/active-renew/sik/{sik}":{"post":{"summary":"Active Renew","operationId":"active_renew_rest_active_renew_sik__sik__post","parameters":[{"name":"sik","in":"path","required":true,"schema":{"type":"string","title":"Sik"}},{"name":"_sign","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名","title":" Sign"},"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名"},{"name":"X-Timestamp","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：当前UTC Unix秒数，允许偏差300秒","title":"X-Timestamp"},"description":"必需：当前UTC Unix秒数，允许偏差300秒"},{"name":"X-Nonce","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：8到128个字母数字_或-；重试必须使用新值","title":"X-Nonce"},"description":"必需：8到128个字母数字_或-；重试必须使用新值"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_ActivationResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"RequestHmac":[]}],"x-agnss-signature":"HMAC-SHA256 over METHOD\\nPATH\\nUTC_SECONDS\\nNONCE\\nSHA256(raw_body); lowercase hex; path excludes query and proxy prefix; shared secret belongs only to BYD cloud"}},"/rest/unsubscribe/sik/{sik}":{"post":{"summary":"Unsubscribe","operationId":"unsubscribe_rest_unsubscribe_sik__sik__post","parameters":[{"name":"sik","in":"path","required":true,"schema":{"type":"string","title":"Sik"}},{"name":"_sign","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名","title":" Sign"},"description":"必需：5段canonical的HMAC-SHA256小写十六进制签名"},{"name":"X-Timestamp","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：当前UTC Unix秒数，允许偏差300秒","title":"X-Timestamp"},"description":"必需：当前UTC Unix秒数，允许偏差300秒"},{"name":"X-Nonce","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：8到128个字母数字_或-；重试必须使用新值","title":"X-Nonce"},"description":"必需：8到128个字母数字_或-；重试必须使用新值"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancel"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_CancelResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"RequestHmac":[]}],"x-agnss-signature":"HMAC-SHA256 over METHOD\\nPATH\\nUTC_SECONDS\\nNONCE\\nSHA256(raw_body); lowercase hex; path excludes query and proxy prefix; shared secret belongs only to BYD cloud"}},"/api/v1/register":{"post":{"summary":"Register","operationId":"register_api_v1_register_post","parameters":[{"name":"_sign","in":"query","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：5段HMAC-SHA256小写十六进制签名","title":" Sign"},"description":"必需：5段HMAC-SHA256小写十六进制签名"},{"name":"X-Timestamp","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：UTC Unix秒数","title":"X-Timestamp"},"description":"必需：UTC Unix秒数"},{"name":"X-Nonce","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"必需：唯一nonce，重试换新值","title":"X-Nonce"},"description":"必需：唯一nonce，重试换新值"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bind"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_PurchaseResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"RequestHmac":[]}],"x-agnss-signature":"HMAC-SHA256 over METHOD\\nPATH\\nUTC_SECONDS\\nNONCE\\nSHA256(raw_body); lowercase hex; path excludes query and proxy prefix; shared secret belongs only to BYD cloud"}},"/api/v1/token":{"post":{"summary":"Issue Token","operationId":"issue_token_api_v1_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_TokenResult_"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[]}]}},"/ephemeris/HD_GPS_BDS_GAL_GLO_QZS.hdb":{"get":{"summary":"Ephemeris","operationId":"ephemeris_ephemeris_HD_GPS_BDS_GAL_GLO_QZS_hdb_get","responses":{"200":{"description":"真实HDB二进制，未经SDK语义验证，未配置或失败时503","content":{"application/json":{"schema":{}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"DeviceBearer":[]}]}},"/ephemeris/HD_GPS_BDS_GAL_GLO_QZS.rtcm":{"get":{"summary":"Ephemeris","operationId":"ephemeris_ephemeris_HD_GPS_BDS_GAL_GLO_QZS_rtcm_get","responses":{"200":{"description":"RTCM3二进制，检查X-AGNSS-Data-Mode区分合成和文件源","content":{"application/json":{"schema":{}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"签名、Token或凭据无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"未通过mTLS或设备权益无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"设备或订单不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"幂等冲突、nonce重放或设备状态冲突","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数或到期日期无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"数据源不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MutualTLS":[],"DeviceBearer":[]}]}}},"components":{"schemas":{"Activate":{"properties":{"deviceId":{"type":"string","maxLength":128,"minLength":1,"title":"Deviceid"},"deviceType":{"type":"string","maxLength":64,"minLength":1,"title":"Devicetype"},"appKey":{"type":"string","maxLength":128,"minLength":1,"title":"Appkey"},"customerOrderId":{"type":"string","maxLength":128,"minLength":1,"title":"Customerorderid"},"duration":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Duration"},"unit":{"type":"integer","title":"Unit","default":6},"dueDate":{"type":"string","title":"Duedate"}},"additionalProperties":false,"type":"object","required":["deviceId","deviceType","appKey","customerOrderId","duration","dueDate"],"title":"Activate"},"ActivationResult":{"properties":{"serverNo":{"type":"string","title":"Serverno"},"isActive":{"type":"integer","title":"Isactive"},"dueDate":{"type":"string","title":"Duedate"},"bindingDate":{"type":"string","title":"Bindingdate"},"activeDate":{"type":"string","title":"Activedate"},"deviceId":{"type":"string","title":"Deviceid"},"deviceType":{"type":"string","title":"Devicetype"},"customerOrderId":{"type":"string","title":"Customerorderid"},"orderId":{"type":"string","title":"Orderid"}},"type":"object","required":["serverNo","isActive","dueDate","bindingDate","activeDate","deviceId","deviceType","customerOrderId","orderId"],"title":"ActivationResult"},"Bind":{"properties":{"deviceId":{"type":"string","maxLength":128,"minLength":1,"title":"Deviceid"},"deviceType":{"type":"string","maxLength":64,"minLength":1,"title":"Devicetype"},"appKey":{"type":"string","maxLength":128,"minLength":1,"title":"Appkey"},"customerOrderId":{"type":"string","maxLength":128,"minLength":1,"title":"Customerorderid"}},"additionalProperties":false,"type":"object","required":["deviceId","deviceType","appKey","customerOrderId"],"title":"Bind"},"Cancel":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"customerOrderId":{"type":"string","title":"Customerorderid"}},"additionalProperties":false,"type":"object","required":["deviceId","customerOrderId"],"title":"Cancel"},"CancelResult":{"properties":{"refuelOrder":{"type":"string","title":"Refuelorder"},"customerOrderId":{"type":"string","title":"Customerorderid"},"deviceId":{"type":"string","title":"Deviceid"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"tokensRevoked":{"type":"boolean","title":"Tokensrevoked"}},"type":"object","required":["refuelOrder","customerOrderId","deviceId","dueDate","tokensRevoked"],"title":"CancelResult"},"CollectorAck":{"properties":{"agentId":{"type":"string","maxLength":64,"minLength":1,"title":"Agentid"},"status":{"type":"string","enum":["running","succeeded","failed"],"title":"Status"},"runId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Runid"},"error":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["agentId","status"],"title":"CollectorAck"},"CollectorHeartbeat":{"properties":{"agentId":{"type":"string","maxLength":64,"minLength":1,"title":"Agentid"},"state":{"type":"string","enum":["idle","running","disconnected"],"title":"State"},"relayTransport":{"type":"string","enum":["ssh","tcp"],"title":"Relaytransport"},"port":{"type":"string","const":"COM13","title":"Port"}},"additionalProperties":false,"type":"object","required":["agentId","state","relayTransport","port"],"title":"CollectorHeartbeat"},"CollectorReport":{"properties":{"agentId":{"type":"string","maxLength":64,"minLength":1,"title":"Agentid"},"report":{"additionalProperties":true,"type":"object","title":"Report"}},"additionalProperties":false,"type":"object","required":["agentId","report"],"title":"CollectorReport"},"CreateDevice":{"properties":{"deviceId":{"type":"string","maxLength":128,"minLength":1,"title":"Deviceid","examples":["TEST_DEVICE_001"]},"deviceType":{"type":"string","maxLength":64,"minLength":1,"title":"Devicetype","examples":["TBOX"]},"months":{"type":"integer","maximum":600.0,"minimum":0.0,"title":"Months","description":"0仅绑定；1到600表示创建并激活指定月数","default":12}},"additionalProperties":false,"type":"object","required":["deviceId","deviceType"],"title":"CreateDevice"},"DemoInput":{"properties":{"scenario":{"type":"string","enum":["happy_path","expired","cancelled","invalid_token","bad_signature","idempotency"],"title":"Scenario"}},"additionalProperties":false,"type":"object","required":["scenario"],"title":"DemoInput"},"DeviceAction":{"properties":{"action":{"type":"string","enum":["activate","renew","cancel","unbind"],"title":"Action"},"months":{"type":"integer","maximum":600.0,"minimum":1.0,"title":"Months","default":12}},"additionalProperties":false,"type":"object","required":["action"],"title":"DeviceAction"},"DeviceDiagnostic":{"properties":{"code":{"type":"string","maxLength":40,"minLength":1,"title":"Code","examples":["1401"]},"message":{"type":"string","maxLength":1000,"title":"Message","default":"","examples":["星历获取超时，将按策略重试"]}},"additionalProperties":false,"type":"object","required":["code"],"title":"DeviceDiagnostic"},"DeviceIdentity":{"properties":{"deviceId":{"type":"string","maxLength":128,"minLength":1,"title":"Deviceid","examples":["TEST_DEVICE_001"]},"deviceType":{"type":"string","maxLength":64,"minLength":1,"title":"Devicetype","examples":["TBOX"]}},"additionalProperties":false,"type":"object","required":["deviceId","deviceType"],"title":"DeviceIdentity"},"DeviceState":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"deviceType":{"type":"string","title":"Devicetype"},"serverNo":{"type":"string","title":"Serverno"},"isActive":{"type":"integer","title":"Isactive","description":"0不可服务，1当前已绑定且权益有效"},"bindingState":{"type":"integer","title":"Bindingstate","description":"0未绑定，1已绑定"},"status":{"type":"integer","title":"Status","description":"演示枚举：0可服务，2当前不可服务"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"createdAt":{"type":"string","title":"Createdat"},"lastSeen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastseen"}},"type":"object","required":["deviceId","deviceType","serverNo","isActive","bindingState","status","dueDate","createdAt","lastSeen"],"title":"DeviceState","examples":[{"bindingState":1,"createdAt":"2026-11-09T08:00:00Z","deviceId":"TEST_DEVICE_001","deviceType":"TBOX","dueDate":"2027-11-09T08:00:00Z","isActive":1,"serverNo":"DEMO-EXAMPLE","status":0}]},"DeviceStatusResult":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"deviceType":{"type":"string","title":"Devicetype"},"serverNo":{"type":"string","title":"Serverno"},"isActive":{"type":"integer","title":"Isactive","description":"0不可服务，1当前已绑定且权益有效"},"bindingState":{"type":"integer","title":"Bindingstate","description":"0未绑定，1已绑定"},"status":{"type":"integer","title":"Status","description":"演示枚举：0可服务，2当前不可服务"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"createdAt":{"type":"string","title":"Createdat"},"lastSeen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastseen"},"serverTime":{"type":"integer","title":"Servertime","description":"当前UTC Unix秒数"},"hasSubscriptionHistory":{"type":"boolean","title":"Hassubscriptionhistory","description":"是否曾有激活/续费订单，含已取消和已到期订单"},"entitlementCycleStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitlementcyclestartedat","description":"当前计费周期的UTC日历月计算锚点"},"entitlementMonths":{"type":"integer","title":"Entitlementmonths","description":"该周期仍有效的订单月数之和"}},"type":"object","required":["deviceId","deviceType","serverNo","isActive","bindingState","status","dueDate","createdAt","lastSeen","serverTime","hasSubscriptionHistory","entitlementCycleStartedAt","entitlementMonths"],"title":"DeviceStatusResult","examples":[{"bindingState":1,"createdAt":"2026-11-09T08:00:00Z","deviceId":"TEST_DEVICE_001","deviceType":"TBOX","dueDate":"2027-11-09T08:00:00Z","isActive":1,"serverNo":"DEMO-EXAMPLE","status":0}]},"Diagnostic":{"properties":{"deviceId":{"type":"string","maxLength":128,"title":"Deviceid"},"code":{"type":"string","maxLength":40,"minLength":1,"title":"Code"},"message":{"type":"string","maxLength":1000,"title":"Message","default":""}},"additionalProperties":false,"type":"object","required":["deviceId","code"],"title":"Diagnostic"},"DiagnosticResult":{"properties":{"id":{"type":"integer","title":"Id"},"time":{"type":"string","title":"Time"},"deviceId":{"type":"string","title":"Deviceid"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","time","deviceId","code","message"],"title":"DiagnosticResult"},"Envelope_ActivationResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/ActivationResult"}},"type":"object","required":["data"],"title":"Envelope[ActivationResult]"},"Envelope_CancelResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/CancelResult"}},"type":"object","required":["data"],"title":"Envelope[CancelResult]"},"Envelope_DeviceState_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/DeviceState"}},"type":"object","required":["data"],"title":"Envelope[DeviceState]"},"Envelope_DeviceStatusResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/DeviceStatusResult"}},"type":"object","required":["data"],"title":"Envelope[DeviceStatusResult]"},"Envelope_DiagnosticResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/DiagnosticResult"}},"type":"object","required":["data"],"title":"Envelope[DiagnosticResult]"},"Envelope_PurchaseResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/PurchaseResult"}},"type":"object","required":["data"],"title":"Envelope[PurchaseResult]"},"Envelope_TimeResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/TimeResult"}},"type":"object","required":["data"],"title":"Envelope[TimeResult]"},"Envelope_TokenResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/TokenResult"}},"type":"object","required":["data"],"title":"Envelope[TokenResult]"},"Envelope_UnbindResult_":{"properties":{"code":{"type":"integer","title":"Code","default":0},"msg":{"type":"string","title":"Msg","default":"成功"},"data":{"$ref":"#/components/schemas/UnbindResult"}},"type":"object","required":["data"],"title":"Envelope[UnbindResult]"},"ErrorEnvelope":{"properties":{"code":{"type":"integer","title":"Code"},"msg":{"type":"string","title":"Msg"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","msg"],"title":"ErrorEnvelope"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Login":{"properties":{"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"additionalProperties":false,"type":"object","required":["password"],"title":"Login"},"PurchaseResult":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"deviceType":{"type":"string","title":"Devicetype"},"serverNo":{"type":"string","title":"Serverno"},"isActive":{"type":"integer","title":"Isactive","description":"0不可服务，1当前已绑定且权益有效"},"bindingState":{"type":"integer","title":"Bindingstate","description":"0未绑定，1已绑定"},"status":{"type":"integer","title":"Status","description":"演示枚举：0可服务，2当前不可服务"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"createdAt":{"type":"string","title":"Createdat"},"lastSeen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastseen"},"password":{"type":"string","title":"Password","description":"仅返回给BYD云；后续安全交付给对应设备，禁止写日志","examples":["TEST_PASSWORD_PLACEHOLDER"]},"bindingDate":{"type":"string","title":"Bindingdate"},"serverType":{"type":"integer","title":"Servertype","description":"演示AGNSS类型为0，待正式确认"}},"type":"object","required":["deviceId","deviceType","serverNo","isActive","bindingState","status","dueDate","createdAt","lastSeen","password","bindingDate","serverType"],"title":"PurchaseResult","examples":[{"bindingState":1,"createdAt":"2026-11-09T08:00:00Z","deviceId":"TEST_DEVICE_001","deviceType":"TBOX","dueDate":"2027-11-09T08:00:00Z","isActive":1,"serverNo":"DEMO-EXAMPLE","status":0}]},"SignedUnbind":{"properties":{"deviceId":{"type":"string","maxLength":128,"minLength":1,"title":"Deviceid","examples":["TEST_DEVICE_001"]},"deviceType":{"type":"string","maxLength":64,"minLength":1,"title":"Devicetype","examples":["TBOX"]},"customerOrderId":{"type":"string","maxLength":128,"minLength":1,"title":"Customerorderid","examples":["TEST_UNBIND_001"]}},"additionalProperties":false,"type":"object","required":["deviceId","deviceType","customerOrderId"],"title":"SignedUnbind"},"TimeResult":{"properties":{"serverTime":{"type":"integer","title":"Servertime","description":"UTC Unix秒数，与当前5段HMAC时间戳单位一致","examples":[1794211200]},"timestampUnit":{"type":"string","const":"seconds","title":"Timestampunit"},"windowSeconds":{"type":"integer","title":"Windowseconds","examples":[300]},"utcTime":{"type":"string","title":"Utctime","examples":["2026-11-09T08:00:00Z"]}},"type":"object","required":["serverTime","timestampUnit","windowSeconds","utcTime"],"title":"TimeResult"},"TokenInput":{"properties":{"account":{"type":"string","title":"Account"},"password":{"type":"string","title":"Password"},"deviceId":{"type":"string","title":"Deviceid"},"deviceType":{"type":"string","title":"Devicetype"}},"additionalProperties":false,"type":"object","required":["account","password","deviceId","deviceType"],"title":"TokenInput"},"TokenResult":{"properties":{"token":{"type":"string","title":"Token","description":"演示签名Token，作为Bearer使用；不是标准JWT"},"accessToken":{"type":"string","title":"Accesstoken","description":"与token相同，兼容字段"},"tokenType":{"type":"string","const":"Bearer","title":"Tokentype"},"expiresIn":{"type":"integer","title":"Expiresin"},"expiresAt":{"type":"string","title":"Expiresat"}},"type":"object","required":["token","accessToken","tokenType","expiresIn","expiresAt"],"title":"TokenResult"},"UnbindResult":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"deviceType":{"type":"string","title":"Devicetype"},"customerOrderId":{"type":"string","title":"Customerorderid"},"bindingState":{"type":"integer","title":"Bindingstate"},"tokensRevoked":{"type":"boolean","title":"Tokensrevoked"},"unboundAt":{"type":"string","title":"Unboundat"}},"type":"object","required":["deviceId","deviceType","customerOrderId","bindingState","tokensRevoked","unboundAt"],"title":"UnbindResult"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkflowAgentInput":{"properties":{"agentId":{"type":"string","maxLength":64,"minLength":1,"title":"Agentid"},"deviceId":{"type":"string","maxLength":128,"minLength":1,"title":"Deviceid"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"}},"additionalProperties":false,"type":"object","required":["agentId","deviceId","label"],"title":"WorkflowAgentInput"},"WorkflowCommandInput":{"properties":{"agentId":{"type":"string","maxLength":64,"minLength":1,"title":"Agentid"},"action":{"type":"string","const":"rerun","title":"Action"}},"additionalProperties":false,"type":"object","required":["agentId","action"],"title":"WorkflowCommandInput"},"WorkflowRunInput":{"properties":{"source":{"type":"string","const":"cloud_demo","title":"Source"},"format":{"type":"string","enum":["hdb","rtcm"],"title":"Format","default":"rtcm"}},"additionalProperties":false,"type":"object","required":["source"],"title":"WorkflowRunInput"}},"securitySchemes":{"MutualTLS":{"type":"mutualTLS","description":"实际TLS客户端证书认证；由可信loopback代理验证。禁止客户端伪造内部X-AGNSS-MTLS或X-AGNSS-Proxy-Secret头。"},"RequestHmac":{"type":"apiKey","in":"query","name":"_sign","description":"BYD云端5段HMAC-SHA256，配合X-Timestamp(秒)和X-Nonce；appSecret不得放入车端。"},"DeviceBearer":{"type":"http","scheme":"bearer","description":"由/api/v1/token签发的设备Token；签发时需要账号密码与mTLS。"},"AdminSession":{"type":"apiKey","in":"cookie","name":"agnss_admin","description":"管理员会话，仅用于模拟设备管理和演示，不替代设备业务认证。"},"CollectorToken":{"type":"apiKey","in":"header","name":"X-Collector-Token","description":"管理员登记后一次发放的采集令牌，仅可上传/控制其绑定的agent和device；不是硬件不可伪造证明。"},"CdnCallbackSecret":{"type":"apiKey","in":"header","name":"X-CDN-Auth-Secret","description":"CDN固定注入的独立随机秘密，仅认证回调来源，不是车端Token或mTLS代理标记。"}}}}