> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allyy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get model



## OpenAPI

````yaml get /api/model/v1.0/customer/{customerId}/Model/{modelId}
openapi: 3.0.1
info:
  title: Model Api v1.0
  version: v1.0
servers:
  - url: https://app.allyy.io
security: []
paths:
  /api/model/v1.0/customer/{customerId}/Model/{modelId}:
    get:
      tags:
        - Model
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: modelId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: version
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ModelWithStatisticsResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ModelWithStatisticsResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ModelWithStatisticsResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2:
            - oneprediction_api
components:
  schemas:
    ModelWithStatisticsResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/Metadata'
        data:
          $ref: '#/components/schemas/Model'
      additionalProperties: false
    Metadata:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          nullable: true
        validation:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          nullable: true
        info:
          type: object
          additionalProperties:
            nullable: true
          nullable: true
      additionalProperties: false
    Model:
      type: object
      properties:
        id:
          type: string
          format: uuid
        customerId:
          type: string
          format: uuid
        dataSetId:
          type: string
          format: uuid
        dataSet:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/ModelType'
        hasStreamlitDashboard:
          type: boolean
        status:
          $ref: '#/components/schemas/ModelStatus'
        modelTrainingId:
          type: string
          format: uuid
          nullable: true
        trainingStatus:
          $ref: '#/components/schemas/ModelTrainingStatus'
          nullable: true
        trainingStarted:
          type: string
          format: date-time
          nullable: true
        trainingFinished:
          type: string
          format: date-time
          nullable: true
        trainingErrorCode:
          type: integer
          format: int32
          nullable: true
        auRoc:
          type: number
          format: float
          nullable: true
        responsePredictionConfiguration:
          $ref: '#/components/schemas/ExtendedResponsePredictionConfiguration'
        recommenderSystemConfiguration:
          $ref: '#/components/schemas/ExtendedRecommenderSystemConfiguration'
        dmPropensityConfiguration:
          $ref: '#/components/schemas/DmPropensityConfiguration'
        dmExpectedAmountConfiguration:
          $ref: '#/components/schemas/DmExpectedAmountConfiguration'
        subscriptionChurnConfiguration:
          $ref: '#/components/schemas/SubscriptionChurnConfiguration'
      additionalProperties: false
    Error:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    ValidationError:
      type: object
      properties:
        property:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    ModelType:
      enum:
        - 4
        - 6
        - 7
        - 8
        - 9
      type: integer
      format: int32
    ModelStatus:
      enum:
        - 1
        - 4
        - 5
      type: integer
      format: int32
    ModelTrainingStatus:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 20
        - 100
      type: integer
      format: int32
    ExtendedResponsePredictionConfiguration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        project:
          type: string
          nullable: true
        dataSetId:
          type: string
          format: uuid
        dataSet:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        entity:
          $ref: '#/components/schemas/EntityType'
        entityLists:
          type: array
          items:
            type: string
          nullable: true
        classes:
          type: array
          items:
            $ref: '#/components/schemas/EntityClass'
          nullable: true
        excludedAttributes:
          type: array
          items:
            $ref: '#/components/schemas/ExtendedMappedAttribute'
          nullable: true
        excludedClasses:
          type: array
          items:
            $ref: '#/components/schemas/MappedClass'
          nullable: true
        contactTypes:
          type: array
          items:
            type: string
          nullable: true
        contactSegments:
          type: array
          items:
            type: string
          nullable: true
        responseValues:
          type: array
          items:
            $ref: '#/components/schemas/ResponsePredictionResponseValue'
          nullable: true
        responsePredictionFeaturesCriterias:
          type: array
          items:
            $ref: '#/components/schemas/ResponsePredictionFeaturesCriteria'
          nullable: true
        lstmResponseTypes:
          type: array
          items:
            type: string
          nullable: true
        includeSubscriptionChangesFeatures:
          type: boolean
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        cutOffPeriod:
          type: integer
          format: int32
          nullable: true
        daysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        optimizationObjective:
          $ref: '#/components/schemas/OptimizationObjective'
        shuffleData:
          type: boolean
        dataSplit:
          $ref: '#/components/schemas/DataSplit'
      additionalProperties: false
    ExtendedRecommenderSystemConfiguration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        project:
          type: string
          nullable: true
        dataSetId:
          type: string
          format: uuid
        dataSet:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        entity:
          $ref: '#/components/schemas/EntityType'
        entityLists:
          type: array
          items:
            type: string
          nullable: true
        classes:
          type: array
          items:
            $ref: '#/components/schemas/EntityClass'
          nullable: true
        excludedAttributes:
          type: array
          items:
            $ref: '#/components/schemas/ExtendedMappedAttribute'
          nullable: true
        excludedClasses:
          type: array
          items:
            $ref: '#/components/schemas/MappedClass'
          nullable: true
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        cutOffPeriod:
          type: integer
          format: int32
          nullable: true
        daysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        responseValues:
          type: array
          items:
            $ref: '#/components/schemas/RecommenderSystemResponseValue'
          nullable: true
        previousResponseSequenceSize:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    DmPropensityConfiguration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        project:
          type: string
          nullable: true
        dataSetId:
          type: string
          format: uuid
        dataSet:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        entity:
          $ref: '#/components/schemas/EntityType'
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        cutOffPeriod:
          type: integer
          format: int32
          nullable: true
        daysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        holdoutStartDate:
          type: string
          format: date-time
          nullable: true
        holdoutEndDate:
          type: string
          format: date-time
          nullable: true
        holdoutCutOffPeriod:
          type: integer
          format: int32
          nullable: true
        holdoutDaysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        responseDefinitions:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    DmExpectedAmountConfiguration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        project:
          type: string
          nullable: true
        dataSetId:
          type: string
          format: uuid
        dataSet:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        entity:
          $ref: '#/components/schemas/EntityType'
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        cutOffPeriod:
          type: integer
          format: int32
          nullable: true
        daysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        holdoutStartDate:
          type: string
          format: date-time
          nullable: true
        holdoutEndDate:
          type: string
          format: date-time
          nullable: true
        holdoutCutOffPeriod:
          type: integer
          format: int32
          nullable: true
        holdoutDaysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        responseDefinitions:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    SubscriptionChurnConfiguration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        project:
          type: string
          nullable: true
        dataSetId:
          type: string
          format: uuid
        dataSet:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        entity:
          $ref: '#/components/schemas/EntityType'
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        cutOffPeriod:
          type: integer
          format: int32
          nullable: true
        daysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        holdoutStartDate:
          type: string
          format: date-time
          nullable: true
        holdoutEndDate:
          type: string
          format: date-time
          nullable: true
        holdoutCutOffPeriod:
          type: integer
          format: int32
          nullable: true
        holdoutDaysToLastCutOffEnd:
          type: integer
          format: int32
          nullable: true
        numberOfPeriods:
          type: integer
          format: int32
        targetWindowInDays:
          type: integer
          format: int32
      additionalProperties: false
    EntityType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 11
        - 12
        - 13
        - 14
        - 17
        - 18
        - 19
      type: integer
      format: int32
    EntityClass:
      type: object
      properties:
        name:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
      additionalProperties: false
    ExtendedMappedAttribute:
      type: object
      properties:
        entityType:
          $ref: '#/components/schemas/EntityType'
        alias:
          type: string
          nullable: true
        originalName:
          type: string
          nullable: true
      additionalProperties: false
    MappedClass:
      type: object
      properties:
        entityType:
          $ref: '#/components/schemas/EntityType'
        className:
          type: string
          nullable: true
      additionalProperties: false
    ResponsePredictionResponseValue:
      type: object
      properties:
        responseValue:
          $ref: '#/components/schemas/ModelResponseValue'
        isPositive:
          type: boolean
      additionalProperties: false
    ResponsePredictionFeaturesCriteria:
      type: object
      properties:
        responseValue:
          $ref: '#/components/schemas/ModelResponseValue'
        includedFixedPeriods:
          type: array
          items:
            $ref: '#/components/schemas/Periods'
          nullable: true
        includeRelativePeriods:
          type: boolean
      additionalProperties: false
    OptimizationObjective:
      enum:
        - 1
        - 2
      type: integer
      format: int32
    DataSplit:
      type: object
      properties:
        test:
          type: number
          format: double
        evaluation:
          type: number
          format: double
        train:
          type: number
          format: double
      additionalProperties: false
    RecommenderSystemResponseValue:
      type: object
      properties:
        responseValue:
          $ref: '#/components/schemas/ModelResponseValue'
        weight:
          type: number
          format: double
      additionalProperties: false
    ModelResponseValue:
      type: object
      properties:
        responseType:
          type: string
          nullable: true
        categoricalValue:
          type: string
          nullable: true
        numericValue:
          type: number
          format: double
          nullable: true
        boolValue:
          type: boolean
          nullable: true
        operator:
          $ref: '#/components/schemas/NumericResponseOperator'
      additionalProperties: false
    Periods:
      enum:
        - 1
        - 2
        - 3
        - 4
      type: integer
      format: int32
    NumericResponseOperator:
      enum:
        - 1
        - 2
        - 3
        - 4
      type: integer
      format: int32
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://app.allyy.io/api/authentication/connect/authorize
          scopes:
            allyy_api: Allyy API - full access

````