> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fraud-blocked returns report

> Counts of returns-verification decisions for the authenticated organization over a selectable period, with the declined states surfaced as prevented return-fraud attempts and a dollar estimate where the units' sale events carried a price.

**Read the two counts as different questions.** ``attempts`` is how many times the return desk asked; ``distinct_units`` is how many physical units were involved. The dollar estimate follows units, never attempts — a unit scanned three times is worth its price once.

**Declined means exactly ``already_returned``, ``never_sold``, ``unknown_serial``.** ``recalled_lot`` is reported in ``by_decision`` like every other state but is deliberately not counted as prevented fraud: a recall block is product-safety handling, and a customer returning a unit that was later recalled is not attempting fraud.

**The dollar figure is an estimate and is labelled as one.** It sums the sale prices recorded on the sale events of the declined units, per currency, and never across currencies. ``declined_units_with_price`` states how much of the population it actually covers; ``never_sold`` and ``unknown_serial`` can never carry a price, because both mean this organization recorded no sale for that unit.

**Dates are inclusive and resolved in ``time_zone``** (default UTC), so ``end`` covers the whole of that day locally. A span longer than 366 days is **clamped** to the most recent 366 days and flagged with ``period_truncated``, and reversed bounds are ordered — neither is an error, and the window actually used is always echoed back. An unrecognised ``time_zone`` *is* rejected (422): falling back to UTC would move a retailer's month boundary and land real transactions in the wrong month.

Results are computed only from the authenticated organization's own outcomes. Caller must hold an OWNER or MANAGER membership.



## OpenAPI

````yaml /openapi/openapi-epcis.json get /epcis/api/2.0/verification/report
openapi: 3.1.0
info:
  title: EPCIS 2.0 API
  version: 2.0.0
  description: >
    EPCIS 2.0 event capture and query, scoped to lot-level supply chain
    traceability and recall containment — not warehouse logistics, cold-chain
    monitoring, or business-document exchange.


    Roles claimed: EPCIS 2.0 capture interface server, EPCIS 2.0 data. Not
    claimed: EPCIS 2.0 query interface server; Query callback interface
    implementation.


    Binding: REST over HTTPS. Serialization: JSON and JSON-LD. Vocabulary: GS1
    CBV 2.0. XML and EPCIS 1.2 are out of scope by design, not a pending
    decision (C-5415).


    6 of 63 official EPCIS 2.0 REST operations are served, all within the roles
    claimed above. Full capability declaration:
    https://docs.closient.com/guides/epcis-conformance


    ## Authentication


    All endpoints require an API key passed via the `X-API-Key` HTTP header,
    unless otherwise noted.


    ```

    X-API-Key: csb_<body>_<checksum>

    ```


    Generate API keys in **Settings > API Keys** in your dashboard, or via the
    Account API.

    Session-based (cookie) authentication is also accepted for browser-based
    access.


    ## Rate Limits


    | Tier        | Requests / minute | Requests / day |

    |-------------|-------------------|----------------|

    | Default     | 300               | 10,000         |

    | Custom      | Contact us        | Contact us     |


    Rate-limit headers are included on every response so callers can
    self-throttle without

    hitting our 429s ("informed governor"):


    - `RateLimit-Policy` — every active window, e.g. `300;w=60, 10000;w=86400`

    - `RateLimit-Limit` — quota for the **most-restrictive** currently-active
    window

    - `RateLimit-Remaining` — requests left in that window

    - `RateLimit-Reset` — seconds until that window resets (relative; clock-skew
    safe)


    Legacy `X-RateLimit-*` aliases are also emitted for back-compat.
    `X-RateLimit-Reset`

    keeps the absolute Unix-timestamp shape to avoid breaking existing
    consumers.


    When rate-limited, you receive `429 Too Many Requests` with a
    `retry_after_seconds` field

    in the error envelope and a `Retry-After` header.


    ## Pagination


    List endpoints return paginated results in this envelope:


    ```json

    {
      "data": [...],
      "pagination": {
        "page": 1,
        "page_size": 25,
        "total_count": 342,
        "total_pages": 14,
        "has_next": true,
        "has_previous": false
      }
    }

    ```


    Use `?page=2&page_size=50` query parameters. Maximum page size is 100.


    ## Error Responses


    All errors conform to [RFC 9457 Problem
    Details](https://www.rfc-editor.org/rfc/rfc9457)

    with `Content-Type: application/problem+json`:


    ```json

    {
      "type": "https://closient.com/docs/errors/not_found",
      "title": "Not Found",
      "status": 404,
      "detail": "The requested resource was not found.",
      "error_code": "not_found",
      "retryable": false,
      "timestamp": "2026-03-31T12:00:00+00:00"
    }

    ```


    Common error codes: `unauthorized` (401), `forbidden` (403), `not_found`
    (404),

    `validation_error` (422), `rate_limited` (429), `internal_error` (500).
  termsOfService: https://www.closient.com/terms/
servers:
  - url: https://www.closient.com
security: []
externalDocs:
  description: Closient Documentation
  url: https://docs.closient.com
paths:
  /epcis/api/2.0/verification/report:
    get:
      tags:
        - EPCIS 2.0
      summary: Fraud-blocked returns report
      description: >-
        Counts of returns-verification decisions for the authenticated
        organization over a selectable period, with the declined states surfaced
        as prevented return-fraud attempts and a dollar estimate where the
        units' sale events carried a price.


        **Read the two counts as different questions.** ``attempts`` is how many
        times the return desk asked; ``distinct_units`` is how many physical
        units were involved. The dollar estimate follows units, never attempts —
        a unit scanned three times is worth its price once.


        **Declined means exactly ``already_returned``, ``never_sold``,
        ``unknown_serial``.** ``recalled_lot`` is reported in ``by_decision``
        like every other state but is deliberately not counted as prevented
        fraud: a recall block is product-safety handling, and a customer
        returning a unit that was later recalled is not attempting fraud.


        **The dollar figure is an estimate and is labelled as one.** It sums the
        sale prices recorded on the sale events of the declined units, per
        currency, and never across currencies. ``declined_units_with_price``
        states how much of the population it actually covers; ``never_sold`` and
        ``unknown_serial`` can never carry a price, because both mean this
        organization recorded no sale for that unit.


        **Dates are inclusive and resolved in ``time_zone``** (default UTC), so
        ``end`` covers the whole of that day locally. A span longer than 366
        days is **clamped** to the most recent 366 days and flagged with
        ``period_truncated``, and reversed bounds are ordered — neither is an
        error, and the window actually used is always echoed back. An
        unrecognised ``time_zone`` *is* rejected (422): falling back to UTC
        would move a retailer's month boundary and land real transactions in the
        wrong month.


        Results are computed only from the authenticated organization's own
        outcomes. Caller must hold an OWNER or MANAGER membership.
      operationId: apps_epcis_api_verification_report_epcis_verification_report
      parameters:
        - in: query
          name: start
          schema:
            description: >-
              First day to count, inclusive (YYYY-MM-DD). Defaults to 30 days
              before ``end``. A span longer than 366 days is clamped to the most
              recent 366 days rather than refused, and the response sets
              ``period_truncated``.
            title: Start
            format: date
            type: string
          required: false
          description: >-
            First day to count, inclusive (YYYY-MM-DD). Defaults to 30 days
            before ``end``. A span longer than 366 days is clamped to the most
            recent 366 days rather than refused, and the response sets
            ``period_truncated``.
        - in: query
          name: end
          schema:
            description: >-
              Last day to count, **inclusive** (YYYY-MM-DD). Defaults to today
              in ``time_zone``. If ``end`` precedes ``start`` the two are
              ordered — two dates delimit one interval, and which was typed
              first is not a fact about the data.
            title: End
            format: date
            type: string
          required: false
          description: >-
            Last day to count, **inclusive** (YYYY-MM-DD). Defaults to today in
            ``time_zone``. If ``end`` precedes ``start`` the two are ordered —
            two dates delimit one interval, and which was typed first is not a
            fact about the data.
        - in: query
          name: time_zone
          schema:
            default: UTC
            description: >-
              IANA time zone the date range is resolved against, e.g.
              ``America/Chicago``. A retailer's month ends at local midnight,
              not UTC midnight, and the difference lands real transactions in
              the wrong month.
            maxLength: 64
            title: Time Zone
            type: string
          required: false
          description: >-
            IANA time zone the date range is resolved against, e.g.
            ``America/Chicago``. A retailer's month ends at local midnight, not
            UTC midnight, and the difference lands real transactions in the
            wrong month.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationReportSchema'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '405':
          description: Method Not Allowed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '422':
          description: Unprocessable Content
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '429':
          description: Too Many Requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
      security:
        - APIKeyHeaderAuth: []
        - OAuthTokenAuth: []
        - CookieGatedSessionAuth: []
components:
  schemas:
    VerificationReportSchema:
      description: Tenant-scoped fraud-blocked report for one period.
      examples:
        - by_decision: []
          declined_attempts: 23
          declined_distinct_units: 17
          declined_units_with_price: 12
          estimated_prevented_value:
            - amount: '2145.88'
              currency: USD
          period_end: '2026-10-01T00:00:00Z'
          period_start: '2026-09-01T00:00:00Z'
          period_truncated: false
          time_zone: America/Chicago
          total_attempts: 431
          total_distinct_units: 388
      properties:
        period_start:
          description: First instant counted, in UTC. Inclusive.
          format: date-time
          title: Period Start
          type: string
        period_end:
          description: >-
            First instant *not* counted, in UTC. Exclusive — it is midnight at
            the start of the day after the requested ``end`` date, so the whole
            of ``end`` is inside the report.
          format: date-time
          title: Period End
          type: string
        time_zone:
          description: IANA time zone the requested date range was resolved against.
          title: Time Zone
          type: string
        period_truncated:
          description: >-
            True when the requested span exceeded the maximum and the window
            above is the clamped one — the most recent allowed period. Every
            number in this response describes ``period_start``..``period_end``,
            not the range that was asked for.
          title: Period Truncated
          type: boolean
        total_attempts:
          description: Every verify call in the period, all decision states.
          title: Total Attempts
          type: integer
        total_distinct_units:
          description: >-
            Distinct units summed across states. A unit verified in two
            different states counts once in each, because those are two
            different events at the desk.
          title: Total Distinct Units
          type: integer
        by_decision:
          description: >-
            One entry per decision state, always all of them — a state with no
            activity reports zeroes.
          items:
            $ref: '#/components/schemas/DecisionBreakdownSchema'
          title: By Decision
          type: array
        declined_attempts:
          description: >-
            Attempts that were declined return attempts (``already_returned``,
            ``never_sold``, ``unknown_serial``).
          title: Declined Attempts
          type: integer
        declined_distinct_units:
          description: Distinct units behind ``declined_attempts``.
          title: Declined Distinct Units
          type: integer
        declined_units_with_price:
          description: >-
            Of ``declined_distinct_units``, how many carried a recorded sale
            price.
          title: Declined Units With Price
          type: integer
        estimated_prevented_value:
          description: >-
            Estimated value of the declined return attempts, per currency. **An
            estimate**, computed from the sale prices recorded on the units' own
            sale events — not a booked loss, and covering only
            ``declined_units_with_price`` of the declined units.
            ``recalled_lot`` is excluded: a recall block is product-safety
            handling, not a fraud attempt.
          items:
            $ref: '#/components/schemas/CurrencyTotalSchema'
          title: Estimated Prevented Value
          type: array
      required:
        - period_start
        - period_end
        - time_zone
        - period_truncated
        - total_attempts
        - total_distinct_units
        - by_decision
        - declined_attempts
        - declined_distinct_units
        - declined_units_with_price
        - estimated_prevented_value
      title: VerificationReportSchema
      type: object
    ErrorOut:
      description: |-
        RFC 9457 Problem Details response.

        All API errors are returned in this format with Content-Type:
        application/problem+json.
      examples:
        - detail: The requested resource was not found.
          error_code: not_found
          retryable: false
          status: 404
          timestamp: '2026-03-31T12:00:00+00:00'
          title: Not Found
          type: https://closient.com/docs/errors/not_found
        - detail: Validation error.
          details:
            - loc:
                - body
                - name
              msg: Field required
              type: missing
          error_code: validation_error
          retryable: false
          status: 422
          timestamp: '2026-03-31T12:00:00+00:00'
          title: Validation Error
          type: https://closient.com/docs/errors/validation_error
        - detail: Rate limit exceeded. Please try again later.
          error_code: rate_limited
          retry_after: 31
          retryable: true
          status: 429
          timestamp: '2026-03-31T12:00:00+00:00'
          title: Rate Limited
          type: https://closient.com/docs/errors/rate_limited
      properties:
        type:
          description: URI reference identifying the error type.
          title: Type
          type: string
        title:
          description: Short human-readable summary of the error.
          title: Title
          type: string
        status:
          description: HTTP status code.
          title: Status
          type: integer
        detail:
          description: Human-readable explanation of this specific occurrence.
          title: Detail
          type: string
        error_code:
          description: Machine-readable error code (e.g. not_found, unauthorized).
          title: Error Code
          type: string
        retryable:
          default: false
          description: Whether retrying the same request can succeed.
          title: Retryable
          type: boolean
        timestamp:
          description: ISO 8601 timestamp of when the error occurred.
          title: Timestamp
          type: string
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          description: Seconds to wait before retrying (when applicable).
          title: Retry After
        owner_action_required:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the error requires account owner intervention.
          title: Owner Action Required
        details:
          description: Additional context (validation errors, etc.).
          title: Details
      required:
        - type
        - title
        - status
        - detail
        - error_code
        - timestamp
      title: ErrorOut
      type: object
    DecisionBreakdownSchema:
      description: Counts, and where applicable money, for one decision state.
      examples:
        - attempts: 14
          decision: already_returned
          distinct_units: 9
          estimated_value:
            - amount: '1284.50'
              currency: USD
          units_with_price: 7
      properties:
        decision:
          $ref: '#/components/schemas/VerificationDecisionEnum'
          description: The decision state these numbers describe.
        attempts:
          description: >-
            Verify calls that returned this decision. The operational count:
            three scans of one unit are three attempts.
          title: Attempts
          type: integer
        distinct_units:
          description: >-
            Distinct GTIN + serial pairs (GS1 SGTIN, the unit identity) that
            returned this decision. The financial count: three scans of one unit
            are one unit.
          title: Distinct Units
          type: integer
        units_with_price:
          description: >-
            Of ``distinct_units``, how many carried a recorded sale price. The
            gap between the two is the coverage gap — ``estimated_value`` covers
            only these, and is not a total for the state.
          title: Units With Price
          type: integer
        estimated_value:
          description: >-
            Estimated value of the priced distinct units, one entry per currency
            and never summed across them. Empty for ``never_sold`` and
            ``unknown_serial`` by construction: both mean this organization
            recorded no sale for the unit, so no sale price exists.
          items:
            $ref: '#/components/schemas/CurrencyTotalSchema'
          title: Estimated Value
          type: array
      required:
        - decision
        - attempts
        - distinct_units
        - units_with_price
        - estimated_value
      title: DecisionBreakdownSchema
      type: object
    CurrencyTotalSchema:
      description: One currency's share of an estimate.
      examples:
        - amount: '1284.50'
          currency: USD
      properties:
        currency:
          description: ISO 4217 alphabetic code, e.g. USD.
          title: Currency
          type: string
        amount:
          description: >-
            Summed sale price of the distinct units counted in this currency. An
            estimate, not a booked loss.
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          type: string
      required:
        - currency
        - amount
      title: CurrencyTotalSchema
      type: object
    VerificationDecisionEnum:
      description: |-
        Verdict for one GTIN + serial verification.

        Exactly one value is returned per call. ``RECALLED_LOT`` is evaluated
        first and outranks every lifecycle state — see :func:`verify_serial`.
      enum:
        - sold
        - already_returned
        - never_sold
        - unknown_serial
        - recalled_lot
      title: VerificationDecisionEnum
      type: string
  securitySchemes:
    APIKeyHeaderAuth:
      type: apiKey
      in: header
      name: X-API-Key
    OAuthTokenAuth:
      type: http
      scheme: bearer
    CookieGatedSessionAuth:
      type: apiKey
      in: cookie
      name: sessionid

````