Policy API (v2)

Download OpenAPI description
Languages
Servers
Mock server
https://developer.spotnana.com/_mock/openapi/policyapi/
Staging URL
https://apis.spotnana.com/

Company Policies

APIs to configure company travel policies.

Operations

Create policy

Request

This endpoint creates a policy.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
namestringrequired

Name of the policy.

typestring(PolicyType)required

Policy type.

Enum"DEFAULT""GROUP""INTERNAL"
parentPolicyIdstring(uuid)

Policy to inherit the values of linked rules. If empty, consider the company default policy.

Example: "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b"
currencyPolicyCurrency (object) or PolicyCurrency (object)(PolicyCurrency)required
One of:

Currency for the policy.

currency.​currencyCodestring

iso code of the currency.

Example: "USD"
inPolicyApprovalInfosArray of objects(PolicyApprovalInfo)
outOfPolicyApprovalInfosArray of objects(PolicyApprovalInfo)
userGroupsArray of objects(UserGroup)required
userGroups[].​userIdsArray of objects(UserId)
userGroups[].​legalEntityIdsArray of objects(EntityId)
userGroups[].​officeIdsArray of objects(EntityId)
userGroups[].​departmentsArray of strings

List of department ids.

userGroups[].​costCentersArray of strings

List of cost center ids.

userGroups[].​gradesArray of strings

List of grade ids.

userGroups[].​positionTitlesArray of strings
userGroups[].​personasArray of strings(Persona)
Items Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
Example: ["EMPLOYEE"]
userGroups[].​customFieldIdsArray of objects(CustomFieldId)
userGroups[].​countryCodesArray of strings
Example: ["GB"]
userGroups[].​workerTypesArray of strings(WorkerType)
Items Enum"EMPLOYEE""CONTINGENT""SEASONAL""INTERN"
Example: ["EMPLOYEE"]
userGroups[].​accountingCodesArray of strings
commonPolicyRulesobject(CommonPolicyRules)

Details of policy that is common to all travel type.

carPolicyRulesobject(CarPolicyRules)

Details of rules related to car.

hotelPolicyRulesobject(HotelPolicyRules)

Details of rules related to hotel.

airPolicyRulesobject(AirPolicyRules)

Details of rules related to air.

rulesArray of objects(UniversalRule)

A list of general policy rules for all travel types air, hotel, car and rail.

airOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

hotelOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

carOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

railOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

categorystring(PolicyCategory)

Category of the policy.

Default "EMPLOYEE"
Enum"EMPLOYEE""GUEST"
inPolicyApprovalInfoobject(PolicyApprovalInfo)Deprecated
outOfPolicyApprovalInfoobject(PolicyApprovalInfo)Deprecated
isRestrictivebooleanDeprecated

True if policy is a restrictive policy.

Example: true
curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/policies' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "type": "GROUP",
    "parentPolicyId": "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b",
    "currency": {
      "currencyCode": "USD"
    },
    "inPolicyApprovalInfo": {
      "approvalProcessType": "NONE",
      "designatedApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ],
      "isManagerApprover": false,
      "isEmployeeLevelDesignatedApprover": false,
      "shouldNotifyManager": false,
      "travelTypes": [
        "AIR"
      ],
      "approvalConditions": [
        {
          "rules": [
            {
              "travelRegionRule": {
                "travelRegionType": "DOMESTIC"
              }
            }
          ]
        }
      ],
      "defaultApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ]
    },
    "outOfPolicyApprovalInfo": {
      "approvalProcessType": "NONE",
      "designatedApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ],
      "isManagerApprover": false,
      "isEmployeeLevelDesignatedApprover": false,
      "shouldNotifyManager": false,
      "travelTypes": [
        "AIR"
      ],
      "approvalConditions": [
        {
          "rules": [
            {
              "travelRegionRule": {
                "travelRegionType": "DOMESTIC"
              }
            }
          ]
        }
      ],
      "defaultApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ]
    },
    "inPolicyApprovalInfos": [
      {
        "approvalProcessType": "NONE",
        "designatedApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "isManagerApprover": false,
        "isEmployeeLevelDesignatedApprover": false,
        "shouldNotifyManager": false,
        "travelTypes": [
          "AIR"
        ],
        "approvalConditions": [
          {
            "rules": [
              {
                "travelRegionRule": {}
              }
            ]
          }
        ],
        "defaultApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "outOfPolicyApprovalInfos": [
      {
        "approvalProcessType": "NONE",
        "designatedApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "isManagerApprover": false,
        "isEmployeeLevelDesignatedApprover": false,
        "shouldNotifyManager": false,
        "travelTypes": [
          "AIR"
        ],
        "approvalConditions": [
          {
            "rules": [
              {
                "travelRegionRule": {}
              }
            ]
          }
        ],
        "defaultApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "userGroups": [
      {
        "userIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "legalEntityIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "officeIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "departments": [
          "string"
        ],
        "costCenters": [
          "string"
        ],
        "grades": [
          "string"
        ],
        "positionTitles": [
          "string"
        ],
        "personas": [
          "EMPLOYEE"
        ],
        "customFieldIds": [
          {
            "type": "QUESTION",
            "externalId": "string"
          }
        ],
        "countryCodes": [
          "GB"
        ],
        "workerTypes": [
          "EMPLOYEE"
        ],
        "accountingCodes": [
          "string"
        ]
      }
    ],
    "commonPolicyRules": {
      "restrictedContinents": {
        "isLinked": true
      },
      "restrictedCountries": {
        "isLinked": true
      }
    },
    "carPolicyRules": {
      "maxCarPricePerNumberOfDays": {
        "isLinked": true
      },
      "allowedCarTypes": {
        "isLinked": true
      }
    },
    "hotelPolicyRules": {
      "restrictedHotels": {
        "isLinked": true
      },
      "maxHotelPriceByLocation": {
        "isLinked": true
      },
      "hotelAdvanceBookingWindow": {
        "isLinked": true
      },
      "hotelCancellation": {
        "isLinked": true
      },
      "hotelChainCodes": {
        "isLinked": true
      },
      "hotelStarRating": {
        "isLinked": true
      },
      "hotelMedianRateNightly": {
        "isLinked": true
      }
    },
    "airPolicyRules": {
      "restrictedAirlines": {
        "isLinked": true
      },
      "restrictedAirCrafts": {
        "isLinked": true
      },
      "maxFlightBookingPriceByDuration": {
        "isLinked": true
      },
      "flightCabinUpgrade": {
        "isLinked": true
      },
      "flightAdvanceBookingWindow": {
        "isLinked": true
      },
      "flightTicketsRefundable": {
        "isLinked": true
      },
      "flightTicketsChangeable": {
        "isLinked": true
      },
      "highestFlightCabinByDurationDomestic": {
        "isLinked": true
      },
      "highestFlightCabinByDurationInternational": {
        "isLinked": true
      },
      "highestFlightCabinOvernight": {
        "isLinked": true
      },
      "differenceBetweenFlightFareAndMedianFare": {
        "isLinked": true
      },
      "co2EmissionPerPassengerPerKm": {
        "isLinked": true
      },
      "maxFlightBookingPriceInternational": {
        "isLinked": true
      },
      "maxFlightBookingPriceDomestic": {
        "isLinked": true
      },
      "lowestLogicalFare": {
        "isLinked": true
      }
    },
    "isRestrictive": true,
    "rules": [
      {
        "ruleType": "CAR_TYPES_NOT_ALLOWED",
        "action": {
          "preventBooking": {
            "prevent": false,
            "reason": "string"
          }
        },
        "policyValue": {
          "isLinked": true
        }
      }
    ],
    "airOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "hotelOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "carOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "railOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "category": "EMPLOYEE"
  }'

Responses

Created

Bodyapplication/json
idstring(uuid)required
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }

List company policies

Request

This endpoint list company policies.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
categoriesArray of strings(PolicyCategory)

Filter policies by categories. Defaults to EMPLOYEE if not provided.

Items Enum"EMPLOYEE""GUEST"
Example: categories=EMPLOYEE
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/policies?categories=EMPLOYEE' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
lengthinteger(int32)
elementsArray of objects(Reference object containing uuid and name of the entity.)

List of references containing id and name.

Response
application/json
{ "length": 0, "elements": [ {} ] }

Get policy

Request

This endpoint gets a policy by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for policy.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/policies/{policyId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstring(uuid)required
Example: "4974a66b-7493-4f41-908c-58ba81093947"
versioninteger(int32)
updatedAtobject(DateTimeOffset)

ISO8601 UTC Date Time

isMembershipViaHrFeedboolean

True if membership is via HR feed. Read-only.

Example: true
hrFeedPolicyDetailsobject(HrFeedPolicyDetails)

User group details if membership is via HR feed.

namestringrequired

Name of the policy.

typestring(PolicyType)required

Policy type.

Enum"DEFAULT""GROUP""INTERNAL"
parentPolicyIdstring(uuid)

Policy to inherit the values of linked rules. If empty, consider the company default policy.

Example: "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b"
currencyPolicyCurrency (object) or PolicyCurrency (object)(PolicyCurrency)required
One of:

Currency for the policy.

currency.​currencyCodestring

iso code of the currency.

Example: "USD"
inPolicyApprovalInfosArray of objects(PolicyApprovalInfo)
outOfPolicyApprovalInfosArray of objects(PolicyApprovalInfo)
userGroupsArray of objects(UserGroup)required
userGroups[].​userIdsArray of objects(UserId)
userGroups[].​legalEntityIdsArray of objects(EntityId)
userGroups[].​officeIdsArray of objects(EntityId)
userGroups[].​departmentsArray of strings

List of department ids.

userGroups[].​costCentersArray of strings

List of cost center ids.

userGroups[].​gradesArray of strings

List of grade ids.

userGroups[].​positionTitlesArray of strings
userGroups[].​personasArray of strings(Persona)
Items Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
Example: ["EMPLOYEE"]
userGroups[].​customFieldIdsArray of objects(CustomFieldId)
userGroups[].​countryCodesArray of strings
Example: ["GB"]
userGroups[].​workerTypesArray of strings(WorkerType)
Items Enum"EMPLOYEE""CONTINGENT""SEASONAL""INTERN"
Example: ["EMPLOYEE"]
userGroups[].​accountingCodesArray of strings
commonPolicyRulesobject(CommonPolicyRules)

Details of policy that is common to all travel type.

carPolicyRulesobject(CarPolicyRules)

Details of rules related to car.

hotelPolicyRulesobject(HotelPolicyRules)

Details of rules related to hotel.

airPolicyRulesobject(AirPolicyRules)

Details of rules related to air.

rulesArray of objects(UniversalRule)

A list of general policy rules for all travel types air, hotel, car and rail.

airOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

hotelOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

carOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

railOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

categorystring(PolicyCategory)

Category of the policy.

Default "EMPLOYEE"
Enum"EMPLOYEE""GUEST"
inPolicyApprovalInfoobject(PolicyApprovalInfo)Deprecated
outOfPolicyApprovalInfoobject(PolicyApprovalInfo)Deprecated
isRestrictivebooleanDeprecated

True if policy is a restrictive policy.

Example: true
Response
application/json
{ "id": "4974a66b-7493-4f41-908c-58ba81093947", "version": 0, "updatedAt": { "iso8601": "2017-07-21T17:32Z" }, "isMembershipViaHrFeed": true, "hrFeedPolicyDetails": { "totalMemberCount": 0 }, "name": "string", "type": "GROUP", "parentPolicyId": "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b", "currency": { "currencyCode": "USD" }, "inPolicyApprovalInfo": { "approvalProcessType": "NONE", "designatedApprovers": [], "isManagerApprover": false, "isEmployeeLevelDesignatedApprover": false, "shouldNotifyManager": false, "travelTypes": [], "approvalConditions": [], "defaultApprovers": [] }, "outOfPolicyApprovalInfo": { "approvalProcessType": "NONE", "designatedApprovers": [], "isManagerApprover": false, "isEmployeeLevelDesignatedApprover": false, "shouldNotifyManager": false, "travelTypes": [], "approvalConditions": [], "defaultApprovers": [] }, "inPolicyApprovalInfos": [ {} ], "outOfPolicyApprovalInfos": [ {} ], "userGroups": [ {} ], "commonPolicyRules": { "restrictedContinents": {}, "restrictedCountries": {} }, "carPolicyRules": { "maxCarPricePerNumberOfDays": {}, "allowedCarTypes": {} }, "hotelPolicyRules": { "restrictedHotels": {}, "maxHotelPriceByLocation": {}, "hotelAdvanceBookingWindow": {}, "hotelCancellation": {}, "hotelChainCodes": {}, "hotelStarRating": {}, "hotelMedianRateNightly": {} }, "airPolicyRules": { "restrictedAirlines": {}, "restrictedAirCrafts": {}, "maxFlightBookingPriceByDuration": {}, "flightCabinUpgrade": {}, "flightAdvanceBookingWindow": {}, "flightTicketsRefundable": {}, "flightTicketsChangeable": {}, "highestFlightCabinByDurationDomestic": {}, "highestFlightCabinByDurationInternational": {}, "highestFlightCabinOvernight": {}, "differenceBetweenFlightFareAndMedianFare": {}, "co2EmissionPerPassengerPerKm": {}, "maxFlightBookingPriceInternational": {}, "maxFlightBookingPriceDomestic": {}, "lowestLogicalFare": {} }, "isRestrictive": true, "rules": [ {} ], "airOopReasonCodes": { "props": {} }, "hotelOopReasonCodes": { "props": {} }, "carOopReasonCodes": { "props": {} }, "railOopReasonCodes": { "props": {} }, "category": "EMPLOYEE" }

Update policy

Request

This endpoint updates a policy by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for policy.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
idstring(uuid)required
Example: "4974a66b-7493-4f41-908c-58ba81093947"
versioninteger(int32)
updatedAtobject(DateTimeOffset)

ISO8601 UTC Date Time

isMembershipViaHrFeedboolean

True if membership is via HR feed. Read-only.

Example: true
hrFeedPolicyDetailsobject(HrFeedPolicyDetails)

User group details if membership is via HR feed.

namestringrequired

Name of the policy.

typestring(PolicyType)required

Policy type.

Enum"DEFAULT""GROUP""INTERNAL"
parentPolicyIdstring(uuid)

Policy to inherit the values of linked rules. If empty, consider the company default policy.

Example: "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b"
currencyPolicyCurrency (object) or PolicyCurrency (object)(PolicyCurrency)required
One of:

Currency for the policy.

currency.​currencyCodestring

iso code of the currency.

Example: "USD"
inPolicyApprovalInfosArray of objects(PolicyApprovalInfo)
outOfPolicyApprovalInfosArray of objects(PolicyApprovalInfo)
userGroupsArray of objects(UserGroup)required
userGroups[].​userIdsArray of objects(UserId)
userGroups[].​legalEntityIdsArray of objects(EntityId)
userGroups[].​officeIdsArray of objects(EntityId)
userGroups[].​departmentsArray of strings

List of department ids.

userGroups[].​costCentersArray of strings

List of cost center ids.

userGroups[].​gradesArray of strings

List of grade ids.

userGroups[].​positionTitlesArray of strings
userGroups[].​personasArray of strings(Persona)
Items Enum"UNKNOWN_PERSONA""EMPLOYEE""GUEST""PERSONAL""RELATIVE""ADHOC"
Example: ["EMPLOYEE"]
userGroups[].​customFieldIdsArray of objects(CustomFieldId)
userGroups[].​countryCodesArray of strings
Example: ["GB"]
userGroups[].​workerTypesArray of strings(WorkerType)
Items Enum"EMPLOYEE""CONTINGENT""SEASONAL""INTERN"
Example: ["EMPLOYEE"]
userGroups[].​accountingCodesArray of strings
commonPolicyRulesobject(CommonPolicyRules)

Details of policy that is common to all travel type.

carPolicyRulesobject(CarPolicyRules)

Details of rules related to car.

hotelPolicyRulesobject(HotelPolicyRules)

Details of rules related to hotel.

airPolicyRulesobject(AirPolicyRules)

Details of rules related to air.

rulesArray of objects(UniversalRule)

A list of general policy rules for all travel types air, hotel, car and rail.

airOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

hotelOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

carOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

railOopReasonCodesOopReasonCodes (object) or OopReasonCodes (object)(OopReasonCodes)
One of:

OOP reason codes value. Either linked to default policy or actual values.

categorystring(PolicyCategory)

Category of the policy.

Default "EMPLOYEE"
Enum"EMPLOYEE""GUEST"
inPolicyApprovalInfoobject(PolicyApprovalInfo)Deprecated
outOfPolicyApprovalInfoobject(PolicyApprovalInfo)Deprecated
isRestrictivebooleanDeprecated

True if policy is a restrictive policy.

Example: true
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/policies/{policyId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "4974a66b-7493-4f41-908c-58ba81093947",
    "version": 0,
    "updatedAt": {
      "iso8601": "2017-07-21T17:32Z"
    },
    "isMembershipViaHrFeed": true,
    "hrFeedPolicyDetails": {
      "totalMemberCount": 0
    },
    "name": "string",
    "type": "GROUP",
    "parentPolicyId": "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b",
    "currency": {
      "currencyCode": "USD"
    },
    "inPolicyApprovalInfo": {
      "approvalProcessType": "NONE",
      "designatedApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ],
      "isManagerApprover": false,
      "isEmployeeLevelDesignatedApprover": false,
      "shouldNotifyManager": false,
      "travelTypes": [
        "AIR"
      ],
      "approvalConditions": [
        {
          "rules": [
            {
              "travelRegionRule": {
                "travelRegionType": "DOMESTIC"
              }
            }
          ]
        }
      ],
      "defaultApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ]
    },
    "outOfPolicyApprovalInfo": {
      "approvalProcessType": "NONE",
      "designatedApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ],
      "isManagerApprover": false,
      "isEmployeeLevelDesignatedApprover": false,
      "shouldNotifyManager": false,
      "travelTypes": [
        "AIR"
      ],
      "approvalConditions": [
        {
          "rules": [
            {
              "travelRegionRule": {
                "travelRegionType": "DOMESTIC"
              }
            }
          ]
        }
      ],
      "defaultApprovers": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      ]
    },
    "inPolicyApprovalInfos": [
      {
        "approvalProcessType": "NONE",
        "designatedApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "isManagerApprover": false,
        "isEmployeeLevelDesignatedApprover": false,
        "shouldNotifyManager": false,
        "travelTypes": [
          "AIR"
        ],
        "approvalConditions": [
          {
            "rules": [
              {
                "travelRegionRule": {}
              }
            ]
          }
        ],
        "defaultApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "outOfPolicyApprovalInfos": [
      {
        "approvalProcessType": "NONE",
        "designatedApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "isManagerApprover": false,
        "isEmployeeLevelDesignatedApprover": false,
        "shouldNotifyManager": false,
        "travelTypes": [
          "AIR"
        ],
        "approvalConditions": [
          {
            "rules": [
              {
                "travelRegionRule": {}
              }
            ]
          }
        ],
        "defaultApprovers": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "userGroups": [
      {
        "userIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "legalEntityIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "officeIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "departments": [
          "string"
        ],
        "costCenters": [
          "string"
        ],
        "grades": [
          "string"
        ],
        "positionTitles": [
          "string"
        ],
        "personas": [
          "EMPLOYEE"
        ],
        "customFieldIds": [
          {
            "type": "QUESTION",
            "externalId": "string"
          }
        ],
        "countryCodes": [
          "GB"
        ],
        "workerTypes": [
          "EMPLOYEE"
        ],
        "accountingCodes": [
          "string"
        ]
      }
    ],
    "commonPolicyRules": {
      "restrictedContinents": {
        "isLinked": true
      },
      "restrictedCountries": {
        "isLinked": true
      }
    },
    "carPolicyRules": {
      "maxCarPricePerNumberOfDays": {
        "isLinked": true
      },
      "allowedCarTypes": {
        "isLinked": true
      }
    },
    "hotelPolicyRules": {
      "restrictedHotels": {
        "isLinked": true
      },
      "maxHotelPriceByLocation": {
        "isLinked": true
      },
      "hotelAdvanceBookingWindow": {
        "isLinked": true
      },
      "hotelCancellation": {
        "isLinked": true
      },
      "hotelChainCodes": {
        "isLinked": true
      },
      "hotelStarRating": {
        "isLinked": true
      },
      "hotelMedianRateNightly": {
        "isLinked": true
      }
    },
    "airPolicyRules": {
      "restrictedAirlines": {
        "isLinked": true
      },
      "restrictedAirCrafts": {
        "isLinked": true
      },
      "maxFlightBookingPriceByDuration": {
        "isLinked": true
      },
      "flightCabinUpgrade": {
        "isLinked": true
      },
      "flightAdvanceBookingWindow": {
        "isLinked": true
      },
      "flightTicketsRefundable": {
        "isLinked": true
      },
      "flightTicketsChangeable": {
        "isLinked": true
      },
      "highestFlightCabinByDurationDomestic": {
        "isLinked": true
      },
      "highestFlightCabinByDurationInternational": {
        "isLinked": true
      },
      "highestFlightCabinOvernight": {
        "isLinked": true
      },
      "differenceBetweenFlightFareAndMedianFare": {
        "isLinked": true
      },
      "co2EmissionPerPassengerPerKm": {
        "isLinked": true
      },
      "maxFlightBookingPriceInternational": {
        "isLinked": true
      },
      "maxFlightBookingPriceDomestic": {
        "isLinked": true
      },
      "lowestLogicalFare": {
        "isLinked": true
      }
    },
    "isRestrictive": true,
    "rules": [
      {
        "ruleType": "CAR_TYPES_NOT_ALLOWED",
        "action": {
          "preventBooking": {
            "prevent": false,
            "reason": "string"
          }
        },
        "policyValue": {
          "isLinked": true
        }
      }
    ],
    "airOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "hotelOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "carOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "railOopReasonCodes": {
      "props": {
        "reasonCodes": [
          {
            "entityId": "string",
            "displayInfo": "string",
            "questionFormat": "CHECKBOX",
            "options": [
              {
                "displayCode": "string",
                "displayValue": "string"
              }
            ],
            "isRequired": true,
            "isDisabled": true
          }
        ]
      }
    },
    "category": "EMPLOYEE"
  }'

Responses

Updated Successfully

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Delete policy

Request

This endpoint deletes a policy by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for policy.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X DELETE \
  'https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/policies/{policyId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Custom Fields

APIs to manage company custom fields.

Operations