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

# Fetch Analysis (conjoint)

> # Description

Get conjoint questions analysis.

# Payload

```json
{
    "fromDate": string,
    "toDate": string,
    "filter": array,
    "groups": object
}
```

where:

* `fromDate`: start date in ISO format. __(Required)__.
* `toDate`: end date in ISO format. __(Required)__.
* `filter`: array of filters to filter the responses. (Optional).
* `groups`: Object indexed by question id with a `q` as prefix. Every key has assigned an array with the question ids with `q` prefix that are the same question through different concepts inside a concept test. Only needed for project with Concept Test or Question Loops (Optional).

# Response 

## 200 OK

```json
{
    "filter": object,
    "fromDate": string,
    "toDate": string,
    "projectId": string,
    "responses": object,
    "responsesByQuestionCounter": object,
    "responsesCounter": number|null,
}
```
where:

* `fromDate`: Starting date to filter responses.
* `toDate`: End date to filter responses.
* `filter`: List of filters used to apply to the constant sum answers.
* `projectId`: Id of the project this analysis belongs to.
* `responses`: An object indexed by question id prefixed with `q`.
* `responses.qQuestionID`: An object indexed by attribute index associated with an object containing the utility, importance and intercept data for that attribute.
* `responsesByQuestionCounter`: An object indexed by question id prefixed with `q` associated with the number of responses for it.
* `responsesCounter`: Total responses used for the conjoint analysis.

## 400 Bad Request
> Missing or invalid `fromDate`/`toDate`/`projectId` fields.

## 401 Unauthorized
> Invalid authorization.

## 404 Not Found
> Resource not found.

## 500 Internal Server Error
> Error occurred in the service.

# Description

Get conjoint questions analysis.

# Payload

```json theme={null}
{
    "fromDate": string,
    "toDate": string,
    "filter": array,
    "groups": object
}
```

where:

* `fromDate`: start date in ISO format. **(Required)**.
* `toDate`: end date in ISO format. **(Required)**.
* `filter`: array of filters to filter the responses. (Optional).
* `groups`: Object indexed by question id with a `q` as prefix. Every key has assigned an array with the question ids with `q` prefix that are the same question through different concepts inside a concept test. Only needed for project with Concept Test or Question Loops (Optional).

# Response

## 200 OK

```json theme={null}
{
    "filter": object,
    "fromDate": string,
    "toDate": string,
    "projectId": string,
    "responses": object,
    "responsesByQuestionCounter": object,
    "responsesCounter": number|null,
}
```

where:

* `fromDate`: Starting date to filter responses.
* `toDate`: End date to filter responses.
* `filter`: List of filters used to apply to the constant sum answers.
* `projectId`: Id of the project this analysis belongs to.
* `responses`: An object indexed by question id prefixed with `q`.
* `responses.qQuestionID`: An object indexed by attribute index associated with an object containing the utility, importance and intercept data for that attribute.
* `responsesByQuestionCounter`: An object indexed by question id prefixed with `q` associated with the number of responses for it.
* `responsesCounter`: Total responses used for the conjoint analysis.

## 400 Bad Request

> Missing or invalid `fromDate`/`toDate`/`projectId` fields.

## 401 Unauthorized

> Invalid authorization.

## 404 Not Found

> Resource not found.

## 500 Internal Server Error

> Error occurred in the service.

##### Query Parameters

| Parameter   | Description | Required | Example |
| ----------- | ----------- | -------- | ------- |
| `projectId` | —           | No       | —       |


## OpenAPI

````yaml POST /conjoint-analysis-staging-sightx-io/v1/analysis
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /conjoint-analysis-staging-sightx-io/v1/analysis:
    post:
      summary: Fetch Analysis (conjoint)
      description: >-
        # Description


        Get conjoint questions analysis.


        # Payload


        ```json

        {
            "fromDate": string,
            "toDate": string,
            "filter": array,
            "groups": object
        }

        ```


        where:


        * `fromDate`: start date in ISO format. __(Required)__.

        * `toDate`: end date in ISO format. __(Required)__.

        * `filter`: array of filters to filter the responses. (Optional).

        * `groups`: Object indexed by question id with a `q` as prefix. Every
        key has assigned an array with the question ids with `q` prefix that are
        the same question through different concepts inside a concept test. Only
        needed for project with Concept Test or Question Loops (Optional).


        # Response 


        ## 200 OK


        ```json

        {
            "filter": object,
            "fromDate": string,
            "toDate": string,
            "projectId": string,
            "responses": object,
            "responsesByQuestionCounter": object,
            "responsesCounter": number|null,
        }

        ```

        where:


        * `fromDate`: Starting date to filter responses.

        * `toDate`: End date to filter responses.

        * `filter`: List of filters used to apply to the constant sum answers.

        * `projectId`: Id of the project this analysis belongs to.

        * `responses`: An object indexed by question id prefixed with `q`.

        * `responses.qQuestionID`: An object indexed by attribute index
        associated with an object containing the utility, importance and
        intercept data for that attribute.

        * `responsesByQuestionCounter`: An object indexed by question id
        prefixed with `q` associated with the number of responses for it.

        * `responsesCounter`: Total responses used for the conjoint analysis.


        ## 400 Bad Request

        > Missing or invalid `fromDate`/`toDate`/`projectId` fields.


        ## 401 Unauthorized

        > Invalid authorization.


        ## 404 Not Found

        > Resource not found.


        ## 500 Internal Server Error

        > Error occurred in the service.
      operationId: >-
        fetch-analysis-conjoint-post-conjoint-analysis-staging-sightx-io-v1-analysis
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Authorization token
          schema:
            type: string
        - name: projectId
          in: query
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              fromDate: '2020-01-01'
              toDate: '2022-12-31'
              filter: []
              groups:
                qQuestionId:
                  - qRelatedQuestionId1
                  - qRelatedQuestionId1
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://conjoint-analysis.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````