Company API (v2)

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

Companies

APIs to onboard and manage company.

Operations

Cost Centers

APIs to create and manage company cost centers.

Operations

Offices

APIs to create and manage company offices.

Operations

Departments

APIs to create and manage departments.

Operations

Service Charge Plan

APIs to manage service charge plans.

Operations

Get per-trip service charge configuration

Request

Get per-trip service charge configuration for company

Path
companyIdstring(uuid)required

Company ID

Example: f49d00fe-1eda-4304-ba79-a980f565281d
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/license/company/{companyId}/service-charge/per-trip' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
configobject(FixedChargeConfig)

Fixed charge configuration for service charge

enabledboolean

True if per trip service charge configuration is enabled

Example: true
enableDisableOpSupportedboolean

True if per trip service charge configuration can be enabled/disabled

Example: true
Response
application/json
{ "config": { "charges": [], "defaultCurrencyCode": "GBP", "tierCharges": [] }, "enabled": true, "enableDisableOpSupported": true }

Set per-trip service charge configuration

Request

Set per-trip service charge configuration for company

Path
companyIdstring(uuid)required

Company ID

Example: f49d00fe-1eda-4304-ba79-a980f565281d
Bodyapplication/json
configobject(FixedChargeConfig)required

Fixed charge configuration for service charge

config.​chargesArray of objects(Money)required

Amount in specified currency

config.​charges[].​amountnumber(double)required

The numeric value for the amount of money.

Example: 510
config.​charges[].​currencyCodestringrequired

The 3-letter currency code for the money amount (defined using ISO 4217 standard).

Example: "GBP"
config.​charges[].​convertedAmountnumber(double)

The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency).

Example: 715.42
config.​charges[].​convertedCurrencystring

The 3-letter currency code for the converted currency (defined using ISO 4217 standard).

Example: "USD"
config.​charges[].​otherCoinageArray of objects(OtherCoinage)

List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

config.​defaultCurrencyCodestring

The 3-letter currency code defined in ISO 4217.

Example: "GBP"
config.​tierChargesArray of objects(Tier charge configuration for service charge)

Charges specified per traveler tier

curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/license/company/{companyId}/service-charge/per-trip' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "config": {
      "charges": [
        {
          "amount": 510,
          "currencyCode": "GBP",
          "convertedAmount": 715.42,
          "convertedCurrency": "USD",
          "otherCoinage": [
            {
              "coinageCode": "BREX_POINTS",
              "amount": 1000,
              "conversionRate": 0.01,
              "preferredCurrencyConversionRate": 0.01
            }
          ]
        }
      ],
      "defaultCurrencyCode": "GBP",
      "tierCharges": [
        {
          "tier": "SEAT1A",
          "charges": [
            {
              "amount": 510,
              "currencyCode": "GBP",
              "convertedAmount": 715.42,
              "convertedCurrency": "USD",
              "otherCoinage": [
                {}
              ]
            }
          ]
        }
      ]
    }
  }'

Responses

OK

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

Service Charge

Operations

Company Enrollment

Operations

Company Tier

Operations