---
title: "Update company question"
method: PUT
path: "/v2/companies/{companyId}/questions/{questionId}"
tags: ["Custom Fields"]
deprecated: true
---

# Update company question

`PUT /v2/companies/{companyId}/questions/{questionId}`

## Request

- Base URL: `https://api-ext-sboxmeta.partners.spotnana.com`
- URL: `https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions/{questionId}`
- Auth: HTTP bearer

> **Deprecated.**

## Request body

- Question: The message defines the format of a question which can be asked to a user in any kind of workflows.
  - `id` string, uuid, required
  - `name` string, required: Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
  - `questionFormat` 'INPUT_BOX' | 'RADIO_BUTTON' | 'CHECKBOX' | 'CHECKBOX_WITH_PERCENTAGE': Question types. INPUT_BOX will make user enter a free flowing text. RADIO_BUTTON will have multiple options, user can select only one. CHECKBOX questions contain the possible set of options, from which the user can choose multiple options. CHECKBOX_WITH_PERCENTAGE is similar to checkbox, with the difference being that each option having an additional input field whose values must add up to 100.
  - `optionInfo` OptionInfo: Options related information for the question.
    - `source` 'MANUAL' | 'COMPANY_CONFIG', required: Option source
    - `sourceMetadata` OptionSourceMetadata: Wrapper for option source company config.
      - `companyConfig` CompanyConfigSource: For this option source, options would be auto generated based on specified parameter.
        - `optionsParam` 'COST_CENTER' | 'LEGAL_ENTITY' | 'OFFICE' | 'DEPARTMENT', required: Parameter to form options for the custom field.
    - `totalNumOptions` integer: Total number of options
    - `options` Option[]: Available options for the question. This will contain only max 10 options if only summary is requested.
      - `displayCode` string, required: The code which is sent in answer response.
      - `displayValue` string: The text to be displayed to the user beside this option.
  - `isRequired` boolean, required: Whether its compulsory to answer the question or not.
  - `isDisabled` boolean, required: Whether the question is disabled or not. If true, this should not be asked.
  - `includeInItinerary` boolean: Whether to include this question in the itinerary related emails.
  - `customFieldLocations` CustomFieldLocation[]
  - `matchConditions` CustomFieldMatchConditions: Conditions to select the custom field for given context.
    - `travelerConditions` TravelerMatchConditions: Matching conditions for traveler.
      - `workerTypes` WorkerType[]: Worker types. Users belonging to any of these would match.
      - `countries` string[]: Countries.
      - `legalEntities` Reference[]: Legal entities
        - `id` string, uuid, required
        - `name` string
      - `departments` Reference[]: Departments
        - `id` string, uuid, required
        - `name` string
      - `costCenters` Reference[]: Cost centers
        - `id` string, uuid, required
        - `name` string
      - `offices` Reference[]: Offices
        - `id` string, uuid, required
        - `name` string
    - `travelTypes` TravelType[]: Travel types to match.
    - `travelRegionTypes` TravelRegionType[]: Travel region types to match.
    - `tripUsageTypes` TripUsageType[]: Trip usage types to match. If empty, all trip usage types will be matched.
  - `questionType` QuestionType: Question type.
    - `preSearchQuestionType` 'UNKNOWN_SEARCH_QUESTION_TYPE' | 'PURPOSE_OF_TRIP': Types of pre-search questions. PURPOSE_OF_TRIP required to ask purpose of the trip user is going to. For example: meeting, training, interview.
    - `preCheckoutQuestionType` 'UNKNOWN_CHECKOUT_QUESTION_TYPE' | 'USER_DEFINED_QUESTION' | 'OOP_REASON_CODE': Types of pre-checkout questions. USER_DEFINED_QUESTION the default question type for all pre checkout questions which have been created from UI. OOP_REASON_CODE is kept separate so that existing OOP flow doesn't break.

## Response `200`

OK

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: The specified resource was not found.

## Changes

- **2026-09-10** `40073a2635de`: 1 info
  - endpoint deprecated with sunset date `2027-07-01`

[Operation history](https://skmtc.dev/spotnana/apis/policy-api/changes/v2/companies/:companyId/questions/:questionId/put.md)

---

[API](https://skmtc.dev/spotnana/apis/policy-api.md) - [All operations](https://skmtc.dev/spotnana/apis/policy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spotnana/apis/policy-api/revisions/acc1e7cac8c4?raw)
