openapi: 3.1.0
info:
  title: Brand Page Load API
  version: v11
  description: "Tracks page loads and app opens to attribute credit for conversions. \nThis endpoint is part of the tracking infrastructure and is used to \ncapture ClickIds and determine landing pages for deep linking. \nNote: Authentication is not required for this endpoint.\n"
servers:
- url: https://trkapi.impact.com
  description: Tracking API Server
paths:
  /PageLoad:
    post:
      operationId: createPageLoad
      tags:
      - Page Load
      summary: Create a Page Load
      description: "Submits a page load or app open event. This should be triggered when a \nuser lands on a tracked page or opens a mobile app via a tracking link. \nIt returns the clickId and landingPage URL for deep linking.\n"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PageLoadRequest'
      responses:
        '200':
          description: Successfully tracked the event. The response contains tracking data such as clickId, and may include landingPage, sessionStart, or warnings.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/GatewayTrackingResponse'
                - $ref: '#/components/schemas/DirectTrackingResponse'
                - $ref: '#/components/schemas/WarningResponse'
        '400':
          description: The request was invalid due to missing or malformed parameters. The response contains an errors object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PageLoadRequest:
      type: object
      required:
      - CampaignId
      - EventDate
      - PageUrl
      - CustomProfileId
      properties:
        CampaignId:
          type: integer
          description: Unique identifier for your program.
          example: 1000
        PageUrl:
          type: string
          format: uri
          description: "**Required.** Destination URL that is intercepted by the app.\n\n- If the app open occurs from an impact.com tracking link, send the full tracking link (e.g., `https://mysite.pxf.io/c/1234567/12345/1234?sharedid=abcd`).\n- If the app is opened directly (e.g., not redirected from a URL), do not send any value.\n- If the app open occurs from a non-Impact URL, send the actual URL with `https:` (e.g., `https://www.example.com?name=value`).\n- If the app open occurs using a custom URI scheme, send the full URI (e.g., `app://view?sharedid=abcd`).\n\n**Tip:** When testing clicks and events, append `?impacttest=1` to your `PageUrl`."
          example: https://www.acme.com/products/tennis-balls
        PropertyId:
          type: integer
          description: '**Required for mobile/app opens.** For mobile app opens, this value is the "System App ID" of your app in impact.com. Found in Settings → Mobile Apps.'
          example: 12345
        AppleIfa:
          type: string
          description: '**Required for iOS app opens.** Apple ID for Advertising (IDFA) associated with the mobile device the customer converted on. Used for attribution purposes. Typically only available for iOS in-app conversions.'
          example: 38400000-8cf0-11bd-b23e-10b96e40000d
        GoogAId:
          type: string
          description: '**Required for Android app opens.** Google Advertising ID associated with the mobile device the customer converted on. Used for attribution purposes. Typically only available for Android in-app conversions.'
          example: 38400000-8cf0-11bd-b23e-10b96e40000d
        EventDate:
          type: string
          format: date-time
          description: ISO 8601 format of the event time.
          example: '2026-09-10T22:55:32-08:00'
        ReferringUrl:
          type: string
          format: uri
          description: URL of the referring website.
          example: https://www.google.com/
        CustomProfileId:
          type: string
          description: 'Anonymous user identifier. If CustomProfileId is not provided, please provide at least one of the following identifiers: GoogAId, AndroidId, AppleIfa, AppleIfv, ClickId, or CustomerId.'
          example: a1b2c3d4e5f6
        CustomerId:
          type: string
          description: Your unique non-PII customer identifier.
          example: BCZ2WVSH674563PDPYOTM3AXDQ
        CustomerEmail:
          type: string
          description: SHA-1 hashed email address.
          example: customer@gmail.com
        TrackingConsent:
          type: boolean
          description: User tracking consent status.
          example: true
        UserAgent:
          type: string
          description: User agent of the customer, used to provide device reporting. Primarily used for web traffic. See DeviceMfr and DeviceModel for the equivalent for in-app requests.
          example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
        AppleIfv:
          type: string
          description: Apple ID for Vendors (IDFV).
          example: 38400000-8cf0-11bd-b23e-10b96e40000d
        IpAddress:
          type: string
          description: IP address of the customer. The IP address is used to help the system identify fraudulent activity. The IP address can be used for attribution in the case of installs.
          example: 72.194.216.61
        AppName:
          type: string
          description: Name of the mobile app. Only for mobile events.
          example: Acme App
        AppPackage:
          type: string
          description: Package name for the mobile app the user installed. Only for mobile events.
          example: com.acme.app
        AppVer:
          type: string
          description: Version of the mobile app. Only for mobile events.
          example: 1.2.3
        DeviceMfr:
          type: string
          description: Mobile device's manufacturer. impact.com expects this to be passed in a specific format—refer to the code below that needs to be included in your mobile app to capture the value in the appropriate format.
          example: Apple
        DeviceModel:
          type: string
          description: Mobile device's model. impact.com expects this to be passed in a specific format—refer to the code below that needs to be included in your mobile app to capture the value in the appropriate format.
          example: iPhone 15
    GatewayTrackingResponse:
      type: object
      properties:
        landingPage:
          type: string
          format: uri
          description: The final destination URL for routing.
          example: https://www.mysite.com/products/145324
        clickId:
          type: string
          description: Unique click ID generated by impact.com.
          example: 0c22384eN-3765c5f900c2878068a0631b
        warnings:
          type: array
          description: Non-fatal warnings about the request.
          items:
            $ref: '#/components/schemas/Issue'
    DirectTrackingResponse:
      type: object
      properties:
        clickId:
          type: string
          description: Unique click ID generated by impact.com.
          example: QiiWXOVnrQ3SQHl24jQjyxBGUkmzfJ3i1VHrWM0
        sessionStart:
          type: string
          format: date-time
          description: The timestamp when the user session started.
          example: '2026-09-10T22:55:32-08:00'
        warnings:
          type: array
          description: Non-fatal warnings about the request.
          items:
            $ref: '#/components/schemas/Issue'
    WarningResponse:
      type: object
      properties:
        landingPage:
          type: string
          format: uri
          description: The final destination URL for routing.
          example: https://www.acme.com/products/tennis-balls
        clickId:
          type: string
          description: Unique click ID generated by impact.com.
          example: QiiWXOVnrQ3SQHl24jQjyxBGUkmzfJ3i1VHrWM0
        warnings:
          type: array
          description: Non-fatal warnings about the request.
          items:
            $ref: '#/components/schemas/Issue'
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          description: Errors that prevented the request from succeeding.
          items:
            $ref: '#/components/schemas/Issue'
        warnings:
          type: array
          description: Non-fatal warnings about the request.
          items:
            $ref: '#/components/schemas/Issue'
    Issue:
      type: object
      properties:
        field:
          type: string
          description: The request parameter that caused the message.
          example: CampaignId
        level:
          type: string
          description: The severity level of the message.
          enum:
          - WARNING
          - ERROR
        message:
          type: string
          description: A detailed explanation of the issue.
          example: Invalid campaign ID (1000)
