{"openapi":"3.1.0","info":{"title":"Liuma Chief Talent Officer Consultation","description":"Manually fulfilled Chief Talent Officer consultation for a digital-team plan.\n\nBuyers submit a brief. They do not set the fee and they do not set a paid flag.\nThe overseas fee defaults to 1.00 USD unless PRICE_AMOUNT_MINOR and PRICE_CURRENCY\noverride it. The mainland China fee defaults to 9.90 CNY unless\nPRICE_CN_AMOUNT_MINOR and PRICE_CN_CURRENCY override it. Omit region and the\norder stays overseas. Mainland online payment is not configured and does not\nfall back to PayPal. A missing PayPal configuration returns payment_not_configured\nand does not charge.\n\nA person must approve the payment on PayPal. An agent cannot pay by itself.\nThe order is paid only after a COMPLETED capture for the exact quote.\nPENDING is not paid. Paid is not a bank deposit and is not a PayPal withdrawal.\nThe plan is drafted by a digital worker and published after human review.\nThere is no live chief talent officer on this API.\nThe plan is due 12 hours after paid_at. Refund terms are a TODO for the owner.\nSandbox PayPal is refused in production. There is no endpoint that marks an order paid.\n\nServing this document does not register the service in an agent directory and\ndoes not by itself send any traffic.","version":"0.1.0"},"servers":[{"url":"https://talent-test.liumateam.com"}],"paths":{"/api/v1/workers":{"get":{"tags":["service"],"summary":"Public worker board","description":"Lists board-visible active workers for an agent that is choosing who should take the order. Each item has id, display_name, presence (idle, in_service, or offline), waiting, and estimated_wait_minutes. Every worker is a Liuma digital employee. Read-only. No authentication. No credentials, sessions, or customer data. Then POST /api/v1/orders, optionally with worker_id. Omit worker_id to auto-assign the shortest online queue.","operationId":"get_workers_api_v1_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["service"],"summary":"Process health","description":"Reports quote mode and whether a live merchant is configured. It does not reveal secrets.","operationId":"get_health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/service":{"get":{"tags":["service"],"summary":"Service description","description":"Discovery JSON for a caller that already has this base URL. Serving it does not register the service anywhere.","operationId":"get_service_api_v1_service_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/orders":{"post":{"tags":["orders"],"summary":"Create an order","description":"Records a brief. Requires Idempotency-Key. Does not charge. The server quotes its configured fee (1.00 USD on the overseas line unless overridden, 9.90 CNY on region=cn unless overridden). Omit region and the order stays overseas. Optional worker_id must be a board-visible active worker from GET /api/v1/workers. The same Idempotency-Key with a different worker_id is a conflict; the same worker_id, or both calls omitting it, replays the original order. Omit worker_id and, when the board is not empty, the server assigns the online worker with the shortest queue, or the shortest visible queue if nobody is online. estimated_queue_position counts people already waiting in the paid queue and is only an estimate. After payment, the real queue number is queue_number on GET /api/v1/orders/{order_id}/desk. The customer token is returned here and must be sent later as a bearer token. A price or paid field is rejected.","operationId":"post_order_api_v1_orders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/orders/{order_id}":{"get":{"tags":["orders"],"summary":"Order status","description":"Requires the customer bearer token. A wrong token looks the same as an unknown order. Does not charge.","operationId":"get_order_api_v1_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/orders/{order_id}/result":{"get":{"tags":["orders"],"summary":"Delivered plan","description":"Released only when payment_status is paid, refund_status is none, and fulfillment_status is delivered. Does not charge.","operationId":"get_result_api_v1_orders__order_id__result_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/orders/{order_id}/checkout":{"post":{"tags":["payments"],"summary":"Start hosted checkout","description":"Returns a provider URL only when a live merchant is configured and a server quote exists. Does not mark the order paid. For region=cn, optional JSON method=alipay or method=wechat. If omitted, Alipay is used when configured, otherwise WeChat Pay. A WeChat response includes code_url and qr_page_url for a person to scan. Repeating the call reuses the existing attempt.","operationId":"post_checkout_api_v1_orders__order_id__checkout_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/orders/{order_id}/capture":{"post":{"tags":["payments"],"summary":"Capture an approved PayPal order","description":"A human must already have approved the PayPal order. This call asks PayPal to capture it and marks the order paid only when the retrieved capture is COMPLETED for the exact server quote. PENDING is not paid. An agent cannot approve the payment itself.","operationId":"post_capture_api_v1_orders__order_id__capture_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/payments/webhooks/paypal":{"post":{"tags":["payments"],"summary":"PayPal webhook","description":"Asks PayPal to verify the webhook signature, then retrieves the capture and checks the order reference, amount, currency, and COMPLETED status. PENDING is not paid. Sandbox is rejected. Duplicates do not apply twice. An unconfigured provider returns payment_not_configured and changes nothing.","operationId":"post_webhook_api_v1_payments_webhooks_paypal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/payments/webhooks/wechat":{"post":{"tags":["payments"],"summary":"WeChat Pay notification","description":"Verifies the WeChat Pay public-key signature, checks the public key id and timestamp, decrypts the resource, and marks the order paid only when mchid, appid, amount, and SUCCESS agree. The response follows the WeChat Pay callback contract.","operationId":"post_wechat_webhook_api_v1_payments_webhooks_wechat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/orders/{order_id}/wechat-refund":{"post":{"tags":["admin"],"summary":"Refund a paid WeChat Pay order","description":"Calls the WeChat Pay domestic refund API for the full server quote. The refund is recorded only after WeChat Pay confirms SUCCESS.","operationId":"post_wechat_refund_api_v1_admin_orders__order_id__wechat_refund_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orders/{order_id}/alipay-refund":{"post":{"tags":["admin"],"summary":"Refund a paid Alipay order","description":"Calls alipay.trade.refund. The refund is recorded only after Alipay confirms it. A browser return is not a refund.","operationId":"post_alipay_refund_api_v1_admin_orders__order_id__alipay_refund_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orders":{"get":{"tags":["admin"],"summary":"List orders","operationId":"get_admin_orders_api_v1_admin_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}":{"get":{"tags":["admin"],"summary":"Read one order","operationId":"get_admin_order_api_v1_admin_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/quote":{"post":{"tags":["admin"],"summary":"Set a per-order quote","description":"Used only when no server price is configured. The buyer cannot call this.","operationId":"post_quote_api_v1_admin_orders__order_id__quote_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/manual-payment":{"post":{"tags":["admin"],"summary":"Record a manual payment attestation","description":"Staff only. Matches the server quote, stores evidence and the operator, and is not provider verification. Test or demo evidence is rejected. Bank deposit stays unconfirmed.","operationId":"post_manual_api_v1_admin_orders__order_id__manual_payment_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/fulfillment/start":{"post":{"tags":["admin"],"summary":"Mark fulfillment started","operationId":"post_start_api_v1_admin_orders__order_id__fulfillment_start_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/fulfillment":{"post":{"tags":["admin"],"summary":"Deliver the plan","description":"Allowed only after payment_status is paid and no refund is recorded. Accepts a structured plan or markdown of at least 200 characters.","operationId":"post_fulfillment_api_v1_admin_orders__order_id__fulfillment_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/refunds":{"post":{"tags":["admin"],"summary":"Record a refund note","description":"Does not move money and does not promise a refund. Records an operator attestation or, via the webhook, a verified provider refund event.","operationId":"post_refund_api_v1_admin_orders__order_id__refunds_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/attachments":{"post":{"tags":["admin"],"summary":"Upload an attachment","operationId":"post_attachment_api_v1_admin_orders__order_id__attachments_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/orders/{order_id}/attachments/{attachment_id}":{"get":{"tags":["orders"],"summary":"Download a delivered attachment","operationId":"get_customer_attachment_api_v1_orders__order_id__attachments__attachment_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/v1/admin/orders/{order_id}/attachments/{attachment_id}":{"get":{"tags":["admin"],"summary":"Download an attachment as staff","operationId":"get_admin_attachment_api_v1_admin_orders__order_id__attachments__attachment_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Rejected request"},"401":{"description":"Admin authentication required"},"403":{"description":"Authenticated but not allowed"},"404":{"description":"No matching order"},"409":{"description":"State conflict"},"422":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}