Skip to content

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.

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",
        "bookingId": "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": [
                {}
              ],
              "optionId": "dee15a0e-f1fe-4cd8-88ac-c090810707f8"
            }
          ]
        }
      ]
    }
  }'

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.

Response
{ "hasNewCustomFields": true, "customFields": [ { … } ] }