openapi: 3.0.0
info:
  version: 1.0.0
  title: Segmint Data Services API
  description: "#### Influence\nRetrieve a list of insights and goals achieved by
    a single customer or for a group of customers using a set of query string parameters.\n\n\n#### Integrations\n
    When integrating with Segmint's APIs you should always allow for unknown fields.
    Segmint reserves the right to add additional fields to its APIs. Segmint will
    always attempt to not introduce breaking changes into an endpoint. This is often
    accomplished by the addition of fields. If a breaking change is required clients
    will be given advanced notice to make the required changes.\n\nAccess to API endpoints
    may be rate limited and have monthly account level quotas, your account representative
    will have details if this applies to you.\n\n\n\nClick here to find out more about
    "
servers:
- url: https://dataservices-demo.segmint.net/
- url: https://dataservices-stage.segmint.net
- url: https://dataservices.segmint.net/
paths:
  "/influence/v1/partners/{partner_id}/influences/ucic/{ucic}":
    get:
      summary: Goals achieved for an individual customer
      description: |-
        Call this API passing a Segmint supplied partner_id and a UCIC and get back details
        about the goal achieved (customer influence).<br><ul><li>Use the impression_id
        as an input to the “Details for a single impression” endpoint to gather more
        information about an impression served.</li></ul>

        ### <span style="color:var(--red)">Fields marked with an * are required. </span>
      responses:
        '200':
          description: Ok
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/InfluenceUCIC"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '404':
          description: Not found
        '500':
          description: Server error
      security:
      - BearerAuthentication: []
      parameters:
      - name: partner_id
        in: path
        required: true
        description: Partner ID provided to the Financial Institution by Segmint.
        schema:
          type: integer
      - name: ucic
        in: path
        required: true
        description: Customer being searched.
        schema:
          type: string
      tags:
      - "/influence"
  "/influence/v1/partners/{partner_id}/influences/id/{influence_id}":
    get:
      summary: Details for a single goal achieved
      description: |- 
        Call this API passing a Segmint supplied partner_id and an influence_id and get
        back details about the goal achieved (customer influence).<br><ul><li>Use
        the impression_id as an input to the “Details for a single impression” endpoint
        to gather more details about an impression served.</li></ul>
        ### <span style="color:var(--red)">Fields marked with an * are required. </span>
      responses:
        '200':
          description: Ok
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/InfluenceID"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '404':
          description: Not found
        '500':
          description: Server error
      security:
      - BearerAuthentication: []
      parameters:
      - name: partner_id
        in: path
        required: true
        description: Partner ID provided to the Financial Institution by Segmint.
        schema:
          type: integer
      - name: influence_id
        in: path
        required: true
        description: ID of the goal achieved (customer influence) being searched.
        schema:
          type: integer
          format: int64
      tags:
      - "/influence"
  "/influence/v1/partners/{partner_id}/influences":
    get:
      summary: All goals achieved for an FI
      description: |- 
        Call
        this API passing a Segmint supplied partner_id and query parameters to get
        back details about all goals achieved or a filtered list of goals achieved.<br/><ul><li>Use
        the influence_id as an input to the “Single goal achieved for a given Influence
        ID” endpoint to gather more details about the specific goal achieved.</li><li>Use
        the ucic as an input to the “Goals achieved for an individual customer” endpoint
        to gather more details about all goals achieved by the customer.</li><li>Use
        the ucic as an input to the “Insights and goals achieved for a single customer”
        endpoint to obtain all KLIs assigned to the customer and all goals achieved
        by the customer.</li></ul>
        ### <span style="color:var(--red)">Fields marked with an * are required. </span>
      responses:
        '200':
          description: Ok
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Influences"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '404':
          description: Not found
        '500':
          description: Server error
      parameters:
      - name: partner_id
        in: path
        required: true
        description: Partner ID provided to the Financial Institution by Segmint.
        schema:
          type: integer
      - name: ucic_type
        in: query
        description: Indicator describing the type of customer, 'I' individual or
          'O' business / organization.
        schema:
          type: string
          enum:
          - I
          - O
      - name: ucic_is_active
        in: query
        description: Flag indicating if the customer is currently an active customer
          of the Financial Institution.
        schema:
          type: string
          enum:
          - true
          - false
      - name: from_date
        in: query
        description: Search start date (YYYY-MM-DD).
        schema:
          type: string
      - name: to_date
        in: query
        description: Search end date (YYYY-MM-DD).
        schema:
          type: string
      - name: limit
        in: query
        description: The number of rows to be returned per page (default 1000).
        schema:
          type: integer
      - name: offset
        in: query
        description: Row number to start returning data.
        schema:
          type: integer
      tags:
      - "/influence"
      security:
      - BearerAuthentication: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized
    BadRequest:
      description: Bad Request. Check your credentials
    BadPasswordUpperCase:
      description: 'Password did not conform with policy: Password must have uppercase
        characters'
    BadPasswordLowerCase:
      description: 'Password did not conform with policy: Password must have lowercase
        characters'
    BadPasswordLength:
      description: New password must have a length greater than 8
    BadPasswordSpecial:
      description: 'Password did not conform with policy: Password must have symbol
        characters'
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/PasswordErrors"
    ToManyRequests:
      description: You have exceeded your throughput rate or quota for your account
        plan.
    Forbidden:
      description: You do not have permission to access this resource.
  securitySchemes:
    BearerAuthentication:
      type: http
      description: Obtain a token using the /auth/v1/token endpoint
      scheme: bearer
      bearerFormat: JWT
  schemas:
    InfluenceUCIC:
      type: array
      items:
        properties:
          influence_id:
            type: integer
            description: Unique ID for the goal achieved (customer influence).
            example: 898487
          ucic:
            type: string
            description: Unique customer identification code assigned to the customer
              by the Financial Institution.
            example: e2c96790-fd69-11e8-9ff7-bf083b0e566c
          uaic:
            type: string
            description: Unique account identification code for the account assigned
              by the Financial Institution.
            example: 630563
          ucic_is_active:
            type: boolean
            description: Flag indicating if the customer is currently an active customer
              of the Financial Institution.
            example: true
          goal_kli_code:
            type: integer
            description: KLI (code) associated to the campaign goal.
            example: 8616234
          goal_kli_desc:
            type: string
            description: KLI (description) associated to the campaign goal.
            example: BUSINESS BORROWING
          product_influenced:
            type: string
            description: Description of the product that was converted (customer influenced).
            example: COMMERCIAL LOAN
          product_influenced_kli_code:
            type: integer
            description: KLI (code) of the product that was converted (customer influenced).
            example: 9999999
          conversion_date:
            type: string
            description: Recorded date of the product opening at the FI.
            example: Mon, 15 Oct 2018 00:00:00 GMT
          posted_date:
            type: string
            description: Posted date of the customer influence within the Segmint
              platform.
            example: Thu, 18 Oct 2018 00:00:00 GMT
          face_value:
            type: string
            description: Face value associated to the goal achieved (customer influence).
            example: 500000
          campaign_ids:
            type: array
            items:
              type: integer
            description: IDs of the campaign(s) that influenced the customer to achieve
              the goal.
            example:
            - 5001
            - 5002
          campaign_names:
            type: array
            items:
              type: string
            description: Names of the campaign(s) that influenced the customer to
              achieve the goal.
            example:
            - BUSINESS LINE OF CREDIT
            - BUSINESS COMMERCIAL LOAN
          media_ids:
            type: array
            items:
              type: integer
            description: IDs of the media that influenced the customer to achieve
              the goal
            example:
            - 10001
            - 10002
            - 10003
          media_names:
            type: array
            items:
              type: string
            description: Names of the media that influenced the customer to achieve
              the goal.
            example:
            - Media 1
            - Media 2
            - Media 3
          impression_ids:
            type: array
            items:
              type: integer
              format: int64
            description: IDs of the impressions that influenced the customer to achieve
              the goal.
            example:
            - 1462108154211872000
            - 1473130915289900800
            - 1478044921775532000
    InfluenceID:
      properties:
        influence_id:
          type: integer
          description: Unique ID for the goal achieved (customer influence).
          example: 898487
        ucic:
          type: string
          description: Unique customer identification code assigned to the customer
            by the Financial Institution.
          example: e2c96790-fd69-11e8-9ff7-bf083b0e566c
        uaic:
          type: string
          description: Unique account identification code for the account assigned
            by the Financial Institution.
          example: 630563
        ucic_is_active:
          type: boolean
          description: Flag indicating if the customer is currently an active customer
            of the Financial Institution.
          example: true
        goal_kli_code:
          type: integer
          description: KLI (code) associated to the campaign goal.
          example: 8616234
        goal_kli_desc:
          type: string
          description: KLI (description) associated to the campaign goal.
          example: BUSINESS BORROWING
        product_influenced:
          type: string
          description: Description of the product that was converted (customer influenced).
          example: COMMERCIAL LOAN
        product_influenced_kli_code:
          type: integer
          description: KLI (code) of the product that was converted (customer influenced).
          example: 99999999
        conversion_date:
          type: string
          description: Recorded date of the product opening at the FI.
          example: Mon, 15 Oct 2018 00:00:00 GMT
        posted_date:
          type: string
          description: Posted date of the customer influence within the Segmint platform.
          example: Thu, 18 Oct 2018 00:00:00 GMT
        face_value:
          type: string
          description: Face value associated to the goal achieved (customer influence).
          example: 500000
        campaign_ids:
          type: array
          items:
            type: integer
          description: IDs of the campaign(s) that influenced the customer to achieve
            the goal.
          example:
          - 5001
          - 5002
        campaign_names:
          type: array
          items:
            type: string
          description: Names of the campaign(s) that influenced the customer to achieve
            the goal.
          example:
          - BUSINESS LINE OF CREDIT
          - BUSINESS COMMERCIAL LOAN
        media_ids:
          type: array
          items:
            type: integer
          description: IDs of the media that influenced the customer to achieve the
            goal.
          example:
          - 10001
          - 10002
          - 10003
        media_names:
          type: array
          items:
            type: string
          description: Names of the media that influenced the customer to achieve
            the goal.
          example:
          - MEDIA 1
          - MEDIA 2
          - MEDIA 3
        impression_ids:
          type: array
          items:
            type: integer
            format: int64
          description: IDs of the impressions that influenced the customer to achieve
            the goal.
          example:
          - 1462108154211872000
          - 1473130915289900800
          - 1478044921775532000
    Influences:
      properties:
        metadata:
          type: object
          properties:
            limit:
              type: integer
              description: Number of rows to be returned per page for this query.
              example: 5
            offset:
              type: integer
              description: Row number to start returning data.
              example: 0
            current:
              type: string
              description: URL for the current page of data.
              example: https://dataservices-demo.segmint.net/influence/v1/partners/12345678/influences?ucic_type=I&from_date=2018-10-01&to_date=2018-11-30&limit=100
            next:
              type: string
              description: URL for the next page of data.
              example: https://dataservices-demo.segmint.net/influence/v1/partners/12345678/influences?ucic_type=I&from_date=2018-10-01&to_date=2018-11-30&limit=100&offset=100
        content:
          type: array
          items:
            type: object
            properties:
              ucic:
                type: string
                description: Unique customer identification code assigned to the customer
                  by the Financial Institution.
                example: e2c96790-fd69-11e8-9ff7-bf083b0e566c
              ucic_type:
                type: string
                description: Indicator describing the type of customer, 'I' individual
                  or 'O' business / organization.
                example: I
              ucic_is_active:
                type: boolean
                description: Flag indicating if the customer is currently an active
                  customer of the Financial Institution.
                example: true
              influence_id:
                type: array
                items:
                  type: integer
                description: Ordered list of unique IDs for the goals achieved (customer
                  influences).
                example:
                - 901344
                - 901353
              posted_date:
                type: array
                items:
                  type: string
                description: Ordered list of posted dates for goals achieved (customer
                  influences).
                example:
                - Fri, 19 Oct 2018 00:00:00 GMT
                - Fri, 19 Oct 2018 00:00:00 GMT
              goal_kli_code:
                type: array
                items:
                  type: integer
                description: Ordered list of KLIs associated to the customer influenced
                  goals achieved.
                example:
                - 8616200
                - 8616200