Cardlytics Publisher API v2

The bank-side rewards platform API. A publisher opens an institution- or customer-scoped session, retrieves ranked targeted card-linked offers for a customer, and reads that customer's profile, reward summary and redemption history. Requires mutual TLS with a Cardlytics-signed client certificate plus an IP allow list, then an X-CDLX-Session-Token header.

OpenAPI Specification

cardlytics-publisher-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
- url: https://publisher-uk-fiuat.cardlytics.com
  description: Generated server url
paths:
  /v2/session/startSession:
    post:
      tags:
      - session-controller
      operationId: startSession
      parameters:
      - name: X-CDLX-Institution-Id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartSessionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartSessionResponse'
  /v2/ads/getAds:
    post:
      tags:
      - ads-controller
      operationId: getAds
      parameters:
      - name: X-CDLX-Session-Token
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAdsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAdsResponse'
  /v2/customerProfile/getCustomerRewardSummary:
    get:
      tags:
      - customer-controller
      operationId: getRewardsSummary
      parameters:
      - name: X-CDLX-Session-Token
        in: header
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardSummary'
  /v2/customerProfile/getCustomerProfile:
    get:
      tags:
      - customer-controller
      operationId: getCustomerProfile
      parameters:
      - name: X-CDLX-Session-Token
        in: header
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
  /v2/customerProfile/getCustomerAdRedemptions:
    get:
      tags:
      - customer-controller
      operationId: getCustomerAdRedemptions
      parameters:
      - name: X-CDLX-Session-Token
        in: header
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAdRedemptionResponse'
components:
  schemas:
    StartSessionRequest:
      required:
      - sourceCustomerId
      type: object
      properties:
        sourceCustomerId:
          type: string
        scopes:
          type: array
          items:
            type: string
            example: api:customer
        organizationId:
          type: string
    StartSessionResponse:
      type: object
      properties:
        sessionToken:
          type: string
    GeoCoordinate:
      type: object
      properties:
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
    GetAdsRequest:
      required:
      - channel
      type: object
      properties:
        customerLocation:
          $ref: '#/components/schemas/GeoCoordinate'
        channel:
          type: string
          enum:
          - Email
          - SMS
          - MMS
          - OLB
          - MobileWeb
          - MobileApp
          - MobileWallet
        sections:
          type: array
          items:
            type: string
            enum:
            - Email
            - SMS
            - MMS
            - Transaction
            - Summary
            - Dashboard
            - Landing
            - OnboardingPage
            - LatestOffers
            - ExpiringSoon
            - RewardSummaryListView
            - FeaturedOffers
            - EntertainmentCategory
            - FoodCategory
            - RetailCategory
            - ServicesCategory
            - TravelCategory
        categoryIds:
          type: array
          items:
            type: string
        curationIds:
          type: array
          items:
            type: string
        activationStates:
          type: array
          items:
            type: string
            example: ACTIVATED
            enum:
            - NEW
            - SERVED
            - ACTIVATED
        visibilityStates:
          type: array
          items:
            type: string
            enum:
            - VISIBLE
            - PARKED
        redemptionStates:
          type: array
          items:
            type: string
            example: FULLY_REDEEMED
            enum:
            - PROCESSING
            - FULLY_REDEEMED
        maxAdLimit:
          type: integer
          format: int32
        returnMetadata:
          type: boolean
          example: false
        returnStoreLocation:
          type: boolean
          example: false
        includeExpiredAds:
          type: boolean
          example: false
    Ad:
      type: object
      properties:
        adType:
          type: string
          enum:
          - CASH_BACK_OFFER
        adServeToken:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        activationDate:
          type: string
          format: date-time
        merchantName:
          type: string
        sections:
          type: array
          items:
            type: string
            enum:
            - Email
            - SMS
            - MMS
            - Transaction
            - Summary
            - Dashboard
            - Landing
            - OnboardingPage
            - LatestOffers
            - ExpiringSoon
            - RewardSummaryListView
            - FeaturedOffers
            - EntertainmentCategory
            - FoodCategory
            - RetailCategory
            - ServicesCategory
            - TravelCategory
        reward:
          $ref: '#/components/schemas/AdReward'
        activationState:
          type: string
          enum:
          - NEW
          - SERVED
          - ACTIVATED
        visibilityState:
          type: string
          enum:
          - VISIBLE
          - PARKED
        redemptionState:
          type: string
          enum:
          - PROCESSING
          - FULLY_REDEEMED
        assets:
          $ref: '#/components/schemas/AdAssetList'
    AdAssetList:
      type: object
      properties:
        logo:
          $ref: '#/components/schemas/Image'
        largeRectangle:
          $ref: '#/components/schemas/Image'
        smallRectangle:
          $ref: '#/components/schemas/Image'
        copy:
          $ref: '#/components/schemas/Text'
        callsToAction:
          $ref: '#/components/schemas/CallsToAction'
    AdImageValue:
      type: object
      properties:
        large:
          $ref: '#/components/schemas/ImageURL'
        small:
          $ref: '#/components/schemas/ImageURL'
    AdRankings:
      type: object
      properties:
        all:
          type: array
          items:
            type: string
    AdReward:
      type: object
      properties:
        rewardType:
          type: string
          enum:
          - PERCENT_AMOUNT_PURCHASE
          - FIXED_AMOUNT_PURCHASE
          - METERED_AMOUNT_PURCHASE
        rewardAmount:
          type: number
          format: float
        maxRewardAmount:
          type: number
          format: float
        isMultiRedemption:
          type: boolean
        purchaseRequirement:
          $ref: '#/components/schemas/PurchaseRequirement'
    CallToActionLink:
      type: object
      properties:
        type:
          type: string
          example: WEB_LINK
        value:
          type: string
    CallsToAction:
      type: object
      properties:
        type:
          type: string
          example: CALL_TO_ACTION_LINKS
          enum:
          - IMAGE_URL
          - AD_COPY
          - CALL_TO_ACTION_LINKS
        value:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CallToActionLink'
    CategoryGroup:
      type: object
      properties:
        name:
          type: string
        id:
          type: string
        subcategories:
          type: array
          items:
            $ref: '#/components/schemas/CategoryGroup'
    GetAdsResponse:
      type: object
      properties:
        requestId:
          type: string
        ads:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Ad'
        rankings:
          $ref: '#/components/schemas/AdRankings'
        categories:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CategoryGroup'
        storeLocations:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/StoreLocation'
    Image:
      type: object
      properties:
        type:
          type: string
          example: IMAGE_URL
          enum:
          - IMAGE_URL
          - AD_COPY
          - CALL_TO_ACTION_LINKS
        value:
          $ref: '#/components/schemas/AdImageValue'
    ImageURL:
      type: object
      properties:
        url:
          type: string
        width:
          type: integer
          format: int32
        height:
          type: integer
          format: int32
    PurchaseRequirement:
      type: object
      properties:
        minSpendAmount:
          type: number
          format: float
        purchaseChannels:
          type: array
          items:
            type: string
            enum:
            - InStore
            - Online
            - PayAtPump
            - App
            - Convenience
        purchaseTypes:
          type: array
          items:
            type: string
            enum:
            - Membership
            - Subscription
            - Fuel
    StoreLocation:
      type: object
      properties:
        storeName:
          type: string
        address:
          $ref: '#/components/schemas/StoreLocationAddress'
        phoneNumber:
          type: string
        distance:
          type: number
          format: float
        latitude:
          type: number
          format: float
        longitude:
          type: number
          format: float
    StoreLocationAddress:
      type: object
      properties:
        addressLine1:
          type: string
        addressLine2:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        country:
          type: string
    Text:
      type: object
      properties:
        type:
          type: string
          example: AD_COPY
          enum:
          - IMAGE_URL
          - AD_COPY
          - CALL_TO_ACTION_LINKS
        value:
          type: object
          additionalProperties:
            type: string
    RewardSummary:
      type: object
      properties:
        requestId:
          type: string
        rewardsSummary:
          $ref: '#/components/schemas/RewardSummaryTotals'
    RewardSummaryTotals:
      type: object
      properties:
        allTime:
          $ref: '#/components/schemas/RewardSummary'
        pending:
          $ref: '#/components/schemas/RewardSummary'
        yearToDate:
          $ref: '#/components/schemas/RewardSummary'
        previousCalendarYear:
          $ref: '#/components/schemas/RewardSummary'
        previousMonth:
          $ref: '#/components/schemas/RewardSummary'
        previousTwelveMonths:
          $ref: '#/components/schemas/RewardSummary'
        currentMonth:
          $ref: '#/components/schemas/RewardSummary'
    Account:
      type: object
      properties:
        sourceAccountId:
          type: string
        sourceCustomerIds:
          type: array
          items:
            type: string
        primarySourceCustomerId:
          type: string
        status:
          type: string
          enum:
          - OPEN
          - CLOSED
          - DISPUTE
          - FRAUD
        type:
          type: string
          enum:
          - PPD
          - MMA
          - CRD
          - DDA
          - SAV
          - SBCRD
          - SBDDA
          - SBS
        sourcePortfolioId:
          type: string
        accountOpenDate:
          type: string
        accountCloseDate:
          type: string
        cards:
          type: array
          items:
            $ref: '#/components/schemas/Card'
    Card:
      type: object
      properties:
        sourceAccountId:
          type: string
        sourceCustomerId:
          type: string
        last4:
          type: string
        iin:
          type: string
        cardType:
          type: string
        status:
          type: string
        networkIdentifier:
          type: integer
          format: int32
        openDate:
          type: string
        closeDate:
          type: string
    Customer:
      type: object
      properties:
        requestId:
          type: string
        sourceCustomerId:
          type: string
        institutionId:
          type: string
        organizationId:
          type: string
        postalCode:
          type: string
        country:
          type: string
        customerCreationDate:
          type: string
        enrollmentStartDate:
          type: string
        enrollmentEndDate:
          type: string
        enrollmentOptInStatus:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
        alertOptInStatus:
          type: array
          items:
            type: string
            enum:
            - ALL
            - NEW
            - ACTIVATED
            - EXPIRING
            - REDEMPTION
            - CLOSE_THE_LOOP
            - MISSED_OPPORTUNITY
        targetingIndicator:
          type: string
          enum:
          - TARGET
          - DO_NOT_TARGET
        portfolios:
          type: array
          items:
            $ref: '#/components/schemas/Portfolio'
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/Account'
    Portfolio:
      type: object
      properties:
        sourcePortfolioId:
          type: string
        institutionId:
          type: string
        institutionName:
          type: string
          deprecated: true
        portfolioName:
          type: string
        tagline:
          type: string
          deprecated: true
        description:
          type: string
          deprecated: true
        rewardCurrencyUnit:
          type: string
        rewardToCurrencyConversionRate:
          type: string
    CustomerAdRedemptionResponse:
      type: object
      properties:
        requestId:
          type: string
        redemptions:
          type: array
          items:
            $ref: '#/components/schemas/Redemption'
        ads:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Ad'
    Redemption:
      type: object
      properties:
        redemptionId:
          type: string
        adId:
          type: string
        amount:
          type: number
          format: float
        redemptionDate:
          type: string
          format: date-time
        sourceCustomerId:
          type: string
        sourceAccountId:
          type: string
        redeemingTransactionAmount:
          type: number
          format: float
        transactionId:
          type: string
        rewardSettlementRunDate:
          type: string
          format: date-time