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

Update custom field status

Request

Security
Bearer
Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
companyRolestring(CompanyRole)required

Role of the company.

Enum"ORG""TMC""PARTNER_TMC""HR_FEED_CONNECTOR""TRIPS_DATA_CONNECTOR""GLOBAL"
Example: companyRole=ORG
Bodyapplication/jsonrequired
fieldsToUpdateArray of objects(Field)

Custom fields whose status has to be updated

Default []
fieldsToDeleteArray of strings(uuid)

The field ids for deletion.

Default []
curl -i -X PATCH \
  'https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/custom-fields/update-status?companyRole=ORG' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fieldsToUpdate": [],
    "fieldsToDelete": []
  }'

Responses

OK

Response
No content

Create custom field

Request

This endpoint creates a custom field.

Security
Bearer
Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
companyRolestring(CompanyRole)required

Role of the company.

Enum"ORG""TMC""PARTNER_TMC""HR_FEED_CONNECTOR""TRIPS_DATA_CONNECTOR""GLOBAL"
Example: companyRole=ORG
Bodyapplication/jsonrequired
namestringrequired

Name of this field to be viewed by the user and consumed by mid-office systems.

Example: "Air Reason Code"
descriptionobject(DisplayText)

User-facing description of the custom field.

includeLocationsArray of strings(IncludeLocation)
Items Enum"BOOKING_CONFIRMATION_EMAILS""APPROVAL_EMAILS""COMPANY_REPORTS""CONSOLIDATED_ITINERARY_EMAILS"
Example: ["APPROVAL_EMAILS"]
managementTagsArray of objects(Tag)
respondOnlyOnceLevelstring(RespondOnlyOnceLevel)

User can respond this field only once at given level.

Value"TRIP"
curl -i -X POST \
  'https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/custom-fields?companyRole=ORG' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Air Reason Code",
    "description": {
      "value": "This field will capture the reason for out of policy booking"
    },
    "includeLocations": [
      "APPROVAL_EMAILS"
    ],
    "managementTags": [
      {
        "key": "OOP Reason Code",
        "value": "Out of Policy Code"
      }
    ],
    "respondOnlyOnceLevel": "TRIP"
  }'

Responses

Created

Bodyapplication/json
idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
Response
application/json
{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }

Update custom field

Request

This endpoint updates a custom field.

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
Bodyapplication/jsonrequired
idstring(uuid)required

Custom field id.

namestringrequired

Name of this field to be viewed by the user and consumed by mid-office systems.

Example: "Air Reason Code"
descriptionobject(DisplayText)

User-facing description of the custom field.

includeLocationsArray of strings(IncludeLocation)
Items Enum"BOOKING_CONFIRMATION_EMAILS""APPROVAL_EMAILS""COMPANY_REPORTS""CONSOLIDATED_ITINERARY_EMAILS"
Example: ["APPROVAL_EMAILS"]
managementTagsArray of objects(Tag)
respondOnlyOnceLevelstring(RespondOnlyOnceLevel)

User can respond this field only once at given level.

Value"TRIP"
curl -i -X PUT \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/custom-fields/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Air Reason Code",
    "description": {
      "value": "This field will capture the reason for out of policy booking"
    },
    "includeLocations": [
      "APPROVAL_EMAILS"
    ],
    "managementTags": [
      {
        "key": "OOP Reason Code",
        "value": "Out of Policy Code"
      }
    ],
    "respondOnlyOnceLevel": "TRIP"
  }'

Responses

Updated Successfully

Response
No content