openapi: 3.1.0
info:
  title: Brand API - Deferred Deep Linking
  description: |-
    API for retrieving deferred deep link information after an app has been installed.
    This call is intended to only provide information about the deep link and does not log a conversion event.
  version: v12
servers:
- url: https://trkapi.impact.com
security:
- basicAuth: []
paths:
  /DeferredDeepLink:
    post:
      summary: Get Deferred Deep Link
      description: |-
        Retrieves deferred deep linking information after a user has installed and opened the app for the first time.
        This endpoint only accepts a Content-Type of `application/x-www-form-urlencoded`.
      operationId: getDeferredDeepLink
      tags:
      - Deferred Deep Linking
      requestBody:
        description: The details of the app install event required to retrieve the deep link information.
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - CampaignId
              - ImpactAppId
              - EventDate
              properties:
                CampaignId:
                  type: integer
                  description: Unique identifier for your program (campaign) in impact.com.
                  example: 1000
                ImpactAppId:
                  type: integer
                  description: Your app's "System App Id" in the impact.com platform.
                  example: 12345
                EventDate:
                  type: string
                  format: date-time
                  description: The date and time the app install occurred (ISO 8601).
                  example: '2026-09-10T22:55:32-08:00'
                IpAddress:
                  type: string
                  description: Public IP Address of the device. Automatically collected if the call is made from within the app.
                  example: 192.168.1.1
                AppleIfa:
                  type: string
                  description: Apple's Identifier for Advertising (IFA).
                  example: 38400000-8cf0-11bd-b23e-10b96e40000d
                GoogAId:
                  type: string
                  description: Google Advertising Identifier (GAID).
                  example: 38400000-8cf0-11bd-b23e-10b96e40000d
                AppInstallRef:
                  type: string
                  description: The install referrer value from the Google Play Store.
                  example: utm_source=affiliate&utm_campaign=summer
                AppPackage:
                  type: string
                  description: The unique app/bundle ID from the respective app store.
                  example: com.acme.app
                CustomProfileId:
                  type: string
                  description: Your third-party web tracking cookie/identifier.
                  example: a1b2c3d4e5f6
      responses:
        '200':
          description: The request was processed successfully. The response contains the deep link information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepLinkSuccessResponse'
        '400':
          description: The request was invalid due to missing or malformed parameters. The response contains errors and warnings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepLinkErrorResponse'
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -L \
            --request POST \
            --url 'https://trkapi.impact.com/DeferredDeepLink' \
            --user '{AccountSID}:{AuthToken}' \
            --header 'Content-Type: application/x-www-form-urlencoded' \
            --header 'Accept: */*'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your AccountSID as the username and AuthToken as the password.
  schemas:
    DeepLinkSuccessResponse:
      type: object
      properties:
        landingPage:
          type: string
          format: uri
          description: The URL of the web page the user was on before being deferred to the app store.
          example: https://www.acme.com/products/tennis-balls
        clickId:
          type: string
          description: The unique identifier generated by impact.com for the referring click.
          example: QiiWXOVnrQ3SQHl24jQjyxBGUkmzfJ3i1VHrWM0
        clickIpAddress:
          type: string
          description: The IP address captured when the user clicked the tracking link.
          example: 192.168.1.1
        connectionIpAddress:
          type: string
          description: The IP address captured when the app made this API request.
          example: 192.168.1.2
    DeepLinkErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ResponseMessage'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ResponseMessage'
    ResponseMessage:
      type: object
      properties:
        field:
          type: string
          description: The parameter in the request that caused the message.
          example: CampaignId
        level:
          type: string
          enum:
          - ERROR
          - WARNING
          description: The severity level of the message.
          example: ERROR
        message:
          type: string
          description: A detailed explanation of the issue.
          example: Invalid campaign ID (1000)
x-default-client: cURL
