Skip to main content

Understanding MarketEdge in the SDK

The Entrupy iOS SDK integrates MarketEdge, a feature that provides structured condition, value, and comparable-listing data for authenticated items. Data is available in the SDK's built-in MarketEdge view or programmatically via the fetch API.

This guide explains what MarketEdge includes, how it is structured in the SDK, and how to access or display it.

Overview of MarketEdge

MarketEdge is the SDK's representation of the MarketEdge API response. It is produced after authentication and provides:

  • Source: The Entrupy MarketEdge API, which assesses authenticated items and recent market data.
  • Purpose: To augment authentication results with a condition grade, a single best-estimate market value, and comparable marketplace listings for context and trust.
  • Availability: Shown in the SDK's MarketEdge View UI, and available programmatically via Fetch MarketEdge for Item.

Structure of MarketEdge Data

The API returns a single object. The SDK models map to the following sections (see the Public API reference for full JSON and Swift types).

1. Identifier

Identifies the authentication/report this MarketEdge data belongs to.

  • entrupy_id: (e.g., "a1b2c3d4") - Use this identifier to reference the item/report.

2. MarketGrade

Market grade and how it was rated, based on submitted images.

  • section_description: (e.g., "Condition rating based on the images submitted.") - Short explanation of this section.
  • values: (type: EntrupyMarketGradeValue) - The MarketGrade details.
  • error: (when present) - Section-level error if the grade could not be computed.

Grade values include:

  • rating – Overall condition label (e.g. "Good", "Excellent").
  • issues – List of noted issues (e.g. "Surface scratches or scuffs", "General wear and tear").
  • details – Per-region condition (exterior, hardware, stitching, etc.), each with item_region_display_name and description.
  • rating_explanation – Human-readable summary of why this rating was assigned.
  • rating_ui_details – UI metadata (title, selected index, color scale) for rendering the grade.

3. MarketValue

Best estimate of the item's value from recent market data.

  • section_description: (e.g., "Best estimate of the item's value based on recent market data.") - Short description of this section.
  • price: (e.g., "$1,204.00") - Formatted market value string.
  • error: (when present) - Section-level error if value could not be estimated.

4. MarketMatch

Similar recent listings used to support the market value and as comparables.

  • section_description: (e.g., "Recent listings similar to the item you submitted.") - Short description of this section.
  • values: (type: [EntrupyMarketMatchValue]) - Array of comparable listing records.
  • error: (when present) - Section-level error if listings could not be fetched.

Each listing (EntrupyMarketMatchValue) can include:

  • title – Full listing title.
  • platform – Marketplace name (e.g. "Vestiaire Collective").
  • link – URL to the listing.
  • brand – Brand name (e.g. "Chanel").
  • image_url – URL of the listing image.
  • category – Product category (e.g. "Wallet").
  • style – Style description.
  • description – Similarity/listing description.
  • price – Formatted price string.
  • time_of_report – Unix timestamp when the listing/report was captured.

5. Disclaimer

  • disclaimer – Array of strings; legal/usage disclaimers (e.g. image quality, that value does not factor in grade).

6. Errors

  • error – Top-level or section-level error when the report or a section cannot be produced. The error model includes message, show, retry, and ecode (e.g. "market_edge_data_unavailable").

Accessing and Displaying MarketEdge in the SDK

Built-in UI: Prefer the MarketEdge View UI. Use displayMarketEdgeViewForItem(withEntrupyID:withConfiguration:) to show grade, value, match, and disclaimers in the SDK's screen.

Programmatic access: When you need the data in your own UI or business logic, use Fetch MarketEdge for Item (fetchMarketEdgeForItem(withEntrupyID:)). Set entrupyApp.marketEdgeDelegate and handle success/failure in the delegate; the response type aligns with the structure above (identifier, Market Grade, MarketValue, MarketMatch, disclaimer, error).

Benefits of Using MarketEdge

  • Clear condition: A single grade plus issues and per-region details help users understand item condition.
  • Market context: A best-estimate value and comparable listings support pricing and trust.
  • Consistent presentation: Use the MarketEdge View for a consistent experience, or the same data in your own UI.

Configurability and availability

  • The elements shown in the SDK's MarketEdge view may be subject to configuration by Entrupy and your integration agreement.
  • If the report or a section cannot be produced, the API returns errors (top-level or section-level); the SDK surfaces these so you can handle partial or unavailable data.

Consult Entrupy for the specific MarketEdge features and configurations available for your integration.

Next steps