{"openapi":"3.1.0","info":{"title":"GemstoneAI Enterprise API","description":"**GemstoneAI Enterprise API**: Scan API, Intake and Verify for businesses that handle jewelry. Guides and code samples: https://gemstoneaiapp.com/enterprise/docs\n\n## Authentication\n\nEvery request must include a `gsk_live_*` or `gsk_test_*` API key as a Bearer token:\n\n```http\nAuthorization: Bearer gsk_test_XXXXXXXXYYYYYYYYYYYYYYYYYYYYYYYY\n```\n\nKeys are issued per workspace by the GemstoneAI team. Request a sandbox (`gsk_test_`) key at https://gemstoneaiapp.com/enterprise/docs#sandbox-key.\n\n## Quotas\n\nCompleted live assessments count against a monthly quota set per workspace (UTC months). `GET /assessment-usage` reports it; when it is used, `POST /case-assessments` answers 429 `quota_exhausted` with `resets_at` and `Retry-After`. Reads, replays and sandbox runs never count.\n\n## Sandbox quickstart\n\nUse a `gsk_test_` key: every route behaves as in production, but photo assessments use a stub engine, cost nothing and never count against quota. Responses carry `GemstoneAI-API-Version`.\n\n**1. Store a case** under your own reference. Sending it again changes nothing.\n\n```bash\ncurl -X POST $BASE/cases -H \"Authorization: Bearer $KEY\" -H 'Content-Type: application/json' -d '{\n  \"external_id\": \"SKU-1001\", \"title\": \"14k gold diamond ring\",\n  \"statement\": \"Gold plated sterling silver ring with CZ, size 7\",\n  \"claims\": [{\"field\": \"metal\", \"value\": \"14k solid gold\", \"source_kind\": \"stated\"}]}'\n```\n\n**2. Assess it.** Text only returns 201 with the result. With photos it returns 202; poll step 3. Send `Idempotency-Key` so a retried request is never run twice.\n\n```bash\ncurl -X POST $BASE/case-assessments -H \"Authorization: Bearer $KEY\" \\\n  -H 'Idempotency-Key: 5f1c-sku-1001-r1' -F external_id=SKU-1001 -F images=@ring1.jpg\n```\n\n**3. Poll** `GET /case-assessments/{id}` until `status` is `completed` or `failed`. While `error_code` is `retrying`, the run is retried automatically (at most 3 attempts; `next_attempt_at` says when). Runs survive our restarts.\n\n**4. Review and record outcomes**: `/review/*` to correct and decide, `POST /case-outcomes` for what you actually did, `GET /pilot-ledger` for the totals.\n\n**Usage**: `GET /assessment-usage` (this month against your quota) and `GET /assessment-units?format=csv` (every completed unit). A unit is one completed assessment; replays and reads are free.\n\n**Listing checks** (`listings:check`): `POST /listing-checks` with a title, description, item specifics and variant options returns conflicts about metal, stone origin and treatment, each with a code, severity, evidence pointers (`title`, `item_specifics.Metal`, `variants[1].options.Metal` plus a character span) and a proposed correction. Each variant is checked on its own; identical claims across options are never flagged. `POST /listing-checks/batch` takes up to 100. Rules only: nothing is stored.\n\n**Listing policy** (`listings:admin`): `POST /rule-packs` publishes a new version of your rules (each code to `block`, `warn`, `escalate` or `off`) for a market, category and effective date; `status: shadow` runs it beside the live pack without deciding anything. `POST /listing-reviews` (`listings:review`) records a decision naming its `checker_version` and `pack_version`, plus what the shadow pack would have done; `mode: preview` (`listings:check`) returns seller messages instead. Signed or named-house items escalate. `POST /listing-reviews/{id}/flags/{flag_id}` dismisses, upholds or escalates a flag (clearing an escalation needs `listings:escalations`); `supersedes` on a resubmission marks fixed flags corrected. `GET /listing-reviews/metrics` reports completion time, false prompts, incremental upheld flags and shadow disagreement.\n\n**Rehearse failures in the sandbox** by putting a phrase in the case statement: `sandbox:fail_once` fails the first attempt and then completes; `sandbox:fail` fails every attempt.\n\n| Situation | Response |\n|---|---|\n| Good input, text only | 201, `status: completed` |\n| Good input, photos | 202, then `completed` on poll |\n| Same request or same key and body again | 200, the first assessment, not billed |\n| Same `Idempotency-Key`, different body | 409 `idempotency_conflict` |\n| No statement, claims or photos | 422 `missing_evidence` |\n| Monthly assessment quota used | 429 `quota_exhausted` with `resets_at` |\n| Another workspace's case or assessment | 404 |\n\n## Disclaimers\n\nAssessments are AI-generated, preliminary and intended to support your own review. They are NOT a substitute for a certified gemological appraisal and should not be relied on for insurance, legal, or financial decisions without independent verification.","contact":{"name":"GemstoneAI","url":"https://gemstoneaiapp.com/","email":"developers@gemstoneaiapp.com"},"license":{"name":"Commercial","url":"https://gemstoneaiapp.com/legal/api-terms"},"version":"1.0.0"},"servers":[{"url":"https://api.gemstoneaiapp.com/public/v1","description":"Production"},{"url":"http://localhost:8000/public/v1","description":"Local dev"}],"paths":{"/health":{"get":{"tags":["Health"],"summary":"Liveness probe","description":"Always returns 200 if the public API is reachable. No auth required.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Health Health Get"}}}}}}},"/cases":{"post":{"tags":["Cases"],"summary":"Create a case under your own reference","description":"Sending the same case again returns the stored case and changes nothing.","operationId":"create_case_cases_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Cases"],"summary":"Read a case by your reference","operationId":"get_case_cases_get","parameters":[{"name":"external_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"External Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Cases"],"summary":"Delete a case and everything under it","operationId":"delete_case_cases_delete","parameters":[{"name":"external_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"External Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-revisions":{"post":{"tags":["Cases"],"summary":"Add a revision to an existing case","description":"Earlier revisions are kept as they were. Identical content adds no revision.","operationId":"add_revision_case_revisions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-batches":{"post":{"tags":["Cases"],"summary":"Import a CSV of cases with a media manifest","description":"Sending the same file and manifest again returns the first receipt with replayed=true.\nA bad row is reported in `invalid` and does not stop the other rows.","operationId":"import_batch_case_batches_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_batch_case_batches_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceipt"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-batches/{batch_id}":{"get":{"tags":["Cases"],"summary":"Read an import receipt","operationId":"get_batch_case_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceipt"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-assessments":{"post":{"tags":["Assessments"],"summary":"Assess one revision of a case","operationId":"create_assessment_case_assessments_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_assessment_case_assessments_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Assessments"],"summary":"List a case's assessments, newest first","operationId":"list_assessments_case_assessments_get","parameters":[{"name":"external_id","in":"query","required":true,"schema":{"type":"string","title":"External Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentOut"},"title":"Response List Assessments Case Assessments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-assessments/{assessment_id}":{"get":{"tags":["Assessments"],"summary":"Read one assessment","operationId":"read_assessment_case_assessments__assessment_id__get","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assessment-usage":{"get":{"tags":["Assessments"],"summary":"This month's completed assessments against the workspace quota","operationId":"assessment_usage_assessment_usage_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assessment-units":{"get":{"tags":["Assessments"],"summary":"The completed-unit ledger for one month (UTC)","operationId":"assessment_units_assessment_units_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"title":"Month"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/queue":{"get":{"tags":["Review"],"summary":"Cases for review, most recently changed first","operationId":"queue_review_queue_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},{"name":"escalated","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Escalated"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/case":{"get":{"tags":["Review"],"summary":"One case with its evidence, reviewed assessment and audit trail","operationId":"case_review_case_get","parameters":[{"name":"external_id","in":"query","required":true,"schema":{"type":"string","title":"External Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/assign":{"post":{"tags":["Review"],"summary":"Assign or unassign a case","operationId":"assign_review_assign_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/edit":{"post":{"tags":["Review"],"summary":"Correct one field; writes a new revision","operationId":"edit_review_edit_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/escalate":{"post":{"tags":["Review"],"summary":"Escalate a case, or clear an escalation","operationId":"escalate_review_escalate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/decision":{"post":{"tags":["Review"],"summary":"Approve, decline, request evidence or refer one exact revision","operationId":"decision_review_decision_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review/export":{"post":{"tags":["Review"],"summary":"Export the approved revision with a receipt","operationId":"export_review_export_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Actor"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-outcomes":{"post":{"tags":["Outcomes and pilot ledger"],"summary":"Record one outcome event","operationId":"record_outcome_case_outcomes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Outcomes and pilot ledger"],"summary":"A case's outcome events, oldest first","operationId":"list_outcomes_case_outcomes_get","parameters":[{"name":"external_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"External Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/case-outcomes/import":{"post":{"tags":["Outcomes and pilot ledger"],"summary":"Import historical outcomes from CSV","description":"Each good row is stored once; a row already stored is counted as replayed. Bad rows are listed and skipped.","operationId":"import_outcomes_case_outcomes_import_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_outcomes_case_outcomes_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pilot-terms":{"put":{"tags":["Outcomes and pilot ledger"],"summary":"Set what one billable unit is and costs (adds a new version)","operationId":"put_terms_pilot_terms_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Outcomes and pilot ledger"],"summary":"The current pilot terms","operationId":"get_terms_pilot_terms_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pilot-ledger":{"get":{"tags":["Outcomes and pilot ledger"],"summary":"Per-case rows and totals for the pilot","description":"Totals are plain sums over `rows`; `method` says how each column is derived.","operationId":"pilot_ledger_pilot_ledger_get","parameters":[{"name":"cohort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv"],"type":"string","default":"json","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/listing-checks":{"post":{"tags":["Listing checks"],"summary":"Check one listing's claims for conflicts","operationId":"check_listing_listing_checks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Check Listing Listing Checks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/listing-checks/batch":{"post":{"tags":["Listing checks"],"summary":"Check up to 100 listings","operationId":"check_batch_listing_checks_batch_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Check Batch Listing Checks Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/listing-reviews":{"post":{"tags":["Listing policy and reviews"],"summary":"Adjudicate one listing under the rule pack in force","operationId":"create_review_listing_reviews_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Review Listing Reviews Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Listing policy and reviews"],"summary":"List reviews","operationId":"list_reviews_listing_reviews_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","complete"],"type":"string"},{"type":"null"}],"title":"State"}},{"name":"listing_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listing Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Reviews Listing Reviews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/listing-reviews/metrics":{"get":{"tags":["Listing policy and reviews"],"summary":"Completion time, false prompts, incremental upheld flags, shadow disagreement","operationId":"review_metrics_listing_reviews_metrics_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Review Metrics Listing Reviews Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/listing-reviews/{decision_id}":{"get":{"tags":["Listing policy and reviews"],"summary":"One review with its flag history","operationId":"get_review_listing_reviews__decision_id__get","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"integer","title":"Decision Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Review Listing Reviews  Decision Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/listing-reviews/{decision_id}/flags/{flag_id}":{"post":{"tags":["Listing policy and reviews"],"summary":"Dismiss, uphold or escalate one flag","operationId":"act_on_flag_listing_reviews__decision_id__flags__flag_id__post","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"integer","title":"Decision Id"}},{"name":"flag_id","in":"path","required":true,"schema":{"type":"string","title":"Flag Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Act On Flag Listing Reviews  Decision Id  Flags  Flag Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rule-packs":{"get":{"tags":["Listing policy and reviews"],"summary":"Rule pack versions","operationId":"get_packs_rule_packs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Packs Rule Packs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Listing policy and reviews"],"summary":"Publish a new rule pack version for a market and category","operationId":"create_pack_rule_packs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Pack Rule Packs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rule-packs/{pack_id}/retire":{"post":{"tags":["Listing policy and reviews"],"summary":"Retire a rule pack version","operationId":"retire_pack_rule_packs__pack_id__retire_post","parameters":[{"name":"pack_id","in":"path","required":true,"schema":{"type":"integer","title":"Pack Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Retire Pack Rule Packs  Pack Id  Retire Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Actor":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"actor":{"type":"string","maxLength":160,"minLength":1,"title":"Actor","description":"The person acting, as your system names them."},"actor_role":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Actor Role"}},"type":"object","required":["external_id","actor"],"title":"Actor"},"AssessmentOut":{"properties":{"id":{"type":"integer","title":"Id"},"external_id":{"type":"string","title":"External Id"},"revision":{"type":"integer","title":"Revision"},"status":{"type":"string","title":"Status"},"mode":{"type":"string","title":"Mode"},"photo_count":{"type":"integer","title":"Photo Count"},"rules_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rules Version"},"result":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Result"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"title":"Created At"},"completed_at":{"title":"Completed At"},"attempts":{"type":"integer","title":"Attempts","default":0},"next_attempt_at":{"title":"Next Attempt At"},"sandbox":{"type":"boolean","title":"Sandbox","default":false},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},"type":"object","required":["id","external_id","revision","status","mode","photo_count"],"title":"AssessmentOut"},"AssignIn":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"actor":{"type":"string","maxLength":160,"minLength":1,"title":"Actor","description":"The person acting, as your system names them."},"actor_role":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Actor Role"},"assignee":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Assignee","description":"Empty to unassign."}},"type":"object","required":["external_id","actor"],"title":"AssignIn"},"AttachmentIn":{"properties":{"kind":{"type":"string","enum":["photo","document","text"],"title":"Kind"},"source_ref":{"type":"string","maxLength":2000,"minLength":1,"title":"Source Ref","description":"Your URL or object key for the file."},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"key":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Key","description":"A name claims in this request can point at."}},"type":"object","required":["kind","source_ref"],"title":"AttachmentIn"},"AttachmentOut":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"type":"string","title":"Kind"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"source_ref":{"type":"string","title":"Source Ref"}},"type":"object","required":["id","kind","label","source_ref"],"title":"AttachmentOut"},"BatchIn":{"properties":{"listings":{"items":{"$ref":"#/components/schemas/ListingIn"},"type":"array","maxItems":100,"minItems":1,"title":"Listings"}},"type":"object","required":["listings"],"title":"BatchIn"},"BatchReceipt":{"properties":{"batch_id":{"type":"integer","title":"Batch Id"},"replayed":{"type":"boolean","title":"Replayed"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"rows":{"type":"integer","title":"Rows"},"created":{"type":"integer","title":"Created"},"revised":{"type":"integer","title":"Revised"},"relabeled":{"type":"integer","title":"Relabeled","default":0},"unchanged":{"type":"integer","title":"Unchanged"},"invalid":{"items":{"type":"object"},"type":"array","title":"Invalid"},"manifest_errors":{"items":{"type":"object"},"type":"array","title":"Manifest Errors"}},"type":"object","required":["batch_id","replayed","filename","rows","created","revised","unchanged","invalid","manifest_errors"],"title":"BatchReceipt"},"Body_create_assessment_case_assessments_post":{"properties":{"external_id":{"type":"string","title":"External Id"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision","description":"Revision number; the current revision when omitted."},"images":{"items":{"type":"string","format":"binary"},"type":"array","title":"Images","default":[]}},"type":"object","required":["external_id"],"title":"Body_create_assessment_case_assessments_post"},"Body_import_batch_case_batches_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"CSV with an external_id column."},"manifest":{"type":"string","title":"Manifest","description":"JSON list of {external_id, kind, source_ref, label}.","default":"[]"}},"type":"object","required":["file"],"title":"Body_import_batch_case_batches_post"},"Body_import_outcomes_case_outcomes_import_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"CSV: event_id, external_id, outcome_type, occurred_at, action, result, amount, currency, cost_type, handling_seconds, cohort, source, correction_of, note."}},"type":"object","required":["file"],"title":"Body_import_outcomes_case_outcomes_import_post"},"CaseIn":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id","description":"Your own case, lot or listing reference."},"title":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Title"},"product":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Product"},"submitted_by":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Submitted By"},"statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement","description":"The submitter's own words, unedited."},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentIn"},"type":"array","title":"Attachments"},"claims":{"items":{"$ref":"#/components/schemas/ClaimIn"},"type":"array","title":"Claims"}},"type":"object","required":["external_id"],"title":"CaseIn"},"CaseOut":{"properties":{"external_id":{"type":"string","title":"External Id"},"product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"type":"string","title":"Status"},"current_revision":{"type":"integer","title":"Current Revision"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"revisions":{"items":{"$ref":"#/components/schemas/RevisionOut"},"type":"array","title":"Revisions"},"decisions":{"items":{"$ref":"#/components/schemas/DecisionOut"},"type":"array","title":"Decisions"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome","description":"On a write: created, unchanged, relabeled (title or product only) or revised."}},"type":"object","required":["external_id","product","title","status","current_revision","created_at","updated_at","revisions","decisions"],"title":"CaseOut"},"ClaimIn":{"properties":{"field":{"type":"string","maxLength":120,"minLength":1,"title":"Field"},"value":{"type":"string","minLength":1,"title":"Value"},"source_kind":{"type":"string","enum":["stated","seen","document","unknown","reviewer"],"title":"Source Kind","description":"stated: someone said it. seen: visible in a photo. document: a paper says it."},"source_label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Source Label","description":"Who said it, or where it was seen."},"attachment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attachment","description":"The `key` of the attachment this claim rests on."}},"type":"object","required":["field","value","source_kind"],"title":"ClaimIn"},"ClaimOut":{"properties":{"field":{"type":"string","title":"Field"},"value":{"type":"string","title":"Value"},"source_kind":{"type":"string","title":"Source Kind"},"source_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Label"},"attachment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attachment Id"}},"type":"object","required":["field","value","source_kind","source_label","attachment_id"],"title":"ClaimOut"},"DecisionIn":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"actor":{"type":"string","maxLength":160,"minLength":1,"title":"Actor","description":"The person acting, as your system names them."},"actor_role":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Actor Role"},"revision":{"type":"integer","minimum":1.0,"title":"Revision"},"disposition":{"type":"string","enum":["approve","decline","request_evidence","refer"],"title":"Disposition"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"handling_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Handling Seconds"}},"type":"object","required":["external_id","actor","revision","disposition"],"title":"DecisionIn"},"DecisionOut":{"properties":{"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision"},"disposition":{"type":"string","title":"Disposition"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"decided_by":{"type":"string","title":"Decided By"},"handling_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Handling Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["revision","disposition","reason","decided_by","handling_seconds","created_at"],"title":"DecisionOut"},"EditIn":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"actor":{"type":"string","maxLength":160,"minLength":1,"title":"Actor","description":"The person acting, as your system names them."},"actor_role":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Actor Role"},"revision":{"type":"integer","minimum":1.0,"title":"Revision","description":"The revision the reviewer was looking at."},"field":{"type":"string","maxLength":120,"minLength":1,"title":"Field"},"value":{"type":"string","minLength":1,"title":"Value"},"reason":{"type":"string","minLength":1,"title":"Reason"},"handling_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Handling Seconds","description":"Time spent on this correction; counts in the pilot ledger."}},"type":"object","required":["external_id","actor","revision","field","value","reason"],"title":"EditIn"},"EscalateIn":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"actor":{"type":"string","maxLength":160,"minLength":1,"title":"Actor","description":"The person acting, as your system names them."},"actor_role":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Actor Role"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"clear":{"type":"boolean","title":"Clear","default":false}},"type":"object","required":["external_id","actor"],"title":"EscalateIn"},"FlagActionIn":{"properties":{"action":{"type":"string","enum":["dismiss","uphold","escalate"],"title":"Action"},"actor":{"type":"string","maxLength":160,"minLength":1,"title":"Actor"},"actor_role":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Actor Role"},"reason":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["action","actor"],"title":"FlagActionIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ListingIn":{"properties":{"listing_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Listing Id"},"title":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":200000},{"type":"null"}],"title":"Description","description":"Plain text or HTML."},"item_specifics":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object"},{"items":{"type":"object"},"type":"array"}],"title":"Item Specifics","description":"A name -> value map, or a list of {name, value|values}."},"variants":{"items":{"$ref":"#/components/schemas/VariantIn"},"type":"array","maxItems":500,"title":"Variants"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant","description":"Check only the variant with this sku."}},"type":"object","title":"ListingIn"},"OutcomeIn":{"properties":{"event_id":{"type":"string","maxLength":200,"minLength":1,"title":"Event Id","description":"Your id for this event. Immutable."},"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"outcome_type":{"type":"string","enum":["action","result","cost","time"],"title":"Outcome Type"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"action":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Action","description":"What your team did, e.g. accepted, declined, listed."},"result":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Result","description":"The true result, only when known, e.g. sold, returned."},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"cost_type":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Cost Type"},"handling_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Handling Seconds"},"cohort":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Cohort","description":"e.g. baseline, assisted, holdout."},"source":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Source"},"correction_of":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Correction Of"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"recorded_by":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Recorded By"}},"type":"object","required":["event_id","external_id","outcome_type","occurred_at"],"title":"OutcomeIn"},"PackIn":{"properties":{"market":{"type":"string","maxLength":60,"title":"Market","default":"*"},"category":{"type":"string","maxLength":60,"title":"Category","default":"*"},"status":{"type":"string","enum":["active","shadow"],"title":"Status","default":"active"},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From","description":"UTC. Defaults to now; a future date schedules the pack."},"rules":{"type":"object","title":"Rules","description":"code -> block | warn | escalate | off (or {action})."},"escalate_signed":{"type":"boolean","title":"Escalate Signed","default":true},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note"},"created_by":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Created By"}},"type":"object","title":"PackIn"},"ReviewIn":{"properties":{"listing_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Listing Id"},"title":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":200000},{"type":"null"}],"title":"Description","description":"Plain text or HTML."},"item_specifics":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object"},{"items":{"type":"object"},"type":"array"}],"title":"Item Specifics","description":"A name -> value map, or a list of {name, value|values}."},"variants":{"items":{"$ref":"#/components/schemas/VariantIn"},"type":"array","maxItems":500,"title":"Variants"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant","description":"Check only the variant with this sku."},"market":{"type":"string","maxLength":60,"title":"Market","description":"Your marketplace or site, e.g. ebay_us.","default":"*"},"category":{"type":"string","maxLength":60,"title":"Category","description":"e.g. fine_jewelry, watches.","default":"*"},"mode":{"type":"string","enum":["enforce","preview"],"title":"Mode","default":"enforce"},"supersedes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supersedes","description":"The review this resubmission replaces; flags it no longer raises are marked corrected."},"actor":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Actor"}},"type":"object","title":"ReviewIn"},"RevisionOut":{"properties":{"number":{"type":"integer","title":"Number"},"submitted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted By"},"statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments"},"claims":{"items":{"$ref":"#/components/schemas/ClaimOut"},"type":"array","title":"Claims"}},"type":"object","required":["number","submitted_by","statement","created_at","attachments","claims"],"title":"RevisionOut"},"TermsIn":{"properties":{"eligible":{"type":"string","enum":["all","assessed","reviewed","approved"],"title":"Eligible"},"unit_price":{"type":"number","minimum":0.0,"title":"Unit Price"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"unit_label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Unit Label"},"baseline_minutes":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Baseline Minutes"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_by":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Created By"}},"type":"object","required":["eligible","unit_price"],"title":"TermsIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantIn":{"properties":{"sku":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Sku"},"options":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Options"}},"type":"object","title":"VariantIn"}},"securitySchemes":{"ApiKeyBearer":{"type":"http","scheme":"bearer","bearerFormat":"gsk_live_*","description":"Workspace API key: `gsk_live_*` for production, `gsk_test_*` for the sandbox. Issued by the GemstoneAI team."}}},"tags":[{"name":"Health","description":"Liveness probe. No authentication."},{"name":"Cases","description":"Scan API, Intake. Store an item under your own reference (`external_id`): statement, claims and photos. Re-sending the same content changes nothing; new content adds a revision. CSV batches with a media manifest."},{"name":"Assessments","description":"Scan API. Assess one revision of a case. Text only answers 201 at once; photos answer 202 and you poll. Usage against the monthly quota and the unit ledger."},{"name":"Review","description":"Intake. The review queue: assign, correct a field (writes a revision), escalate, decide on one exact revision, export the approved revision with a receipt."},{"name":"Outcomes and pilot ledger","description":"Intake. Record what you actually did with each item, import history, set pilot terms and read per-case rows and totals."},{"name":"Listing checks","description":"Verify. Rules-only checks of a listing's title, description, item specifics and variants for conflicting metal, origin and treatment claims. Nothing is stored."},{"name":"Listing policy and reviews","description":"Verify. Versioned rule packs per market and category (with shadow packs), recorded listing reviews, flag actions and review metrics."}],"security":[{"ApiKeyBearer":[]}]}