---
title: "Ingest Sales"
method: POST
path: "/api/v1/pricing/sales/ingest"
tags: ["Pricing - Sales Ingest"]
---

# Ingest Sales

`POST /api/v1/pricing/sales/ingest`

## Request

- Base URL: `https://api.gemstoneaiapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gemstoneaiapp.com/api/v1/pricing/sales/ingest`
- Auth: none declared

Batch-ingest closed-sale records from dealer-tools (or any trusted
transaction source). Idempotent on (source_site, source_url).

## Headers

- `Authorization` string, nullable

## Request body

- SalesIngestRequest: Body of POST /api/v1/pricing/sales/ingest.
  - `sales` SaleRecord[], required
    - `dealer_sale_id` string, required: Unique dealer-tools InventoryItem ID
    - `dealer_id` string, required: Dealer tenant ID (e.g. 'demo-dealer')
    - `sold_price` number, required: Closing price in USD
    - `carat_weight` number, required: Weight in carats
    - `sold_at` string, date-time, required: ISO timestamp of sale close
    - `sale_channel` string, nullable: IN_STORE / SHOWCASE_INQUIRY / WEBSITE / CONSIGNMENT / INVOICE / MEMO
    - `gem_species` string, nullable
    - `gem_variety` string, nullable
    - `color_description` string, nullable
    - `color_hue` string, nullable
    - `color_saturation` string, nullable
    - `color_tone` string, nullable
    - `clarity` string, nullable
    - `cut_shape` string, nullable
    - `cutting_style` string, nullable
    - `origin` string, nullable
    - `treatment` string, nullable
    - `treatment_details` string, nullable
    - `transparency` string, nullable
    - `certificate_lab` string, nullable
    - `certificate_number` string, nullable
    - `is_lab_grown` boolean, nullable

## Response `200`

Successful Response

- SalesIngestResponse: Result summary. `dedup_skipped` are rows we already have on file.
  - `received` integer, required
  - `ingested` integer, required
  - `dedup_skipped` integer, required
  - `invalid_skipped` integer, required
  - `errors` string[]
  - `batch_as_of` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api.md) · [All operations](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/revisions/fcb441f55161?raw)
