openapi: 3.0.0
info:
  version: 1.0.0
  title: Segmint Data Services API
  description: "#### UCIC\n Retrieve 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:
  "/ucic/v1/partners/{partner_id}/ucics/{ucic}":
    get:
      summary: Insights and goals achieved for a single customer.
      description: |- 
        Call
        this API passing a Segmint supplied partner_id and a UCIC and get back a list
        of insights and goals achieved for the customer.<ul><li>Use the KLI listed
        in the kli_assigned as an input to the “Details for a single KLI” endpoint
        to obtain additional information about the specific KLI.</li><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></ul>
        ### <span style="color:var(--red)">Fields marked with an * are required. </span>
      responses:
        '200':
          description: Ok
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/SingleUCICDetail"
        '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:
      - "/ucic"

  "/ucic/v1/partners/{partner_id}/ucics":
    get:
      summary: Insights and goals achieved for a group of customers.
      description: |- 
        Call
        this API passing a Segmint supplied partner_id and query parameters to get
        back insights and goals achieved for a group of customers.<ul><li>Use the
        KLI listed in the kli_assigned as an input to the “Details for a single KLI”
        endpoint to obtain additional information about the specific KLI.</li><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></ul>
        ### <span style="color:var(--red)">Fields marked with an * are required. </span>
      responses:
        '200':
          description: Ok
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/AllUCICDetail"
        '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_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: limit
        in: query
        description: 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:
      - "/ucic"
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:
    UCICKLIDetail:
      properties:
        kli_code:
          type: integer
          description: Unique code for the Key Lifestyle Indicator (KLI).
          example: 8850775
        kli_is_active:
          type: boolean
          description: Flag indicating if the KLI is currently active.
          example: true
        kli_class:
          type: string
          description: Flag indicating the privacy of the KLI, Public or Private to
            the Financial Institution.
          example: PUBLIC
        kli_categorization:
          type: string
          description: For leaf KLIs only, provides one level of KLI categorization.
          example: OTHER COMPETITIVE BANKING TRANSACTIONS
        kli_description:
          type: string
          description: Description of the KLI.
          example: MISC. TRANSACTION FEE
        kli_is_competitive:
          type: boolean
          description: Flag (Y/N) indicating if the KLI describes a customer insight
            related to activity with competitive Financial Institution.
          example: true
        kli_is_leaf:
          type: boolean
          description: Flag (Y/N) indicating if the KLI is at the lowest level of
            the Segmint KLI taxonomy (no children KLIs exist).
          example: true
        primary_attribute:
          type: string
          description: Short description indicating the value attributing to KLI assignment
            (if available).
        primary_owner:
          type: boolean
          description: For account-based KLIs only, flag indicating if the customer
            is the primary owner of the account
          example: true
        uaic:
          type: string
          description: For account-based KLIs only, a unique account identification
            code for the account.
        uaic_close_date:
          type: string
          description: For account-based KLIs only, an account closed date (YYYY-MM-DD)
            for the customer.
        uaic_open_date:
          type: string
          description: For account-based KLIs only, an account open date (YYYY-MM-DD)
            for the customer.
    SingleUCICDetail:
      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
        ucic_process_date:
          type: string
          description: Date (YYYY-MM-DD) the customer was first analyzed for KLI assignment
            by Segmint.
          example: Thu, 31 Jul 2014 00:00:00 GMT
        ucic_control_id:
          type: integer
          description: Unique ID assigned to the customer that can be used by the
            FI for data analytics
          example: 0.867618858348578
        kli_assigned:
          type: array
          items:
            type: integer
          description: Full list of KLIs (codes) currently assigned to a customer.
          example:
          - 34426758
          - 10595230
          - 10595233
        campaign_influence:
          type: array
          items:
            type: integer
          description: List of goals achieved (IDs) for which the customer was influenced
            by a Segmint impression.
          example:
          - 202346
    AllUCICDetail:
      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/ucic/v1/partners/12345678/ucics?ucic_type=O&ucic_is_active=TRUE&limit=10
            next:
              type: string
              description: URL for the next page of data.
              example: https://dataservices-demo.segmint.net/ucic/v1/partners/12345678/ucics?ucic_type=O&ucic_is_active=TRUE&limit=10&offset=10
        content:
          type: array
          items:
            type: object
            properties:
              ucic:
                type: string
                description: Unique customer identification code assigned to the customer
                  by the FI.
                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
              goal_kli_code:
                type: integer
                description: KLI associated to the campaign goal.
                example: 8616234
              ucic_process_date:
                type: string
                description: Date (YYYY-MM-DD) the customer was first analyzed for
                  KLI assignment by Segmint.
                example: Thu, 31 Jul 2014 00:00:00 GMT
              ucic_control_id:
                type: integer
                description: Unique ID assigned to the customer that can be used by
                  the FI for data analytics
                example: 0.867618858348578
              kli_assigned:
                type: array
                items:
                  type: integer
                description: Full list of KLIs (codes) currently assigned to a customer
                example:
                - 34426758
                - 10595230
                - 10595233
              campaign_influence:
                type: array
                items:
                  type: integer
                description: List of goals achieved (IDs) for which the customer was
                  influenced by a Segmint impression.
                example:
                - 202346