Structures

The following structures are available globally.

  • Topsort’s API response for events

    See more

    Declaration

    Swift

    public struct EventResponse : Codable, JSONEncodable, Hashable
  • HitEvents are sent to Topsort when the consumer has clicked or tapped on a product impression. Topsort charges the vendor and pays the marketplace for clicks on impressions in promoted placements on the e-commerce app.

    See more

    Declaration

    Swift

    public struct HitEvent : Encodable, JSONEncodable, Hashable
  • An Impression is any rendering of a product in the app.

    See more

    Declaration

    Swift

    public struct Impression : Encodable, JSONEncodable, Hashable
  • A product has become visible to the consumer. In case you cannot send the impression when the product is visible, send us an impression event when the product was rendered in the HTML or if that’s also not possible when your API returns the results. It is important to select the most specific event so that your vendors have more accurate CTR metrics, which allow them to better predict their campaigns.

    See more

    Declaration

    Swift

    public struct ImpressionEvent : Encodable, JSONEncodable, Hashable
  • Topsort API response for a single ImpressionEvent.

    See more

    Declaration

    Swift

    public struct ImpressionResponse : Codable, JSONEncodable, Hashable
  • The consumer has purchased some products.

    See more

    Declaration

    Swift

    public struct PurchaseEvent : Encodable, JSONEncodable, Hashable
  • Undocumented

    See more

    Declaration

    Swift

    public struct PurchaseItem : Codable, JSONEncodable, Hashable
  • The Session object allows correlating user activity during a session whether or not they are actually logged in.

    See more

    Declaration

    Swift

    public struct Session : Encodable, JSONEncodable, Hashable
  • A description of the error sent by the Topsort API

    See more

    Declaration

    Swift

    public struct TopsortError : Codable, JSONEncodable, Hashable