APIs to configure company travel policies.
Policy API (v2)
https://api-ext-sboxmeta.partners.spotnana.com/
https://developer.spotnana.com/_mock/openapi/policyapi/
- Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions
- Spotnana mock server
https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/questions
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/questions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "length": 0, "elements": [ { … } ], "totalNumResults": 0 }
Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
Whether its compulsory to answer the question or not.
Whether the question is disabled or not. If true, this should not be asked.
- Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions
- Spotnana mock server
https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/questions
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/questions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"questionFormat": "CHECKBOX",
"optionInfo": {
"source": "MANUAL",
"sourceMetadata": {
"companyConfig": {
"optionsParam": "COST_CENTER"
}
},
"totalNumOptions": 0,
"options": [
{
"displayCode": "string",
"displayValue": "string"
}
]
},
"isRequired": true,
"isDisabled": false,
"includeInItinerary": true,
"customFieldLocations": [
"POLICY_APPROVAL_EMAIL"
],
"matchConditions": {
"travelerConditions": {
"workerTypes": [
"EMPLOYEE"
],
"countries": [
"string"
],
"legalEntities": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
],
"departments": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
],
"costCenters": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
],
"offices": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
]
},
"travelTypes": [
"AIR"
],
"travelRegionTypes": [
"DOMESTIC"
],
"tripUsageTypes": [
"STANDARD"
]
}
}'{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }
- Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions/{questionId}
- Spotnana mock server
https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/questions/{questionId}
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/questions/1234a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
Whether its compulsory to answer the question or not.
Whether the question is disabled or not. If true, this should not be asked.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "questionFormat": "CHECKBOX", "optionInfo": { "source": "MANUAL", "sourceMetadata": { … }, "totalNumOptions": 0, "options": [ … ] }, "isRequired": true, "isDisabled": true, "includeInItinerary": true, "customFieldLocations": [ "POLICY_APPROVAL_EMAIL" ], "matchConditions": { "travelerConditions": { … }, "travelTypes": [ … ], "travelRegionTypes": [ … ], "tripUsageTypes": [ … ] }, "questionType": { "preSearchQuestionType": "PURPOSE_OF_TRIP", "preCheckoutQuestionType": "OOP_REASON_CODE" } }
Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
Whether its compulsory to answer the question or not.
Whether the question is disabled or not. If true, this should not be asked.
- Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions/{questionId}
- Spotnana mock server
https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/questions/{questionId}
- curl
- JavaScript
- Node.js
- Python
curl -i -X PUT \
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/questions/1234a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"questionFormat": "CHECKBOX",
"optionInfo": {
"source": "MANUAL",
"sourceMetadata": {
"companyConfig": {
"optionsParam": "COST_CENTER"
}
},
"totalNumOptions": 0,
"options": [
{
"displayCode": "string",
"displayValue": "string"
}
]
},
"isRequired": true,
"isDisabled": true,
"includeInItinerary": true,
"customFieldLocations": [
"POLICY_APPROVAL_EMAIL"
],
"matchConditions": {
"travelerConditions": {
"workerTypes": [
"EMPLOYEE"
],
"countries": [
"string"
],
"legalEntities": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
],
"departments": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
],
"costCenters": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
],
"offices": [
{
"id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3",
"name": "Name"
}
]
},
"travelTypes": [
"AIR"
],
"travelRegionTypes": [
"DOMESTIC"
],
"tripUsageTypes": [
"STANDARD"
]
},
"questionType": {
"preSearchQuestionType": "PURPOSE_OF_TRIP",
"preCheckoutQuestionType": "OOP_REASON_CODE"
}
}'- Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions/{questionId}
- Spotnana mock server
https://developer.spotnana.com/_mock/openapi/policyapi/v2/companies/{companyId}/questions/{questionId}
- curl
- JavaScript
- Node.js
- Python
curl -i -X DELETE \
https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/questions/1234a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'