Skip to content

Custom Field API (v3)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/customfieldapi

Custom Field V3

APIs to manage company custom fields.

Operations

Get options for a custom field.

Request

Security
Bearer
Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
customFieldIdstring(uuid)required

Identifier for custom field.

Example: 4974a66b-7493-4f41-908c-58ba81093947
armIdstring(uuid)required

Identifier for arm.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
paginationParamsobject(OffsetBasedPaginationRequestParams)required

Pagination parameters for requests.

paginationParams.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
paginationParams.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
nameSearchTextstring

Only the option that contain the specified text in name will be returned.

fetchEffectiveAdditionalInfosbooleanrequired

Indicates whether the additional infos should be fetched for each option from arm level if individual option does not have definition of additional infos.

Default false
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/custom-fields/4974a66b-7493-4f41-908c-58ba81093947/arms/4974a66b-7493-4f41-908c-58ba81093947/option-list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paginationParams": {
      "offset": 0,
      "limit": 100
    },
    "nameSearchText": "string",
    "fetchEffectiveAdditionalInfos": false
  }'

Responses

OK

Bodyapplication/json
paginationParamsobject(OffsetBasedPaginationResponseParams)required

Pagination parameters for response.

paginationParams.​totalNumResultsinteger(int32)required

Total number of results.

optionsArray of objects(CustomFieldV3Option)
Response
application/json
{ "paginationParams": { "totalNumResults": 0 }, "options": [ {} ] }

Get applicable custom fields

Request

Security
Bearer
Bodyapplication/jsonrequired
userIdstring(uuid)required

User id for whom the custom fields must be applicable.

bookingContextobject(BookingContext)required

Booking context for given booking flow.

bookingContext.​tripIdstringrequired

Identifier of the trip

bookingContext.​itineraryAirItineraryContext (object) or HotelItineraryContext (object) or CarItineraryContext (object) or LimoItineraryContext (object) or OutsideBookingContext (object) or PnrContext (object)(ItineraryContext)required
One of:

Itinerary Context for different types of itineraries

bookingContext.​itinerary.​itineraryTypestringrequired

Type of itinerary

Default "AIR"
bookingContext.​itinerary.​searchIdstringrequired

The search key related to booking

bookingContext.​itinerary.​rateOptionIdstringrequired

The 'id' of the selected itinerary in the air search response

bookingContext.​bookingFlowTypestring(BookingFlowTypeV3)

Specifies the booking flow stage—such as creating, modifying, or canceling a booking.

Enum"NEW_BOOKING""MODIFY_BOOKING""CANCEL_BOOKING"
bookingContext.​paymentSourceIdsArray of strings
bookingContext.​inlineQCFailureRulesArray of objects(InlineQCFailureRule)

A list of failed inline QC rules

customFieldResponsesContextobject(CustomFieldResponsesContext)

Custom field responses which are already responded and auto added.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/applicable-custom-fields \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
    "bookingContext": {
      "tripId": "string",
      "itinerary": {
        "itineraryType": "AIR",
        "searchId": "string",
        "rateOptionId": "string"
      },
      "bookingFlowType": "NEW_BOOKING",
      "paymentSourceIds": [
        "string"
      ],
      "inlineQCFailureRules": [
        {
          "ruleId": "string",
          "ruleType": "FLIGHT_LAYOVER_RULE"
        }
      ]
    },
    "customFieldResponsesContext": {
      "customFieldResponses": [
        {
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "fieldName": "string",
          "armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
          "includeLocations": [
            "APPROVAL_EMAILS"
          ],
          "selectedOptions": [
            {
              "name": "string",
              "translatedName": "string",
              "description": "string",
              "translatedDescription": "string",
              "additionalUserInput": "string",
              "additionalInfos": [
                "string"
              ],
              "additionalInfoConfigs": [
                {}
              ]
            }
          ]
        }
      ]
    }
  }'

Responses

OK

Bodyapplication/json
hasNewCustomFieldsbooleanrequired

Indicates if there are new custom fields that are applicable.

customFieldsArray of objects(ApplicableCustomFieldV3)required

List of applicable custom fields including the ones which are already responded. It also includes the selected response which user has already selected previously.

customFields[].​idstring(uuid)read-onlyrequired

Custom field id.

customFields[].​namestringrequired

Name of this field to be viewed by the user and consumed by downstream service.

Example: "Air Reason Code"
customFields[].​translatedNamestring

Name of this field to be viewed by the user, translated to their preferred language.

Example: "Air Reason Code"
customFields[].​armIdstring(uuid)required

Arm id which is applicable.

Example: "f49d00fe-1eda-4304-ba79-a980f565281d"
customFields[].​descriptionobject(DisplayText)

User-facing description of the custom field.

customFields[].​includeLocationsArray of strings(IncludeLocation)
Items Enum"BOOKING_CONFIRMATION_EMAILS""APPROVAL_EMAILS""COMPANY_REPORTS""CONSOLIDATED_ITINERARY_EMAILS"
Example: ["APPROVAL_EMAILS"]
customFields[].​actionAutoOption (object) or UserOption (object)(CustomFieldAction)required
One of:

Action available for the custom field.

customFields[].​action.​typestringrequired
Default "AUTO"
Example: "AUTO"
customFields[].​action.​hiddenboolean

Whether this code will be hidden to the user.

Default false
Example: true
customFields[].​action.​descriptionstring

Description of the code.

Example: "Lower fare declined"
customFields[].​action.​namestringrequired

Code which represents the auto selected option for the custom field.

Example: "LD"
customFields[].​action.​additionalInfosArray of objects(AdditionalInfo)
Default []
Response
application/json
{ "hasNewCustomFields": true, "customFields": [ {} ] }