Base URL https://api.gemstoneaiapp.com/public/v1. Every route takes Authorization: Bearer gsk_… except /health. The machine-readable spec is at openapi.json, and Swagger lets you call each route with your sandbox key.
Where a route answers with more than one success code (201 created, 202 accepted, 200 on a replay), the product guides list each one, along with the error codes your code should branch on.
Health
Liveness probe. No authentication.
GET/health
Liveness probe
Always returns 200 if the public API is reachable. No auth required.
Responses
200Successful Response
Cases
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.
POST/cases
Create a case under your own reference
Sending the same case again returns the stored case and changes nothing.
Scope: cases:write
Body application/json · CaseIn
external_idrequired | string | Your own case, lot or listing reference. |
title | string | null | |
product | string | null | |
submitted_by | string | null | |
statement | string | null | The submitter's own words, unedited. |
attachments | list[AttachmentIn] | |
claims | list[ClaimIn] |
Responses
200Successful Response · CaseOut422Validation error
GET/cases
Read a case by your reference
Scope: cases:read
Parameters
external_idrequired | string | query |
Responses
200Successful Response · CaseOut422Validation error
DELETE/cases
Delete a case and everything under it
Scope: cases:write
Parameters
external_idrequired | string | query |
Responses
204Successful Response422Validation error
POST/case-revisions
Add a revision to an existing case
Earlier revisions are kept as they were. Identical content adds no revision.
Scope: cases:write
Body application/json · CaseIn
external_idrequired | string | Your own case, lot or listing reference. |
title | string | null | |
product | string | null | |
submitted_by | string | null | |
statement | string | null | The submitter's own words, unedited. |
attachments | list[AttachmentIn] | |
claims | list[ClaimIn] |
Responses
200Successful Response · CaseOut422Validation error
POST/case-batches
Import a CSV of cases with a media manifest
Sending the same file and manifest again returns the first receipt with replayed=true. A bad row is reported in `invalid` and does not stop the other rows.
Scope: cases:write
Body multipart/form-data
filerequired | file | CSV with an external_id column. |
manifest | string | JSON list of {external_id, kind, source_ref, label}.Default "[]" |
Responses
200Successful Response · BatchReceipt422Validation error
GET/case-batches/{batch_id}
Read an import receipt
Scope: cases:read
Parameters
batch_idrequired | integer | path |
Responses
200Successful Response · BatchReceipt422Validation error
Assessments
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.
POST/case-assessments
Assess one revision of a case
Scope: assessments:write
Parameters
Idempotency-Key | string | null | header |
Body multipart/form-data
external_idrequired | string | |
revision | integer | null | Revision number; the current revision when omitted. |
images | list[file] |
Responses
200Successful Response · AssessmentOut422Validation error
GET/case-assessments
List a case's assessments, newest first
Scope: cases:read
Parameters
external_idrequired | string | query |
Responses
200Successful Response · list[AssessmentOut]422Validation error
GET/case-assessments/{assessment_id}
Read one assessment
Scope: cases:read
Parameters
assessment_idrequired | integer | path |
Responses
200Successful Response · AssessmentOut422Validation error
GET/assessment-usage
This month's completed assessments against the workspace quota
Scope: cases:read
Responses
200Successful Response422Validation error
GET/assessment-units
The completed-unit ledger for one month (UTC)
Scope: cases:read
Parameters
month | string | null | query |
format | string | queryDefault "json" |
Responses
200Successful Response422Validation error
Review
Intake. The review queue: assign, correct a field (writes a revision), escalate, decide on one exact revision, export the approved revision with a receipt.
GET/review/queue
Cases for review, most recently changed first
Scope: cases:read
Parameters
status | string | null | query |
assignee | string | null | query |
escalated | boolean | null | query |
limit | integer | queryDefault 50 |
offset | integer | queryDefault 0 |
Responses
200Successful Response422Validation error
GET/review/case
One case with its evidence, reviewed assessment and audit trail
Scope: cases:read
Parameters
external_idrequired | string | query |
Responses
200Successful Response422Validation error
POST/review/assign
Assign or unassign a case
Scope: cases:review
Body application/json · AssignIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
assignee | string | null | Empty to unassign. |
Responses
200Successful Response422Validation error
POST/review/edit
Correct one field; writes a new revision
Scope: cases:review
Body application/json · EditIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
revisionrequired | integer | The revision the reviewer was looking at. |
fieldrequired | string | |
valuerequired | string | |
reasonrequired | string | |
handling_seconds | integer | null | Time spent on this correction; counts in the pilot ledger. |
Responses
200Successful Response422Validation error
POST/review/escalate
Escalate a case, or clear an escalation
Scope: cases:review
Body application/json · EscalateIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
reason | string | null | |
clear | boolean | Default false |
Responses
200Successful Response422Validation error
POST/review/decision
Approve, decline, request evidence or refer one exact revision
Scope: cases:review (approve and decline also need cases:approve)
Body application/json · DecisionIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
revisionrequired | integer | |
dispositionrequired | approve | decline | request_evidence | refer | |
reason | string | null | |
handling_seconds | integer | null |
Responses
200Successful Response422Validation error
POST/review/export
Export the approved revision with a receipt
Scope: cases:approve
Body application/json · Actor
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null |
Responses
200Successful Response422Validation error
Outcomes and pilot ledger
Intake. Record what you actually did with each item, import history, set pilot terms and read per-case rows and totals.
POST/case-outcomes
Record one outcome event
Scope: cases:write
Body application/json · OutcomeIn
event_idrequired | string | Your id for this event. Immutable. |
external_idrequired | string | |
outcome_typerequired | action | result | cost | time | |
occurred_atrequired | string (date-time) | |
action | string | null | What your team did, e.g. accepted, declined, listed. |
result | string | null | The true result, only when known, e.g. sold, returned. |
amount | number | null | |
currency | string | null | |
cost_type | string | null | |
handling_seconds | integer | null | |
cohort | string | null | e.g. baseline, assisted, holdout. |
source | string | null | |
correction_of | string | null | |
note | string | null | |
recorded_by | string | null |
Responses
200Successful Response422Validation error
GET/case-outcomes
A case's outcome events, oldest first
Scope: cases:read
Parameters
external_idrequired | string | query |
Responses
200Successful Response422Validation error
POST/case-outcomes/import
Import historical outcomes from CSV
Each good row is stored once; a row already stored is counted as replayed. Bad rows are listed and skipped.
Scope: cases:write
Body multipart/form-data
filerequired | file | CSV: event_id, external_id, outcome_type, occurred_at, action, result, amount, currency, cost_type, handling_seconds, cohort, source, correction_of, note. |
Responses
200Successful Response422Validation error
PUT/pilot-terms
Set what one billable unit is and costs (adds a new version)
Scope: cases:approve
Body application/json · TermsIn
eligiblerequired | all | assessed | reviewed | approved | |
unit_pricerequired | number | |
currency | string | Default "USD" |
unit_label | string | null | |
baseline_minutes | number | null | |
note | string | null | |
created_by | string | null |
Responses
200Successful Response422Validation error
GET/pilot-terms
The current pilot terms
Scope: cases:read
Responses
200Successful Response422Validation error
GET/pilot-ledger
Per-case rows and totals for the pilot
Totals are plain sums over `rows`; `method` says how each column is derived.
Scope: cases:read
Parameters
cohort | string | null | query |
since | string (date-time) | null | query |
until | string (date-time) | null | query |
format | json | csv | queryDefault "json" |
Responses
200Successful Response422Validation error
Listing checks
Verify. Rules-only checks of a listing's title, description, item specifics and variants for conflicting metal, origin and treatment claims. Nothing is stored.
POST/listing-checks
Check one listing's claims for conflicts
Scope: listings:check
Body application/json · ListingIn
listing_id | string | null | |
title | string | null | |
description | string | null | Plain text or HTML. |
item_specifics | object | list[object] | A name -> value map, or a list of {name, value|values}. |
variants | list[VariantIn] | |
variant | string | null | Check only the variant with this sku. |
Responses
200Successful Response422Validation error
POST/listing-checks/batch
Check up to 100 listings
Scope: listings:check
Body application/json · BatchIn
listingsrequired | list[ListingIn] |
Responses
200Successful Response422Validation error
Listing policy and reviews
Verify. Versioned rule packs per market and category (with shadow packs), recorded listing reviews, flag actions and review metrics.
POST/listing-reviews
Adjudicate one listing under the rule pack in force
Scope: listings:check (mode enforce also needs listings:review)
Body application/json · ReviewIn
listing_id | string | null | |
title | string | null | |
description | string | null | Plain text or HTML. |
item_specifics | object | list[object] | A name -> value map, or a list of {name, value|values}. |
variants | list[VariantIn] | |
variant | string | null | Check only the variant with this sku. |
market | string | Your marketplace or site, e.g. ebay_us.Default "*" |
category | string | e.g. fine_jewelry, watches.Default "*" |
mode | enforce | preview | Default "enforce" |
supersedes | integer | null | The review this resubmission replaces; flags it no longer raises are marked corrected. |
actor | string | null |
Responses
200Successful Response422Validation error
GET/listing-reviews
List reviews
Scope: listings:review
Parameters
state | open | complete | null | query |
listing_id | string | null | query |
limit | integer | queryDefault 50 |
offset | integer | queryDefault 0 |
Responses
200Successful Response422Validation error
GET/listing-reviews/metrics
Completion time, false prompts, incremental upheld flags, shadow disagreement
Scope: listings:admin
Parameters
since | string (date-time) | null | query |
until | string (date-time) | null | query |
Responses
200Successful Response422Validation error
GET/listing-reviews/{decision_id}
One review with its flag history
Scope: listings:review
Parameters
decision_idrequired | integer | path |
Responses
200Successful Response422Validation error
POST/listing-reviews/{decision_id}/flags/{flag_id}
Dismiss, uphold or escalate one flag
Scope: listings:review (clearing an escalation needs listings:escalations)
Parameters
decision_idrequired | integer | path |
flag_idrequired | string | path |
Body application/json · FlagActionIn
actionrequired | dismiss | uphold | escalate | |
actorrequired | string | |
actor_role | string | null | |
reason | string | null |
Responses
200Successful Response422Validation error
GET/rule-packs
Rule pack versions
Scope: listings:admin
Responses
200Successful Response422Validation error
POST/rule-packs
Publish a new rule pack version for a market and category
Scope: listings:admin
Body application/json · PackIn
market | string | Default "*" |
category | string | Default "*" |
status | active | shadow | Default "active" |
effective_from | string (date-time) | null | UTC. Defaults to now; a future date schedules the pack. |
rules | object | code -> block | warn | escalate | off (or {action}). |
escalate_signed | boolean | Default true |
note | string | null | |
created_by | string | null |
Responses
201Successful Response422Validation error
POST/rule-packs/{pack_id}/retire
Retire a rule pack version
Scope: listings:admin
Parameters
pack_idrequired | integer | path |
Responses
200Successful Response422Validation error
Schemas
Actor
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null |
AssessmentOut
idrequired | integer | |
external_idrequired | string | |
revisionrequired | integer | |
statusrequired | string | |
moderequired | string | |
photo_countrequired | integer | |
rules_version | string | null | |
result | object | null | |
error_code | string | null | |
error_message | string | null | |
created_at | any | |
completed_at | any | |
attempts | integer | Default 0 |
next_attempt_at | any | |
sandbox | boolean | Default false |
outcome | string | null |
AssignIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
assignee | string | null | Empty to unassign. |
AttachmentIn
kindrequired | photo | document | text | |
source_refrequired | string | Your URL or object key for the file. |
label | string | null | |
key | string | null | A name claims in this request can point at. |
AttachmentOut
idrequired | integer | |
kindrequired | string | |
labelrequired | string | null | |
source_refrequired | string |
BatchIn
listingsrequired | list[ListingIn] |
BatchReceipt
batch_idrequired | integer | |
replayedrequired | boolean | |
filenamerequired | string | null | |
rowsrequired | integer | |
createdrequired | integer | |
revisedrequired | integer | |
relabeled | integer | Default 0 |
unchangedrequired | integer | |
invalidrequired | list[object] | |
manifest_errorsrequired | list[object] |
CaseIn
external_idrequired | string | Your own case, lot or listing reference. |
title | string | null | |
product | string | null | |
submitted_by | string | null | |
statement | string | null | The submitter's own words, unedited. |
attachments | list[AttachmentIn] | |
claims | list[ClaimIn] |
CaseOut
external_idrequired | string | |
productrequired | string | null | |
titlerequired | string | null | |
statusrequired | string | |
current_revisionrequired | integer | |
created_atrequired | string (date-time) | |
updated_atrequired | string (date-time) | |
revisionsrequired | list[RevisionOut] | |
decisionsrequired | list[DecisionOut] | |
outcome | string | null | On a write: created, unchanged, relabeled (title or product only) or revised. |
ClaimIn
fieldrequired | string | |
valuerequired | string | |
source_kindrequired | stated | seen | document | unknown | reviewer | stated: someone said it. seen: visible in a photo. document: a paper says it. |
source_label | string | null | Who said it, or where it was seen. |
attachment | string | null | The `key` of the attachment this claim rests on. |
ClaimOut
fieldrequired | string | |
valuerequired | string | |
source_kindrequired | string | |
source_labelrequired | string | null | |
attachment_idrequired | integer | null |
DecisionIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
revisionrequired | integer | |
dispositionrequired | approve | decline | request_evidence | refer | |
reason | string | null | |
handling_seconds | integer | null |
DecisionOut
revisionrequired | integer | null | |
dispositionrequired | string | |
reasonrequired | string | null | |
decided_byrequired | string | |
handling_secondsrequired | integer | null | |
created_atrequired | string (date-time) |
EditIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
revisionrequired | integer | The revision the reviewer was looking at. |
fieldrequired | string | |
valuerequired | string | |
reasonrequired | string | |
handling_seconds | integer | null | Time spent on this correction; counts in the pilot ledger. |
EscalateIn
external_idrequired | string | |
actorrequired | string | The person acting, as your system names them. |
actor_role | string | null | |
reason | string | null | |
clear | boolean | Default false |
FlagActionIn
actionrequired | dismiss | uphold | escalate | |
actorrequired | string | |
actor_role | string | null | |
reason | string | null |
ListingIn
listing_id | string | null | |
title | string | null | |
description | string | null | Plain text or HTML. |
item_specifics | object | list[object] | A name -> value map, or a list of {name, value|values}. |
variants | list[VariantIn] | |
variant | string | null | Check only the variant with this sku. |
OutcomeIn
event_idrequired | string | Your id for this event. Immutable. |
external_idrequired | string | |
outcome_typerequired | action | result | cost | time | |
occurred_atrequired | string (date-time) | |
action | string | null | What your team did, e.g. accepted, declined, listed. |
result | string | null | The true result, only when known, e.g. sold, returned. |
amount | number | null | |
currency | string | null | |
cost_type | string | null | |
handling_seconds | integer | null | |
cohort | string | null | e.g. baseline, assisted, holdout. |
source | string | null | |
correction_of | string | null | |
note | string | null | |
recorded_by | string | null |
PackIn
market | string | Default "*" |
category | string | Default "*" |
status | active | shadow | Default "active" |
effective_from | string (date-time) | null | UTC. Defaults to now; a future date schedules the pack. |
rules | object | code -> block | warn | escalate | off (or {action}). |
escalate_signed | boolean | Default true |
note | string | null | |
created_by | string | null |
ReviewIn
listing_id | string | null | |
title | string | null | |
description | string | null | Plain text or HTML. |
item_specifics | object | list[object] | A name -> value map, or a list of {name, value|values}. |
variants | list[VariantIn] | |
variant | string | null | Check only the variant with this sku. |
market | string | Your marketplace or site, e.g. ebay_us.Default "*" |
category | string | e.g. fine_jewelry, watches.Default "*" |
mode | enforce | preview | Default "enforce" |
supersedes | integer | null | The review this resubmission replaces; flags it no longer raises are marked corrected. |
actor | string | null |
RevisionOut
numberrequired | integer | |
submitted_byrequired | string | null | |
statementrequired | string | null | |
created_atrequired | string (date-time) | |
attachmentsrequired | list[AttachmentOut] | |
claimsrequired | list[ClaimOut] |
TermsIn
eligiblerequired | all | assessed | reviewed | approved | |
unit_pricerequired | number | |
currency | string | Default "USD" |
unit_label | string | null | |
baseline_minutes | number | null | |
note | string | null | |
created_by | string | null |
VariantIn
sku | string | null | |
options | object |