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

# Core Objects

> Shared reference for the Offer, Event, and Transaction object shapes.

[← Back to API Integration](/integration/api-integration)

Three object shapes cover most of the API. Endpoints below reference these rather than repeating the field list.

## The Offer object

Returned by Campaigns, MyAdvertisers, and Rewards widget data.

<Expandable title="Offer fields">
  <ResponseField name="id" type="string">
    Unique identifier of the offer.
  </ResponseField>

  <ResponseField name="partner" type="string">
    The partner brand name associated with the offer.
  </ResponseField>

  <ResponseField name="partnerLogo" type="string">
    URL to the partner's logo image.
  </ResponseField>

  <ResponseField name="ageRestricted" type="boolean">
    Whether the offer is age-restricted. Gate the placement accordingly.
  </ResponseField>

  <ResponseField name="title" type="string">
    Offer title, e.g. "50% Discount".
  </ResponseField>

  <ResponseField name="description" type="string">
    Offer description text.
  </ResponseField>

  <ResponseField name="terms" type="string">
    Offer terms and conditions. Must be displayed with the offer.
  </ResponseField>

  <ResponseField name="image / squareImage" type="string">
    Main image URL and its square variant.
  </ResponseField>

  <ResponseField name="offerInfoButtonDiscount / offerInfoButtonDescription" type="string">
    Discount value and supporting copy for the info button, where set.
  </ResponseField>

  <ResponseField name="offerDiscountCode" type="string">
    The discount code provided by the partner, if any.
  </ResponseField>

  <ResponseField name="offerDiscountCodeType" type="string">
    One of `availableAtClick`, `copyPaste`, `availableAtCheckout`, `dynamic`, `uniqodo`. Determines how the code should be surfaced to the customer.
  </ResponseField>

  <ResponseField name="hasMultipleCodes" type="boolean">
    Whether more than one discount code exists for the offer.
  </ResponseField>
</Expandable>

## The Event object

<Expandable title="Event fields">
  <ResponseField name="id / type" type="string">
    Event identifier and its type.
  </ResponseField>

  <ResponseField name="timestamp" type="integer">
    Unix time in milliseconds.
  </ResponseField>

  <ResponseField name="host" type="string">
    The site the event happened on.
  </ResponseField>

  <ResponseField name="userId / customUserId" type="string">
    Tyviso's anonymous user ID, plus your own ID where you pass one.
  </ResponseField>

  <ResponseField name="device" type="string">
    e.g. `mobile`.
  </ResponseField>

  <ResponseField name="offerId / partnerId / partnerName" type="string">
    Which offer and partner brand the event relates to.
  </ResponseField>

  <ResponseField name="placement / position" type="string / integer">
    Where in the widget the offer appeared, and its rank.
  </ResponseField>

  <ResponseField name="preview" type="boolean">
    True for internal preview traffic — exclude it from reporting.
  </ResponseField>
</Expandable>

## The Transaction object

<Expandable title="Transaction fields">
  <ResponseField name="id" type="string">
    Transaction identifier.
  </ResponseField>

  <ResponseField name="referenceId" type="string">
    The click or event this conversion is attributed to.
  </ResponseField>

  <ResponseField name="status" type="string">
    e.g. `pending` until validated.
  </ResponseField>

  <ResponseField name="netCommission" type="number">
    Commission earned on the transaction.
  </ResponseField>

  <ResponseField name="transactionDate / validationDate" type="integer">
    When it happened, and when it was validated — null while pending.
  </ResponseField>

  <ResponseField name="offerId / partnerId / host" type="string">
    Attribution context, as on the Event object.
  </ResponseField>
</Expandable>
