# Update company question Endpoint: PUT /v2/companies/{companyId}/questions/{questionId} Version: v2 Security: Bearer ## Path parameters: - `companyId` (string, required) Identifier for company. Example: "4974a66b-7493-4f41-908c-58ba81093947" - `questionId` (string, required) Identifier for question. Example: "1234a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `id` (string, required) - `name` (string, required) Question display name that the user will see. For eg, 'Choose the purpose of your trip'. - `questionFormat` (string) 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. Enum: "INPUT_BOX", "RADIO_BUTTON", "CHECKBOX", "CHECKBOX_WITH_PERCENTAGE" - `optionInfo` (object) Options related information for the question. - `optionInfo.source` (string, required) Option source Enum: "MANUAL", "COMPANY_CONFIG" - `optionInfo.sourceMetadata` (any) - `optionInfo.totalNumOptions` (integer) Total number of options - `optionInfo.options` (array) Available options for the question. This will contain only max 10 options if only summary is requested. - `optionInfo.options.displayCode` (string, required) The code which is sent in answer response. - `optionInfo.options.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. Example: true - `isDisabled` (boolean, required) Whether the question is disabled or not. If true, this should not be asked. Example: true - `customFieldLocations` (array) Enum: "POLICY_APPROVAL_EMAIL", "PNR_EMAIL", "TRIP_EMAIL" - `matchConditions` (object) Conditions to select the custom field for given context. - `matchConditions.travelerConditions` (object) Matching conditions for traveler. - `matchConditions.travelerConditions.workerTypes` (array) Worker types. Users belonging to any of these would match. Enum: "EMPLOYEE", "CONTINGENT", "SEASONAL", "INTERN", "GUEST" - `matchConditions.travelerConditions.countries` (array) Countries. - `matchConditions.travelerConditions.legalEntities` (array) Legal entities - `matchConditions.travelerConditions.legalEntities.name` (string) Example: "Name" - `matchConditions.travelerConditions.departments` (array) Departments - `matchConditions.travelerConditions.costCenters` (array) Cost centers - `matchConditions.travelerConditions.offices` (array) Offices - `matchConditions.travelTypes` (array) Travel types to match. Enum: "AIR", "HOTEL", "CAR", "RAIL", "LIMO", "MISC", "ALL" - `matchConditions.travelRegionTypes` (array) Travel region types to match. Enum: "DOMESTIC", "INTERNATIONAL" - `matchConditions.tripUsageTypes` (array) Trip usage types to match. If empty, all trip usage types will be matched. Enum: "STANDARD", "EVENT" - `questionType` (object) Question type. - `questionType.preSearchQuestionType` (string) Types of pre-search questions. PURPOSE_OF_TRIP required to ask purpose of the trip user is going to. For example: meeting, training, interview. Enum: "UNKNOWN_SEARCH_QUESTION_TYPE", "PURPOSE_OF_TRIP" - `questionType.preCheckoutQuestionType` (string) 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. Enum: "UNKNOWN_CHECKOUT_QUESTION_TYPE", "USER_DEFINED_QUESTION", "OOP_REASON_CODE" - `includeInItinerary` (boolean) Whether to include this question in the itinerary related emails. Example: true ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 404 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 200 fields