Xfactor.io Collaboration Manager API

The buyer-facing collaboration surface — a separate login, and read access to a shared value proposition's discovery, benefits, factors and assets. 8 paths, 10 operations, Auth0 bearer authentication. This is the service behind the shared value-proposition experience a seller sends to a customer.

OpenAPI Specification

decisionlink-collaboration-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Collaboration Manager
  version: 0.1.0
  x-api-evangelist-source: https://api.xfactor.io/api/v1/collaboration/openapi.json
paths:
  /v1/collaboration/:
    post:
      tags:
      - collaboration
      summary: Create a token for a new collaboration
      description: "Endpoint for creating a JWT for a collaboration\n\nParameters\n----------\ncollaboration : Collaboration\n\
        \    The collaboration being created\n\nReturns\n-------\nJSONResponse\n    Returns success and access_token for collaboration"
      operationId: create_collaboration_v1_collaboration__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Collaboration'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/collaboration/login:
    post:
      tags:
      - login
      summary: Login a user for collaboration manager
      description: "Endpoint for logging into the collaboration manager\n\nParameters\n----------\nlogin : Login\n    The\
        \ login credentials\n\nReturns\n-------\nAccessToken\n    Returns access_token for collaboration manager"
      operationId: collaboration_login_v1_collaboration_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Login'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollaborationMetadata'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/collaboration/valueProps/discovery:
    get:
      tags:
      - discovery_questions
      summary: Get the Discovery Questions for a Collaboration
      description: "Endpoint for reading Discovery Questions\n\nReturns\n-------\nList[DiscoveryQuestion]\n    Returns the\
        \ Discovery Questions"
      operationId: get_discovery_questions_v1_collaboration_valueProps_discovery_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DiscoveryQuestion'
                type: array
                title: Response Get Discovery Questions V1 Collaboration Valueprops Discovery Get
      security:
      - HTTPBearer: []
    patch:
      tags:
      - discovery_questions
      summary: Save the Discovery Question Answers for a Collaboration
      description: "Endpoint for saving Discovery Question Answers\n\nParameters\n----------\nquestions : DiscoveryAnswerPayload\n\
        \    The answers to Discovery Questions\n\nReturns\n-------\nMessageResponse\n    Returns success and message"
      operationId: create_discovery_questions_v1_collaboration_valueProps_discovery_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoveryAnswerPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/collaboration/valueProps/benefits:
    get:
      tags:
      - benefits
      summary: Get the Benefits for a Collaboration organized by Value Category
      description: "Endpoint for reading Benefits for a Collaboration organized by Value Category\n\nReturns\n-------\nList[ValueCategory]\n\
        \    Returns the Benefits organized by Value Category"
      operationId: get_benefits_v1_collaboration_valueProps_benefits_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ValueCategory'
                type: array
                title: Response Get Benefits V1 Collaboration Valueprops Benefits Get
      security:
      - HTTPBearer: []
  /v1/collaboration/valueProps/benefits/active:
    patch:
      tags:
      - benefits
      summary: Save the Benefit Active statuses for Collaboration benefits
      description: "Endpoint for saving Benefit Active statuses\n\nParameters\n----------\nbenefits : BenefitActivePayload\n\
        \    The Benefits and their Active statuses\n\nReturns\n-------\nMessageResponse\n    Returns success and message"
      operationId: update_benefit_active_status_v1_collaboration_valueProps_benefits_active_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BenefitActivePayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/collaboration/valueProps/factors:
    get:
      tags:
      - factors
      summary: Get the Factors for a Collaboration organized by Factor Group
      description: "Endpoint for reading Factors for a Collaboration organized by Factor group\n\nReturns\n-------\nList[FactorGroup]\n\
        \    Returns the Factors organized by Factor Group"
      operationId: get_factors_v1_collaboration_valueProps_factors_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FactorGroup'
                type: array
                title: Response Get Factors V1 Collaboration Valueprops Factors Get
      security:
      - HTTPBearer: []
    patch:
      tags:
      - factors
      summary: Save the values for Collaboration factors
      description: "Endpoint for saving Factors\n\nParameters\n----------\nfactors : FactorPayload\n    The Factors and their\
        \ values\n\nReturns\n-------\nMessageResponse\n    Returns success and message"
      operationId: update_factors_v1_collaboration_valueProps_factors_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FactorPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/collaboration/valueProps/asset:
    get:
      tags:
      - assets
      summary: Get the Asset associated with the Collaboration
      description: "Endpoint for reading Asset associated with the Collaboration\n\nReturns\n-------\nAsset\n    Returns success\
        \ and the asset_url"
      operationId: get_asset_v1_collaboration_valueProps_asset_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
      security:
      - HTTPBearer: []
  /healthz:
    get:
      tags:
      - health
      summary: Health
      description: Provides information about the health of the application
      operationId: health_healthz_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
components:
  schemas:
    Asset:
      properties:
        success:
          type: boolean
          title: Success
          description: Success of the request
        asset_url:
          type: string
          title: Asset Url
          description: URL to download the asset
      type: object
      required:
      - success
      - asset_url
      title: Asset
      description: Asset model
    Benefit:
      properties:
        id:
          type: string
          title: Id
          description: ID for the Benefit
        name:
          type: string
          title: Name
          description: Name of the Benefit
        description:
          type: string
          title: Description
          description: Description of the Benefit
        active:
          type: string
          title: Active
          description: Active status of the Benefit
      type: object
      required:
      - id
      - name
      - description
      - active
      title: Benefit
      description: Benefit model
    BenefitActive:
      properties:
        value_prop_metric_id:
          type: string
          title: Value Prop Metric Id
          description: The ID for the Benefit
        active:
          type: string
          title: Active
          description: The active status for the Benefit
      type: object
      required:
      - value_prop_metric_id
      - active
      title: BenefitActive
      description: BenefitActive model
    BenefitActivePayload:
      properties:
        benefits:
          items:
            $ref: '#/components/schemas/BenefitActive'
          type: array
          title: Benefits
          description: The list of Benefit Active statuses to save
      type: object
      required:
      - benefits
      title: BenefitActivePayload
      description: BenefitActivePayload model
    Collaboration:
      properties:
        hash:
          type: string
          title: Hash
          description: Hash for external share
        expires:
          type: string
          format: date-time
          title: Expires
          description: Date when the share expires
        email:
          type: string
          title: Email
          description: The email of the user being collaborated with
      type: object
      required:
      - hash
      - expires
      - email
      title: Collaboration
      description: Collaboration model
    CollaborationMetadata:
      properties:
        access_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
          description: The access token for authenicating with collaboration manager
        account_asset_template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Account Asset Template Id
          description: The selected asset for the customer to download
        assumptions_editable:
          type: string
          title: Assumptions Editable
          description: Denotes whether or not the assumptions should be shown and editable
        benefits_editable:
          type: string
          title: Benefits Editable
          description: Denotes whether or not the benefits should be shown and editable
        discovery_questions_enabled:
          type: string
          title: Discovery Questions Enabled
          description: Denotes whether or not the discovery questions should be shown and editable
        user_id:
          type: string
          title: User Id
          description: The Value Execution user_id for the collaboration user
        value_prop_id:
          type: string
          title: Value Prop Id
          description: The ID for the Value Proposition being collaborated on
        features:
          anyOf:
          - type: string
          - type: 'null'
          title: Features
          description: The features active on the host account
          default: ''
        currency_type_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Currency Type Id
          description: The currency type ID for the collaboration
        currency_abbreviation:
          anyOf:
          - type: string
          - type: 'null'
          title: Currency Abbreviation
          description: The currency abbreviation for the collaboration
      type: object
      required:
      - assumptions_editable
      - benefits_editable
      - discovery_questions_enabled
      - user_id
      - value_prop_id
      title: CollaborationMetadata
      description: CollaborationMetadata model
    DiscoveryAnswer:
      properties:
        id:
          type: string
          title: Id
          description: The ID for the Discovery Question
        answer:
          type: string
          title: Answer
          description: The answer to the Discovery Question
      type: object
      required:
      - id
      - answer
      title: DiscoveryAnswer
      description: DiscoveryAnswer model
    DiscoveryAnswerPayload:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/DiscoveryAnswer'
          type: array
          title: Questions
          description: The list of Discovery Question Answers to save
      type: object
      required:
      - questions
      title: DiscoveryAnswerPayload
      description: DiscoveryAnswerPayload model
    DiscoveryQuestion:
      properties:
        id:
          type: string
          title: Id
          description: ID for the Discovery Question
        sequence:
          type: string
          title: Sequence
          description: Sequence for the Discovery Question
        name:
          type: string
          title: Name
          description: Name of the Discovery Question
        description:
          type: string
          title: Description
          description: Description of the Discovery Question
        question_type:
          $ref: '#/components/schemas/QuestionType'
          description: Denotes the type of question, i.e, short text, long text, Yes/No, etc...
        required:
          type: boolean
          title: Required
          description: Denotes whether the question is required or not
        answer:
          type: string
          title: Answer
          description: The answer that has been given to the Discovery Question
        placeholder:
          type: string
          title: Placeholder
          description: Optional placeholder to show if no answer has been given
      type: object
      required:
      - id
      - sequence
      - name
      - description
      - question_type
      - required
      - answer
      - placeholder
      title: DiscoveryQuestion
      description: DiscoveryQuestion model
    Factor:
      properties:
        id:
          type: string
          title: Id
          description: ID for the Factor
        sequence:
          type: string
          title: Sequence
          description: Sequence of the Factor
        name:
          type: string
          title: Name
          description: Name of the Factor
        description:
          type: string
          title: Description
          description: Description of the Factor
        unit_type_id:
          type: string
          title: Unit Type Id
          description: Unit type of the Factor
        unit_type:
          $ref: '#/components/schemas/UnitType'
          description: Unit Type object for the Factor Unit Type
        precision:
          type: string
          title: Precision
          description: Decimal precision for the Factor
        value:
          anyOf:
          - type: string
          - type: integer
          - type: number
          title: Value
          description: Value of the Factor
        value_fr:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: Value Fr
          description: Value of the Factor
          default: 0
        value_fmt:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: Value Fmt
          description: Value of the Factor
          default: 0
      type: object
      required:
      - id
      - sequence
      - name
      - description
      - unit_type_id
      - unit_type
      - precision
      - value
      title: Factor
      description: Factor model
    FactorGroup:
      properties:
        id:
          type: string
          title: Id
          description: ID for the Factor Group
        name:
          type: string
          title: Name
          description: Name of the Factor Group
        sequence:
          type: string
          title: Sequence
          description: Sequence of the Factor Group
        factors:
          items:
            $ref: '#/components/schemas/Factor'
          type: array
          title: Factors
          description: Factors belonging to the Factor Group
      type: object
      required:
      - id
      - name
      - sequence
      - factors
      title: FactorGroup
      description: FactorGroup model
    FactorPayload:
      properties:
        factors:
          items:
            $ref: '#/components/schemas/FactorValue'
          type: array
          title: Factors
          description: The factors and values being saved
      type: object
      required:
      - factors
      title: FactorPayload
      description: FactorPayload model
    FactorValue:
      properties:
        id:
          type: string
          title: Id
          description: ID of the Factor being saved
        source_type_id:
          anyOf:
          - type: string
            const: '4'
          - type: 'null'
          title: Source Type Id
          description: 'Source type: will always be 4, Value Execution will change to Customer if needed'
          default: '4'
        value:
          anyOf:
          - type: string
          - type: integer
          - type: number
          title: Value
          description: Value of the Factor being saved
      type: object
      required:
      - id
      - value
      title: FactorValue
      description: FactorValue model
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HealthCheckResponse:
      properties:
        status:
          type: string
          title: Status
          default: OK
      type: object
      title: HealthCheckResponse
      description: Health check response
    Login:
      properties:
        password:
          anyOf:
          - type: string
          - type: 'null'
          title: Password
          description: Password for the collaboration
        hash:
          anyOf:
          - type: string
          - type: 'null'
          title: Hash
          description: The hash for the collaboration
        ac:
          anyOf:
          - type: string
          - type: 'null'
          title: Ac
          description: Access Code to access the collaboration
      type: object
      title: Login
      description: Login model
    MessageResponse:
      properties:
        message:
          type: string
          title: Message
          description: Response message
      type: object
      required:
      - message
      title: MessageResponse
      description: MessageResponse model
    QuestionType:
      properties:
        id:
          type: string
          title: Id
          description: ID for the question type
        type:
          type: string
          title: Type
          description: Question type
      type: object
      required:
      - id
      - type
      title: QuestionType
      description: QuestionType model
    UnitType:
      properties:
        id:
          type: integer
          title: Id
          description: ID for the Unit Type
        name:
          type: string
          title: Name
          description: Name of the Unit Type
        abbreviation:
          anyOf:
          - type: string
          - type: 'null'
          title: Abbreviation
          description: Abbreviation for the Unit Type
      type: object
      required:
      - id
      - name
      - abbreviation
      title: UnitType
      description: UnitType model
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ValueCategory:
      properties:
        id:
          type: string
          title: Id
          description: ID for the Value Category
        name:
          type: string
          title: Name
          description: Name of the Value Category
        description:
          type: string
          title: Description
          description: Description of the Value Category
        benefits:
          items:
            $ref: '#/components/schemas/Benefit'
          type: array
          title: Benefits
          description: Benefits belonging to the Value Category
      type: object
      required:
      - id
      - name
      - description
      - benefits
      title: ValueCategory
      description: ValueCategory model
  securitySchemes:
    HTTPBearer:
      type: http
      description: Access token in the form of a JWT
      scheme: bearer
servers:
- url: https://api.xfactor.io
  description: Production API host (Auth0 audience of the Xfactor.io web application)