Download OpenAPI specification:
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.
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).
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.
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).
Creates a new customer
| domain required | string Example: ferdia The domain/company to direct the API-call to |
Customer data
| name | string |
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) |
{- "name": "string",
- "email": "user@example.com",
- "type": "person",
- "orgno": "string",
- "category": {
- "id": 0,
- "name": "string",
- "description": "string",
- "active": true,
- "default": true
}, - "customerNumber": "string",
- "parentCustomerId": 0,
- "address1": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "address2": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "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": [
- {
- "id": 0,
- "firstname": "string",
- "lastname": "string",
- "email": "user@example.com",
- "mobilePhone": "string",
- "fixedPhone": "string",
- "primaryContact": true,
- "roleInCompany": "string"
}
]
}{- "customerId": "string"
}Returns a list of customers based on the filters provided
| type | string (CustomerType) Enum: "person" "organization" |
| name | string |
string | |
| orgno | string |
| freetext | string |
| domain required | string Example: ferdia The domain/company to direct the API-call to |
[- {
- "id": 0,
- "customerNumber": 0,
- "name": "string",
- "email": "user@example.com",
- "type": "person",
- "orgno": "string",
- "category": {
- "id": 0,
- "name": "string",
- "description": "string",
- "active": true,
- "default": true
}, - "addresses": [
- {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}
], - "contactPersons": [
- {
- "id": 0,
- "firstname": "string",
- "lastname": "string",
- "email": "user@example.com",
- "mobilePhone": "string",
- "fixedPhone": "string",
- "primaryContact": true,
- "roleInCompany": "string"
}
]
}
]Updates an existing customer
| id required | integer Customer ID |
| domain required | string Example: ferdia The domain/company to direct the API-call to |
Customer data
| name | string |
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) |
{- "name": "string",
- "email": "user@example.com",
- "type": "person",
- "orgno": "string",
- "category": {
- "id": 0,
- "name": "string",
- "description": "string",
- "active": true,
- "default": true
}, - "customerNumber": "string",
- "parentCustomerId": 0,
- "orgNumber": "string",
- "address1": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "address2": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "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": [
- {
- "id": 0,
- "firstname": "string",
- "lastname": "string",
- "email": "user@example.com",
- "mobilePhone": "string",
- "fixedPhone": "string",
- "primaryContact": true,
- "roleInCompany": "string"
}
]
}{- "message": "Invalid request, please review the errors and retry the request"
}Creats a new Request in the system
| 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 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 |
{- "tripType": "OneWay",
- "departureDate": "2019-08-24",
- "departureTime": "string",
- "returnDate": "2019-08-24",
- "returnTime": "string",
- "travelFrom": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "travelTo": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "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"
}{- "requestId": "string",
- "customerId": "string"
}Create a new Request for a given customer
| customerId required | integer existing customer Id |
| 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 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 |
{- "tripType": "OneWay",
- "departureDate": "2019-08-24",
- "departureTime": "string",
- "returnDate": "2019-08-24",
- "returnTime": "string",
- "travelFrom": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "travelTo": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "pax": 0,
- "busAvailableDuringStay": false,
- "comments": "string",
- "acceptTerms": true,
- "externalReference": "string"
}{- "requestId": "string"
}Creats a new Order in the system
| customerId required | integer existing customer Id |
| 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 data
Array of objects (PostTrip) |
{- "Trips": [
- {
- "tripType": "OneWay",
- "departureDate": "2019-08-24",
- "departureTime": "string",
- "returnDate": "2019-08-24",
- "returnTime": "string",
- "travelFrom": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "travelTo": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "viaPoints": [
- {
- "location": {
- "geoLocation": {
- "lat": 0,
- "long": 0
}, - "address": {
- "address1": "string",
- "postcode": "string",
- "city": "string",
- "country": "string"
}, - "googleFormattedAddress": "string"
}, - "pauseTimeInMinutes": 0
}
], - "pax": 0,
- "busAvailableDuringStay": false,
- "acceptTerms": true,
- "externalReference": "string",
- "vehicleLicensePlate": "string",
- "pointOfContact": 0,
- "newPointOfContact": {
- "id": 0,
- "firstname": "string",
- "lastname": "string",
- "email": "user@example.com",
- "mobilePhone": "string",
- "fixedPhone": "string",
- "primaryContact": true,
- "roleInCompany": "string"
}, - "comments": {
- "toInvoice": "string",
- "toPlanning": "string",
- "toDriver": "string",
- "fromCustomer": "string",
- "toCustomer": "string"
}, - "details": {
- "flag": "string",
- "sign": "string",
- "alternativeTripName": "string",
- "purchaseOrder": "string"
}, - "price": 1000,
- "prepaid": false,
- "addToPlanning": false,
- "plannedDuration": {
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z"
}, - "orderStatus": "Draft"
}
]
}{- "orderId": "34290",
- "gen_oid": "BT-034150-S01"
}Returns the status for a given order and the status of all trips related to this order
| id required | integer Order ID |
| domain required | string Example: ferdia The domain/company to direct the API-call to |
{- "order_id": "34290",
- "status": "string",
- "trips": [
- {
- "trip_id": {
- "status": "string"
}
}
]
}Returns the vehicle capacity for a given time
| 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 |
| domain required | string Example: ferdia The domain/company to direct the API-call to |
{- "capacity": "High",
- "departmentId": 0,
- "departmentName": "string",
- "vehicletypeId": 0,
- "vehicleTypeName": "string",
- "tripCount": {
- "total": 8,
- "activeNormalTrips": 4,
- "activeFixedTrips": 2,
- "confirmedNormalTrips": 1,
- "sentQuotations": 0,
- "drafts": 1
}, - "fullDayInfo": [
- {
- "startTime": "01.01.2025 00:00",
- "endTime": "01.01.2025 01:00",
- "capacity": "High",
- "tripCount": {
- "total": 4,
- "activeNormalTrips": 0,
- "activeFixedTrips": 2,
- "confirmedNormalTrips": 1,
- "sentQuotations": 0,
- "drafts": 1
}
}
]
}Returns a list of vehicles
| domain required | string Example: ferdia The domain/company to direct the API-call to |
[- {
- "id": "string",
- "vehicleName": "string",
- "manufacturer": "string",
- "model": "string",
- "numberOfSeats": 0,
- "numberOfStanding": 0,
- "numberOfGuideSeats": 0,
- "numberOfHandicapSeats": 0,
- "licenseplate": "string",
- "euroClass": "string",
- "vehicleCategory": "string",
- "deadlineForRoadWorthinessTest": "2019-08-24",
- "fuelType": "Diesel",
- "length": 0,
- "width": 0,
- "height": 0,
- "weight": 0,
- "availableInBookabus": true,
- "active": true
}
]