openapi: 3.1.0
info:
  version: 1.0.0
  title: Check and Decide
  description: |

    # Introduction

    Endpoints to access pre-configured decision trees to automate
    credit decisions. Decision Engine can help you save time and money across
    your company by automating time consuming processes which drain your
    company's resources. This can free you and your staff to spend more time
    to work on achieving your business goals.</br></br>A full audit trail of
    previous decisions is maintained for user access and decisions in a
    pending state can be manually approved or declined.
tags:
  - name: Authentication
  - name: Instance Management
  - name: Decision Trees
  - name: Decision Logs
  - name: Run Decision
  - name: Decision Outcome
servers:
  - url: https://connect.sandbox.creditsafe.com/v1
    description: Sandbox server
  - url: https://connect.creditsafe.com/v1
    description: Production server
paths:
  /authenticate:
    post:
      operationId: authenticate
      summary: Authenticate
      security: []
      tags:
        - Authentication
      description: |
        Supply username and password to generate Authentication Token.
          
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectAuthenticationAuthRequest'
        required: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectAuthenticationAuthResponse'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
  /decisionEngine/instances:
    get:
      tags:
        - Instance Management
      description: Returns all instances (Decision Trees) a user has permission to access.
      operationId: returnAllInstances
      summary: Return All Available Instances
      parameters:
        - name: customerId
          description: >-
            The unique identifier of the customer. If used it will return all
            the Decision Trees associated to that customer.
          in: query
          schema:
            type: integer
        - name: userId
          description: >-
            The unique identifier of the user. If used it will return all the
            Decision Trees that user has access to.
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDecisionEngineInstancesResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesAccessForbidden'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConnectErrorResponsesResourceNotFoundRequest
  /decisionEngine/instance/{guid}:
    get:
      tags:
        - Instance Management
      description: Returns instance user has permission to access.
      operationId: instanceConfiguration
      summary: Instance Configuration
      parameters:
        - name: guid
          in: path
          required: true
          description: Get results by guid.
          schema:
            type: string
        - name: category
          in: query
          required: false
          description: Filters instance by contract category i.e., Bronze, Silver or Gold.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesAccessForbidden'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConnectErrorResponsesResourceNotFoundRequest
    put:
      tags:
        - Instance Management
      description: >-
        Update the instances information.<br><br>You will need to call the `GET
        /decisionEngine/instance/{guid}` endpoint to get the current
        configuration and then update the fields you want to change.
      operationId: updateInstanceConfiguration
      summary: Update Instance Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateDecisionEngineInstanceRequestBodyWithExample
      parameters:
        - name: guid
          in: path
          required: true
          description: get results by guid.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesAccessForbidden'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConnectErrorResponsesResourceNotFoundRequest
  /decisionEngine/GUID:
    get:
      tags:
        - Decision Trees
      description: Returns all decision trees that the user has permission to access.
      operationId: decisionTrees
      summary: Decision Trees
      parameters:
        - $ref: '#/components/parameters/sortDir'
        - name: type
          in: query
          description: >-
            Filter the returned decision trees by their associated decision tree
            type.
          schema:
            type: string
            enum:
              - Credit Approval
              - CS Decision Module
              - Demo
              - Credit Approval, CS Decision Module
        - name: sortBy
          in: query
          description: Sort results by this column.
          schema:
            type: string
            enum:
              - friendlyName
        - name: decisionOutcome
          in: query
          description: Fetch decision outcome in guid list endpoint.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectDecisionEngineGUIDListResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
  /decisionEngine/{provenirId}/userDataFields:
    get:
      tags:
        - Decision Trees
      description: Returns the user data fields defined for the given decision tree GUID.
      operationId: userDataFields
      summary: User Data Fields
      parameters:
        - name: provenirId
          in: path
          required: true
          description: The unique identifier of the decision tree, obtained from `/GUID`.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConnectDecisionEngineUserDataFieldsResponse
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
  /decisionEngine/{provenirId}:
    post:
      tags:
        - Run Decision
      description: >-
        Runs the provided decision tree for the given company, optionally using
        the data provided in the body of the call.
      operationId: runDecisionTree
      summary: Run Decision Tree
      parameters:
        - name: provenirId
          in: path
          required: true
          description: >-
            The unique identifier of the decision tree to run, obtained from
            `/GUID`.
          schema:
            type: string
        - name: companyId
          in: query
          required: true
          description: >-
            The Connect ID for the company that you wish to run the decision
            tree on. Obtained from `/companies` search results. A Connect ID is
            the primary Company identifier that is used to uniquely identify all
            companies across Creditsafe's Universe and Partner Network.
          schema:
            type: string
            example: GB-0-03836192
        - name: originationId
          in: query
          required: false
          description: >-
            An optional field that will allow text passed through to be stored
            against the decision. Typically used for internal identifiers (e.g.
            SalesForce IDs).
          schema:
            type: string
            example: SFC-1976
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                The POST body should contain the User Data Fields for the
                decision tree you want to run obtained via the
                `/{guid}/userDataFields` endpoint.
              example:
                productType: Product A
                isCustomer: 'Yes'
                salesValue: 197600
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectDecisionEngineRunDecisionResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
  /decisionEngine/usageLog:
    get:
      tags:
        - Decision Logs
      description: >-
        Returns a log of all previously ran decisions that the user has
        permission to access, optionally filtered.
      operationId: decisionHistory
      summary: Decision History
      parameters:
        - name: provenirId
          in: query
          description: >-
            Filter the returned usage log by the GUID for the associated
            decision trees, obtained from `/GUID`.
          schema:
            type: string
            example: repoObj_0ed6a4aa_16e17d977e9_07ffb16e17d977e9
        - name: companyId
          in: query
          description: >-
            Filter the returned usage log by the Connect ID for the associated
            companies for each decision.
          schema:
            type: string
            example: US001-X-US60521352
        - name: companyName
          in: query
          description: >-
            Filter the returned usage log by the Company Name for the associated
            companies for each decision.
          schema:
            type: string
            example: CREDITSAFE
        - name: status
          in: query
          description: Filter the returned usage log by the status for each decision.
          schema:
            type: number
            example: 1
        - name: fromDate
          in: query
          description: Filter the returned usage log by the date the the decision was run.
          schema:
            type: string
            format: date-time
        - name: toDate
          in: query
          description: Filter the returned usage log by the date the the decision was run.
          schema:
            type: string
            format: date-time
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectDecisionEngineUsageLogResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
  /decisionEngine/usageLog/{decisionLogId}:
    get:
      tags:
        - Decision Logs
      description: Returns a specified decision log for a previously ran decision.
      operationId: getDecisionLog
      summary: Get Decision Log
      parameters:
        - name: decisionLogId
          in: path
          required: true
          description: >-
            The unique identifier of the decision log to retrieve, obtained from
            `/usageLog`.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectDecisionEngineDecisionLogResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
    patch:
      tags:
        - Decision Logs
      description: Updates the status and/or notes for a specified decision.
      operationId: updateDecisionLog
      summary: Update Decision Log
      parameters:
        - name: decisionLogId
          in: path
          required: true
          description: >-
            The unique identifier of the decision log to retrieve, obtained from
            `/usageLog`.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectDecisionEngineUpdateDecisionRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectDecisionEngineDecisionLogResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
  /decisionEngine/decisionOutcome/{guid}:
    get:
      tags:
        - Decision Outcome
      description: Returns decision outcomes which is set for decision tree.
      operationId: decisionOutcome
      summary: Return Decision Outcome
      parameters:
        - name: guid
          in: path
          required: true
          description: get results by guid.
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDecisionEngineDecisionOutcomeResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesAccessForbidden'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConnectErrorResponsesResourceNotFoundRequest
    patch:
      tags:
        - Decision Outcome
      description: This allows the user to manually update the decision outcome
      operationId: UpdateDecisionEngineDecisionOutcomeDetails
      summary: Update Decision Outcome
      parameters:
        - name: guid
          in: path
          required: true
          description: updates decision outcomes by guid.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ConnectDecisionEnginePatchDecisionOutcomeRequest
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Decision outcome updated successfully.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesBadRequest'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesInvalidToken'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectErrorResponsesAccessForbidden'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConnectErrorResponsesResourceNotFoundRequest
components:
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This API requires authentication for access to protected endpoints.
        Authentication is performed by providing a valid JWT token in the
        `Authorization` header of each request.
  schemas:
    ConnectAuthenticationAuthRequest:
      type: object
      properties:
        username:
          type: string
          description: Credentials assigned upon sign up
          example: username@domain.com
        password:
          type: string
          example: ^1gHySRA56aj>tf421o
    ConnectAuthenticationAuthResponse:
      type: object
      properties:
        token:
          type: string
          description: Authentication Token
          example: >-
            eyJhbGciOiJSUzI1NiIsImtpZCI6ImRodTNnNkFtTG5QQXVpOEJSMUFEVnp5ZHBnZyIsInR5cCI6IkpXVCIsIng1dCI6ImRodTNnNkFtTG5QQXVpOEJSMUFEVnp5ZHBnZyJ9.eyJuYmYiOjE1OTU0MTYyMDksImV4cCI6MTU5NTQxOTgwOSwiaXNzIjoiaHR0cHM6Ly9teWxvZ2luLnRlc3QuY3JlZGl0c2FmZS5jb20iLCJhdWQiOlsiaHR0cHM6Ly9teWxvZ2luLnRlc3QuY3JlZGl0c2FmZS5jb20vcmVzb3VyY2VzIiwiY29ubmVjdF9hcGkiLCJ1Ym9fYXBpX2dhdGV3YXkiXSwiY2xpZW50X2lkIjoiY29ubmVjdC5hcGkuY2xpZW50Iiwic3ViIjoiMTAxNTIwMjg1IiwiYXV0aF90aW1lIjoxNTk1NDE2MjA5LCJpZHAiOiJsb2NhbCIsInVzZXJuYW1lIjoiQ29ubmVjdHUxIiwiZW1haWwiOiJDb25uZWN0MUBnbWFpbC5jb20iLCJjdXN0b21lcklkIjoiMTAxNzY0NDA1IiwiY291bnRyeSI6IkMwIiwidXNlclJvbGUiOiJDcm1BZG1pblBsdXMiLCJzYl9jb3VudHJ5IjoiVVMiLCJzY29wZSI6WyJjb25uZWN0X2FwaSIsInVib19hcGlfZ2F0ZXdheSJdLCJhbXIiOlsicHdkIl19.p8kPAlKNB9iWEKiQbfbRXBoLQuBG7NuEDN__A8AQ55CL-gcIwkS1717Af1f9W0uifwIQ6HAZQR_x191LVkvuWD94Zw8zLzzr1ioUIhQny_zYuAS3G6EFNaTHh_mvOQ9XVi1FyuIy6YYcYcNLNZurFuITF2w5LuX4YQBjQy3rhEAdRoKcUKbtCClMFaH2dV35jiX2d7BqyhtJ8GeZyJ6yfMfdzznqxlJ4Osf5aasKUy8RYKEpjU2pkCURojoy5_oviGs8X4U9mJWcuajmPF3i5DHkqbhq1Mp0UZrDyoq_0BDStV5xqRgq6aOY8mc45kX7cwY3O2hPeGE7Ak8YtKFbA
    ConnectErrorResponsesInvalidToken:
      type: object
      properties:
        error:
          type: string
      description: >-
        401 - Authorization Token has either expired or is not a valid Connect
        Token
    GetDecisionEngineInstancesResponse:
      properties:
        correlationId:
          description: A unique ID assigned to this request.
          type: string
        instances:
          description: The list of decision trees and GUID's available to user.
          items:
            properties:
              decisionTreeName:
                type: string
              guid:
                type: string
            type: object
          type: array
      type: object
    ConnectErrorResponsesBadRequest:
      type: object
      description: Bad Request
      properties:
        correlationId:
          type: string
          description: A unique ID assigned to this request.
        message:
          type: string
        details:
          type: string
          description: Provides further information on why the request was rejected
    ConnectErrorResponsesAccessForbidden:
      type: object
      description: 403 - Access Forbidden
      properties:
        message:
          type: string
          example: Access forbidden
    ConnectErrorResponsesResourceNotFoundRequest:
      type: object
      description: 404 - Not Found
      properties:
        correlationId:
          type: string
          description: A unique ID assigned to this request.
          format: uuid
        message:
          type: string
        details:
          type: string
          description: Provides further information on why the request was rejected
    UpdateDecisionEngineInstanceRequestBodyWithExample:
      UpdateDecisionEngineInstanceRequestBodyWithExample:
        allOf:
          - $ref: '#/components/schemas/UpdateDecisionEngineInstanceRequestBody'
          - type: object
            example:
              $ref: >-
                #/components/examples/UpdateDecisionEngineInstanceRequestBodyExample
    ConnectDecisionEngineGUIDListResponse:
      type: object
      properties:
        correlationId:
          type: string
          description: A unique ID assigned to this request.
          example: 23921650-c073-11ea-860f-06bc8182190e
        GUIDList:
          type: array
          items:
            properties:
              friendlyName:
                type: string
                description: The name of the decision tree.
                example: Check & Decide Demo
              GUID:
                type: string
                description: The unique reference for the decision tree.
                example: repoObj_0ed6a4aa_16e17d977e9_07ffb16e17d977e9
              type:
                type: string
                enum:
                  - Credit Approval
                  - Bespoke
                  - Demo
                description: The type of the decision tree.
              serviceLine:
                type: string
                description: >-
                  The internal reference for the service line that credits will
                  be deducted from on each decision tree run.
                example: dec_eng_cas
                nullable: true
    ConnectDecisionEngineUserDataFieldsResponse:
      type: object
      properties:
        decisionEngineId:
          type: string
          description: The unique reference for the decision tree.
          example: repoObj_0ed6a4aa_16e17d977e9_07ffb16e17d977e9
        fields:
          type: array
          description: >-
            A list of user-input data fields that are supported by the provided
            decision tree. The values for these fields should be passed to the
            `/{guid}` endpoint call when running a decision.
          items:
            properties:
              orderIndex:
                type: number
                description: Used to assist ordering of the user data fields on a UI.
                example: 100
              label:
                type: string
                description: The user-friendly label for the field for display on a UI.
                example: Product Type
              paramName:
                type: string
                description: >-
                  The string value for the parameter to be used when calling the
                  `/{guid}` endpoint.
                example: productType
              fieldType:
                type: string
                enum:
                  - Text
                  - Integer
                  - Dropdown
                description: The type of user data field.
                example: Dropdown
              mandatory:
                type: boolean
                description: >-
                  Flag to dictate whether the user data field is required when
                  running the associated decision tree.
                example: true
              dropdownDetails:
                type: array
                nullable: true
                items:
                  properties:
                    label:
                      type: string
                      description: >-
                        The user-friendly label for the drop-down option for
                        display on a UI.
                      example: Product A
                    presentationOrder:
                      type: number
                      description: >-
                        Used to assist ordering of the drop-down options on a
                        UI.
                      example: 100
              validation:
                type: array
                nullable: true
                description: >-
                  Optional validation rules that should be applied to the
                  corresponding user data field prior to running the decision
                  tree.
                items:
                  properties:
                    validationType:
                      type: string
                      enum:
                        - Regex Match
                        - Maximum
                        - Minimum
                        - Length
                        - Custom
                      description: The type of validation rule.
                      example: Minimum
                    validationValue:
                      type: string
                      description: The value for the validation rule.
                      example: 100
                    description:
                      type: string
                      description: A description for the validation rule.
                      example: Minimum Sales Value $100
    ConnectDecisionEngineRunDecisionResponse:
      type: object
      properties:
        Decision:
          type: string
          description: The decision returned by the automated decision model.
          example: Reject
          nullable: true
        DecisionText:
          type: string
          description: >-
            The text output to accompany the decision returned by the decision
            model.
          example: >-
            The Sales Value requested is greater than Creditsafe's recommended
            credit limit.
          nullable: true
        Audits:
          type: array
          description: >-
            An array of audit values. The parameters output for audit are
            tailored and bespoke to each decision tree.
          nullable: true
          items:
            properties:
              description:
                type: string
                description: >-
                  The value for the audit parameter at the point in time in
                  which the decision tree was run.
                example: A
                nullable: true
              RuleName:
                type: string
                description: The friendly name for the audit parameter.
                example: International Score
                nullable: true
        originationId:
          type: string
          description: >-
            Displays the optional text passed through to be stored against the
            decision in the original call to `/{provenirId}`. Typically used for
            internal identifiers (e.g. SalesForce IDs).
          example: SFC-1976
          nullable: true
        statusCode:
          type: string
          description: >-
            The status of the decision. typically, 1 is reserved for positive
            outcomes, 2 for pending status and 3 for negative outcomes.
          example: 3
          nullable: true
    ConnectDecisionEngineUsageLogResponse:
      type: object
      properties:
        totalCount:
          type: number
          description: >-
            The total number of previous decisions matching the defined filter
            criteria.
          example: 3108
        usageLog:
          type: array
          items:
            properties:
              decisionLogId:
                type: number
                description: The unique identifier for the decision log.
                example: 64492
              provenirId:
                type: string
                description: The unique identifier of the decision tree.
                example: repoObj_0ed6a4aa_16e17d977e9_07ffb16e17d977e9
              friendlyName:
                type: string
                description: The name of the decision tree.
                example: Check & Decide Demo
              userId:
                type: number
                description: >-
                  The unique identifier for the user's account, used across the
                  Creditsafe product suite.
                example: 101445010
              companyId:
                type: string
                description: >-
                  The connectId of the company that the decision was ran on. A
                  connectId is the primary Company identifier that is used to
                  uniquely identify all companies across Creditsafe's Universe
                  and Partner Network.
                example: US001-X-US60521352
              companyName:
                type: string
                description: The name of the company that the decision was ran on.
                example: CREDITSAFE USA INC.
                nullable: true
              response:
                type: object
                properties:
                  Decision:
                    type: string
                    description: The decision returned by the automated decision model.
                    example: Reject
                  DecisionText:
                    type: string
                    description: >-
                      The text output to accompany the decision returned by the
                      decision model.
                    example: >-
                      The Sales Value requested is greater than Creditsafe's
                      recommended credit limit.
                  Audits:
                    type: array
                    description: >-
                      An array of audit values. The parameters output for audit
                      are tailored and bespoke to each decision tree.
                    items:
                      properties:
                        description:
                          type: string
                          description: >-
                            The value for the audit parameter at the point in
                            time in which the decision tree was run.
                          example: A
                        RuleName:
                          type: string
                          description: The friendly name for the audit parameter.
                          example: International Score
                  originationId:
                    type: string
                    description: >-
                      Displays the optional text passed through to be stored
                      against the decision in the original call to
                      `/{provenirId}`. Typically used for internal identifiers
                      (e.g. SalesForce IDs).
                    example: SFC-1976
                    nullable: true
                  statusCode:
                    type: string
                    description: >-
                      The status of the decision. typically, 1 is reserved for
                      positive outcomes, 2 for pending status and 3 for negative
                      outcomes.
                    example: 3
              decisionDate:
                type: string
                format: date-time
                description: The timestamp that the decision model was run.
              notes:
                type: string
                nullable: true
                description: The notes associated with this decision.
              status:
                type: number
                description: >-
                  The status of the decision. typically, 1 is reserved for
                  positive outcomes, 2 for pending status and 3 for negative
                  outcomes.
                example: 3
    ConnectDecisionEngineDecisionLogResponse:
      type: object
      properties:
        correlationId:
          type: string
          description: A unique ID assigned to this request.
          example: 23921650-c073-11ea-860f-06bc8182190e
          deprecated: true
        decisionLogId:
          type: number
          description: The unique identifier for the decision log.
          example: 64492
        provenirId:
          type: string
          description: The unique identifier of the decision tree.
          example: repoObj_0ed6a4aa_16e17d977e9_07ffb16e17d977e9
        friendlyName:
          type: string
          description: The name of the decision tree.
          example: Check & Decide Demo
        userId:
          type: number
          description: >-
            The unique identifier for the user's account, used across the
            Creditsafe product suite.
          example: 101445010
        companyId:
          type: string
          description: >-
            The connectId of the company that the decision was ran on. A
            connectId is the primary Company identifier that is used to uniquely
            identify all companies across Creditsafe's Universe and Partner
            Network.
          example: US001-X-US60521352
        companyName:
          type: string
          description: The name of the company that the decision was ran on.
          example: CREDITSAFE USA INC.
          nullable: true
        response:
          type: object
          properties:
            Decision:
              type: string
              description: The decision returned by the automated decision model.
              example: Reject
            DecisionText:
              type: string
              description: >-
                The text output to accompany the decision returned by the
                decision model.
              example: >-
                The Sales Value requested is greater than Creditsafe's
                recommended credit limit.
            Audits:
              type: array
              description: >-
                An array of audit values. The parameters output for audit are
                tailored and bespoke to each decision tree.
              items:
                properties:
                  description:
                    type: string
                    description: >-
                      The value for the audit parameter at the point in time in
                      which the decision tree was run.
                    example: A
                  RuleName:
                    type: string
                    description: The friendly name for the audit parameter.
                    example: International Score
            statusCode:
              type: string
              description: >-
                The status of the decision. Typically, 1 is reserved for
                positive outcomes, 2 for pending status and 3 for negative
                outcomes.
              example: 3
        decisionDate:
          type: string
          format: date-time
          description: The timestamp that the decision model was run.
        originationId:
          type: string
          description: >-
            Displays the optional text passed through to be stored against the
            decision in the original call to `/{provenirId}`. Typically used for
            internal identifiers (e.g. SalesForce IDs).
          example: SFC-1976
          nullable: true
        status:
          type: number
          description: >-
            The status of the decision. typically, 1 is reserved for positive
            outcomes, 2 for pending status and 3 for negative outcomes.
          example: 3
        notes:
          type: string
          nullable: true
          description: The notes associated with this decision.
        modifiedDate:
          type: string
          format: date-time
          description: The timestamp that this decision was last modified.
    ConnectDecisionEngineUpdateDecisionRequest:
      ConnectDecisionEngineUpdateDecisionRequest:
        type: object
        properties:
          statusCode:
            type: number
            description: >-
              The status that the decision will be updated to. Typically, 1 is
              reserved for positive outcomes, 2 for pending status and 3 for
              negative outcomes.
            example: 1
          notes:
            type: string
            description: >-
              Free text field to allow for the saving of notes on the associated
              decision object.
            example: Manually approved by Senior Credit Controller.
    GetDecisionEngineDecisionOutcomeResponse:
      type: object
      properties:
        correlationId:
          type: string
          description: A unique ID assigned to this request.
          example: 23921650-c073-11ea-860f-06bc8182190e
        includeInManualReview:
          type: boolean
          description: >-
            This key is used to enable or restrict the manual review process for
            pending status.
          example: true
        decisionOutcomes:
          type: object
          properties:
            items:
              type: array
              items:
                type: object
                properties:
                  status:
                    type: number
                    description: >-
                      The status of the decision. typically, 1 is reserved for
                      positive outcomes, 2 for pending status, 3 for negative
                      outcomes,5 for manually approved outcomes and 6 for
                      manually rejected outcomes.
                  label:
                    type: string
                    description: >-
                      Value that is typically chosen to depict the possible
                      outcome for different statuses.
                  description:
                    type: string
                    description: >-
                      Statement that defines the reasoning behind an outcome for
                      a status.
    ConnectDecisionEnginePatchDecisionOutcomeRequest:
      ConnectDecisionEnginePatchDecisionOutcomeRequest:
        type: object
        properties:
          includeInManualReview:
            type: boolean
            description: >-
              This key is used to enable or restrict the manual review process
              for pending status.
            example: true
          decisionOutcomes:
            type: array
            items:
              type: object
              properties:
                status:
                  type: number
                  description: >-
                    The status of the decision. typically, 1 is reserved for
                    positive outcomes, 2 for pending status, 3 for negative
                    outcomes, 5 for manually approved outcomes and 6 for
                    manually rejected outcomes.
                label:
                  type: string
                  description: >-
                    Value that is typically chosen to depict the possible
                    outcome for different statuses.
                description:
                  type: string
                  description: >-
                    Statement that defines the reasoning behind an outcome for a
                    status.
  parameters:
    sortDir:
      sortDir:
        name: sortDir
        in: query
        description: The direction that you wish to sort results by.
        schema:
          type: string
          default: asc
          enum:
            - asc
            - desc
    page:
      name: page
      in: query
      description: Starting page number.
      schema:
        type: integer
        default: 1
    pageSize:
      name: pageSize
      in: query
      description: Number of items to return per Page.
      schema:
        type: integer
security:
  - bearerToken: []
