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

Delete custom field

Request

This endpoint deletes 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
curl -i -X DELETE \
  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>'

Responses

Deleted Successfully

Response
No content

List custom field

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
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
searchTextstring

Search text to filter the custom fields.

filterobject(ListCustomFieldFilter)
curl -i -X POST \
  'https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/custom-fields/list?companyRole=ORG' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paginationParams": {
      "offset": 0,
      "limit": 100
    },
    "searchText": "string",
    "filter": {
      "definedAtList": [
        "ORG"
      ],
      "enabled": true,
      "customFieldIds": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "tripUsageTypes": [
        "STANDARD"
      ]
    }
  }'

Responses

OK

Bodyapplication/json
paginationParamsobject(OffsetBasedPaginationResponseParams)

Pagination parameters for response.

fieldsArray of objects(CustomFieldV3)

List of custom field info

Response
application/json
{ "paginationParams": { "totalNumResults": 0 }, "fields": [ {} ] }

Update option for the given options group

Request

Updates (replaces) all the options of the given group with the provided ones.

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
optionGroupIdstring(uuid)required

Identifier for the options group

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
toUpdateArray of objects(CustomFieldV3Option)

Array of option to insert or update. Any existing option with same name will be updated and if there is no exiting item having same name as specified, then a new option will be inserted.

toDeleteArray of strings

Array of option that need to be deleted

Example: ["XC"]
curl -i -X PATCH \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/custom-fields/4974a66b-7493-4f41-908c-58ba81093947/option-groups/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "toUpdate": [
      {
        "name": "XC",
        "description": "Air exchange code",
        "additionalInfos": [
          {
            "type": "VARIABLE",
            "name": "LLF"
          }
        ],
        "translatedName": "XC",
        "translatedDescription": "Código de intercambio de aire"
      }
    ],
    "toDelete": [
      "XC"
    ]
  }'

Responses

Updated Successfully

Response
No content