TEQ Public API (1.0)

Download OpenAPI specification:

Introduction

With the TEQ API you can integrate your system with the TEQ platform. The API is designed to be easy to use and to provide a seamless integration experience.

The TEQ API is built on HTTP and is RESTful. It has predictable resource URLs and returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. Use your favorite HTTP/REST library in your programming language when using this API. This API reference documentation contains the most commonly integrated resources.

Authentication

The API uses OAuth2 for authentication. You will need to obtain an access token to use the API. The access token should be included in the Authorization header of each request. To obtain your access credentials, please contact TEQ support on (support@ferdia.co).

Domain-header

For all API requests an HTTP-header domain must be included. This header should contain the domain/company name that the API-call should be directed to. You will receive this domain name when you sign up for the TEQ API.

TimeZone

The API uses the timezone of the client of the request to calculate dates and times. The timezone should be included in the HTTP-header TimeZone in the format Continent/City (e.g. Europe/Berlin).

Sales/Customers

Creates a new customer

Creates a new customer

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

Request Body schema: application/json
required

Customer data

name
string
email
string <email>
type
string (CustomerType)
Enum: "person" "organization"
orgno
string
object (CustomerCategory)
customerNumber
string
parentCustomerId
integer
object (Address)
object (Address)
notes
string
paymentType
string
Enum: "Invoice" "Vipps" "Cash" "Card"
deadline
integer
creditLimit
integer
invoiceMethod
string
Enum: "Email" "Post"
purchaseOrder
string
language
string
Enum: "Norwegian" "English" "Swedish" "Danish"
currency
string
Enum: "NOK" "SEK" "DKK" "EUR" "USD" "GBP" "BDT"
EAN
string
VATNumber
string
includeVAT
boolean
fixedDiscountPercentage
number
Array of objects (ContactPerson)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "user@example.com",
  • "type": "person",
  • "orgno": "string",
  • "category": {
    },
  • "customerNumber": "string",
  • "parentCustomerId": 0,
  • "address1": {
    },
  • "address2": {
    },
  • "notes": "string",
  • "paymentType": "Invoice",
  • "deadline": 0,
  • "creditLimit": 0,
  • "invoiceMethod": "Email",
  • "purchaseOrder": "string",
  • "language": "Norwegian",
  • "currency": "NOK",
  • "EAN": "string",
  • "VATNumber": "string",
  • "includeVAT": true,
  • "fixedDiscountPercentage": 0,
  • "contactPersons": [
    ]
}

Response samples

Content type
application/json
{
  • "customerId": "string"
}

Returns a list of customers

Returns a list of customers based on the filters provided

query Parameters
type
string (CustomerType)
Enum: "person" "organization"
name
string
email
string
orgno
string
freetext
string
header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Updates an existing customer

Updates an existing customer

path Parameters
id
required
integer

Customer ID

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

Request Body schema: application/json
required

Customer data

name
string
email
string <email>
type
string (CustomerType)
Enum: "person" "organization"
orgno
string
object (CustomerCategory)
customerNumber
string
parentCustomerId
integer
orgNumber
string
object (Address)
object (Address)
notes
string
paymentType
string
Enum: "Invoice" "Vipps" "Cash" "Card"
deadline
integer
creditLimit
integer
invoiceMethod
string
Enum: "Email" "Post"
purchaseOrder
string
language
string
Enum: "Norwegian" "English" "Swedish" "Danish"
currency
string
Enum: "NOK" "SEK" "DKK" "EUR" "USD" "GBP" "BDT"
EAN
string
VATNumber
string
includeVAT
boolean
fixedDiscountPercentage
number
Array of objects (ContactPerson)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "user@example.com",
  • "type": "person",
  • "orgno": "string",
  • "category": {
    },
  • "customerNumber": "string",
  • "parentCustomerId": 0,
  • "orgNumber": "string",
  • "address1": {
    },
  • "address2": {
    },
  • "notes": "string",
  • "paymentType": "Invoice",
  • "deadline": 0,
  • "creditLimit": 0,
  • "invoiceMethod": "Email",
  • "purchaseOrder": "string",
  • "language": "Norwegian",
  • "currency": "NOK",
  • "EAN": "string",
  • "VATNumber": "string",
  • "includeVAT": true,
  • "fixedDiscountPercentage": 0,
  • "contactPersons": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Invalid request, please review the errors and retry the request"
}

Sales/Requests

Create a new Request

Creats a new Request in the system

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

TimeZone
string
Example: Europe/Berlin

The timezone of the client of the request

Request Body schema: application/json
required

Request data

tripType
string
Default: "OneWay"
Enum: "OneWay" "Return"
departureDate
required
string <date>
departureTime
required
string^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$
returnDate
string <date>
returnTime
string^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$
required
object (Location)
required
object (Location)
pax
required
integer <int32>
busAvailableDuringStay
boolean
Default: false
comments
string
acceptTerms
required
boolean
externalReference
string
customerType
required
string
Default: "person"
Enum: "person" "organization"
companyName
string
companyOrgNumber
string
firstName
required
string
lastName
required
string
email
required
string <email>
phoneNo
required
string

Responses

Request samples

Content type
application/json
{
  • "tripType": "OneWay",
  • "departureDate": "2019-08-24",
  • "departureTime": "string",
  • "returnDate": "2019-08-24",
  • "returnTime": "string",
  • "travelFrom": {
    },
  • "travelTo": {
    },
  • "pax": 0,
  • "busAvailableDuringStay": false,
  • "comments": "string",
  • "acceptTerms": true,
  • "externalReference": "string",
  • "customerType": "person",
  • "companyName": "string",
  • "companyOrgNumber": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "user@example.com",
  • "phoneNo": "string"
}

Response samples

Content type
application/json
{
  • "requestId": "string",
  • "customerId": "string"
}

Create a new Request for a given customer

Create a new Request for a given customer

path Parameters
customerId
required
integer

existing customer Id

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

TimeZone
string
Example: Europe/Berlin

The timezone of the client of the request

Request Body schema: application/json
required

Request data

tripType
string
Default: "OneWay"
Enum: "OneWay" "Return"
departureDate
required
string <date>
departureTime
required
string^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$
returnDate
string <date>
returnTime
string^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$
required
object (Location)
required
object (Location)
pax
required
integer <int32>
busAvailableDuringStay
boolean
Default: false
comments
string
acceptTerms
required
boolean
externalReference
string

Responses

Request samples

Content type
application/json
{
  • "tripType": "OneWay",
  • "departureDate": "2019-08-24",
  • "departureTime": "string",
  • "returnDate": "2019-08-24",
  • "returnTime": "string",
  • "travelFrom": {
    },
  • "travelTo": {
    },
  • "pax": 0,
  • "busAvailableDuringStay": false,
  • "comments": "string",
  • "acceptTerms": true,
  • "externalReference": "string"
}

Response samples

Content type
application/json
{
  • "requestId": "string"
}

Sales/Orders

Create a new Order for a given customer

Creats a new Order in the system

path Parameters
customerId
required
integer

existing customer Id

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

TimeZone
string
Example: Europe/Berlin

The timezone of the client of the request

Request Body schema: application/json
required

Request data

Array of objects (PostTrip)

Responses

Request samples

Content type
application/json
{
  • "Trips": [
    ]
}

Response samples

Content type
application/json
{
  • "orderId": "34290",
  • "gen_oid": "BT-034150-S01"
}

Returns the status for a given order and the statu

Returns the status for a given order and the status of all trips related to this order

path Parameters
id
required
integer

Order ID

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

Responses

Response samples

Content type
application/json
{
  • "order_id": "34290",
  • "status": "string",
  • "trips": [
    ]
}

Sales/Capacity

Returns the vehicle capacity for a given time

Returns the vehicle capacity for a given time

path Parameters
startTime
required
string
Example: 01.01.2025 10:00

The start-time for the trip. Format DD.MM.YYYY HH:MM

endTime
required
string
Example: 01.01.2025 12:00

The end-time for the trip. Format DD.MM.YYYY HH:MM

departmentId
integer

Id of the department to get the capacity for

vehicleTypeId
integer

Id of the vehicle type to get the capacity for

pax
integer

The number of passengers to get the capacity for, vehicle type will be set to default based on the number of passengers

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

Responses

Response samples

Content type
application/json
{
  • "capacity": "High",
  • "departmentId": 0,
  • "departmentName": "string",
  • "vehicletypeId": 0,
  • "vehicleTypeName": "string",
  • "tripCount": {
    },
  • "fullDayInfo": [
    ]
}

Core/Vehicles

Returns a list of vehicles

Returns a list of vehicles

header Parameters
domain
required
string
Example: ferdia

The domain/company to direct the API-call to

Responses

Response samples

Content type
application/json
[
  • {
    }
]