---
title: "Assess a bounded previous-90-day history without executing commerce actions"
method: POST
path: "/aws/commerce/history/assessments"
---

# Assess a bounded previous-90-day history without executing commerce actions

`POST /aws/commerce/history/assessments`

## Request

- Base URL: `https://commerce.decionis.com`
- URL: `https://commerce.decionis.com/aws/commerce/history/assessments`
- Auth: HTTP bearer

Additive historical feature; it does not replace the existing governance APIs. Requires deployed, enabled AWS historical routes and a current licensed credential. The server fixes the previous 90-day window by transaction time. Accepts only a supported connected-store UUID or the labelled synthetic dataset, never raw transactions, organization, dates or a policy override. Reusing a request key returns the immutable original result; rebinding its source returns 409. Responses are at most 100 KiB, with at most 100 records assessed. Partial history, missing item costs and timestamp gaps remain visible. Results measure merchandise margin only, excluding shipping, taxes and payment or platform fees. Inline results are unsigned, with null proof_ref; no signed dossier is claimed. Synthetic examples use an explicit sample 12 percent floor, never a guessed customer policy. A verified 14-day AWS trial uses its actual entitlement expiry; this endpoint never starts or extends a trial. No platform or AWS usage write.

## Headers

- `Idempotency-Key` string

## Request body

- HistoricalRequest
  - `source` union, required
    - object
      - `kind` 'synthetic', required
    - object
      - `kind` 'connected_store', required
      - `connection_id` string, uuid, required
  - `idempotency_key` string, required

## Response `200`

Immutable completed or failed assessment; failures contain stable error codes

- HistoricalAssessment
  - `assessment_id` string, uuid, required
  - `status` 'completed' | 'failed', required
  - `mode` 'historical_only', required: Scope of this assessment feature, not the broader products or APIs.
  - `cost_scope` 'merchandise_margin', required: Merchandise subtotal minus discount and reported item cost; shipping, tax and payment/platform fees excluded.
  - `window` object, required
    - `days` 90, required
    - `start` string, date-time, required: Inclusive UTC transaction-time lower bound.
    - `end` string, date-time, required: Exclusive captured UTC end; exactly 90 days after start.
    - `timestamp_field` 'transaction_at', required
  - `provenance` union, required
    - object
      - `kind` 'synthetic', required
      - `label` 'Synthetic commerce history', required
      - `dataset_version` 'commerce-history-v1', required
    - object
      - `kind` 'connected_store', required
      - `label` 'Connected Adobe Commerce history', required
      - `connection_id` string, uuid, required
      - `platform` 'adobe-commerce', required
  - `policy` object, nullable, required
    - `kind` 'sample' | 'merchant', required
    - `version` string, required
    - `floor_percent` number, required
  - `summary` object, required
    - `transactions_scanned` integer, required
    - `evaluated` integer, required
    - `missing_cost` integer, required
    - `excluded_timestamp` integer, required
    - `evaluation_errors` integer, required
    - `allow` integer, required
    - `hold` integer, required
    - `escalate` integer, required
  - `evidence` object[], required
    - `record_id` string, required
    - `transaction_at` string, date-time, required
    - `decision` 'PROCEED' | 'HOLD' | 'ESCALATE', required: Retrospective rule result only; never permission to execute.
    - `reason_codes` string[], required
    - `proof_ref` unknown, required
  - `coverage` object, required
    - `record_limit` 100, required
    - `complete` boolean, required: False for truncation
  - `truncated` boolean, required
  - `error_code` 'CONNECTED_STORE_REQUIRED' | 'HISTORICAL_POLICY_REQUIRED' | 'HISTORICAL_SOURCE_UNAVAILABLE'

## Other responses

- `400`: Stable, non-sensitive historical API error
- `401`: Stable, non-sensitive historical API error
- `403`: Stable, non-sensitive historical API error
- `409`: Stable, non-sensitive historical API error
- `413`: Stable, non-sensitive historical API error
- `429`: Rate limited; starts allow three requests per minute per licensed organization and grant
- `503`: Stable, non-sensitive historical API error

---

[API](https://skmtc.dev/decionis/apis/decionis-commerce-gate-api.md) · [All operations](https://skmtc.dev/decionis/apis/decionis-commerce-gate-api/llms.txt) · [OpenAPI document](https://skmtc.dev/decionis/apis/decionis-commerce-gate-api/revisions/9fecb7109bf8?raw)
