Version: 1
Base URL: https://tfs.system.trans.eu/api/rest/v1
Resources
TFS
Get dedicated order
Scopes
- tfs.dedicated-orders.basic.read
Endpoint
GET /dedicated-orders/{order-id}
Query parameters
Param |
Type |
Description |
Required |
order-id |
String |
Order identifier received with POST response in id field |
yes |
Responses
Http status |
Description |
200 |
Returned the dedicated order entity |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden (i.e. wrong or missing access token) |
404 |
Dedicated order not found |
500 |
Internal Server Error |
Response data structure
Property |
Type |
Description |
id |
String |
Unique order id (as UUID) |
number |
String |
Assigned order number (unique in scope of company) |
status |
String |
{pending ,accepted } |
route |
Object (Route) |
Route details |
payment |
Object (Payment) |
Payment details |
carrier |
Object (Contractor) |
Carrier details |
shipper |
Object (Contractor) |
Shipper details |
loads |
Array (of Load) |
Loads details |
_links |
Object |
External resources references |
Route
object structure
Field |
Type |
Description |
events |
Array (of RouteEvent) |
Sorted list of route events |
RouteEvent
object structure
Field |
Type |
Description |
place |
Object (Place) |
Details of event place |
type |
Enum |
Event type. Possible values: loading , unloading |
Place
object structure
Field |
Type |
Description |
address |
Object (Address) |
Address details |
Address
object structure
Field |
Type |
Description |
locality |
String |
City name |
postal_code |
String |
Postal code |
country |
String |
Country code in format ISO 3166-1 alpha-2 |
Payment
object structure
Field |
Type |
Description |
price |
Object (Price) |
Price definition |
date_interval |
String |
Payment date interval in days, ISO 8601 formatted (see PHP DateInterval for more information) |
Price
object structure
Field |
Type |
Description |
value |
Number |
Price value |
currency |
String |
Price currency (ISO 4217) |
Contractor
object structure
Field |
Type |
Description |
company |
Object (Company) |
Contractor company details |
contact_person |
Object (ContactPerson) |
Contact person details |
Company
object structure
Field |
Type |
Description |
name |
String |
Company name |
vat_id |
String |
Company VAT id |
address |
Object (Address) |
Company address details |
ContactPerson
object structure
Field |
Type |
Description |
given_name |
String |
Person's given name |
family_name |
String |
Person's last name |
email |
String |
E-mail address |
telephone |
String |
Telephone number in format: (XX) XXXXXXXXX |
Load
object structure
Field |
Type |
Description |
weight |
Object (Weight) |
Load weight details |
Weight
object structure
Field |
Type |
Description |
value |
Number |
Weight value |
unit |
String |
Weight unit Possible values: TNE (tons) |
Example
GET /api/rest/v1/dedicated-orders/123e4567-e89b-12d3-a456-426655440000 HTTP/1.1
Host: tfs.system.trans.eu
Accept: application/hal+json
Authorization: Bearer {access_token}
HTTP/1.1 200 OK
Content-Type: application/hal+json
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"number": "PL/2016/05/05/1234",
"route": {
"events": [
{
"place": {
"address": {
"locality": "Wrocław",
"postal_code": "12-345",
"country": "PL"
}
},
"type": "loading"
},
{
"place": {
"address": {
"locality": "Warszawa",
"postal_code": "54-321",
"country": "PL"
}
},
"type": "unloading"
}
]
},
"payment": {
"price": {
"value": 50,
"currency": "PLN"
},
"date_interval": "P10D"
},
"loads" : [
{
"weight" : {
"value" : 23,
"unit" : "T"
}
},
{
"weight" : {
"value" : 4,
"unit" : "T"
}
}
],
"_links": {
"self": {
"href": "https://tfs.system.trans.eu/api/rest/v1/dedicated-orders/123e4567-e89b-12d3-a456-426655440000"
}
}
}
Dedicated Orders
Add dedicated order
Scopes
- tfs.dedicated-orders.basic.create
Endpoint
POST /dedicated-orders
Request body data
Param |
Type |
Description |
Required |
number |
String |
Order number (unique in scope of your company) |
yes |
payment |
Object (Payment) |
Payment details |
yes |
route |
Object (Route) |
Route details |
yes |
carrier |
Object (Contractor) |
Carrier details |
no |
loads |
Array (of Load) |
Loads details |
no |
Payment
object structure
Field |
Type |
Description |
Required |
price |
Object (Price) |
Price definition |
yes |
date_interval |
String |
Payment date interval (in days, ISO 8601 formatted - see PHP DateInterval for more information) |
yes |
Price
object structure
Field |
Type |
Description |
Required |
value |
Number |
Price value (positive number) |
yes |
currency |
String (Currency) |
Price currency (ISO 4217) |
yes |
Contractor
object structure
Field |
Type |
Description |
Required |
company |
Object (Company) |
Contractor company details |
no |
contact_person |
Object (ContactPerson) |
Contractor contact person details |
no |
Company
object structure
Field |
Type |
Description |
Required |
name |
String |
Company name |
yes |
vat_id |
String |
Company VAT id |
no |
address |
Object (Address) |
Company address details |
no |
Address
object structure
Field |
Type |
Description |
Required |
locality |
String |
City name |
yes |
postal_code |
String |
Postal code |
yes |
country |
String |
Country code in format ISO 3166-1 alpha-2 Example: PL |
yes |
ContactPerson
object structure
Field |
Type |
Description |
Required |
given_name |
String |
Person's first name |
yes |
family_name |
String |
Person's last name |
yes |
email |
String |
E-mail address |
yes |
telephone |
String |
Phone number in format: (XX) XXXXXXXXX |
no |
Route
object structure
Field |
Type |
Description |
Required |
events |
Array (of RouteEvent) |
Array with route events |
yes |
RouteEvent
object structure
Field |
Type |
Description |
Required |
place |
Object (Place) |
Details of event place |
yes |
type |
String |
Event type. Possible values: loading , unloading |
yes |
Place
object structure
Field |
Type |
Description |
Required |
address |
Object (Address) |
Address details |
yes |
Load
object structure
Field |
Type |
Description |
Required |
weight |
Object (Weight) |
Load weight details |
yes |
Weight
object structure
Field |
Type |
Description |
Required |
value |
Number |
Weight value |
yes |
unit |
String |
Weight unit Possible values: TNE (tons) |
yes |
Supported Currency
list
Value (code) |
Currency name |
BAM |
Bosnia and Herzegovina Convertible Mark |
BGN |
Bulgarian Lev |
BYR |
Belarussan Ruble |
CHF |
Swiss Franc |
CZK |
Czech Koruna |
DKK |
Danish Krone |
EUR |
European Euro |
GBP |
Pound Sterling |
HRK |
Croatian Kuna |
HUF |
Hungarian Forint |
ISK |
Icelandic Krona |
KZT |
Kazakhstani Tenge |
MDL |
Moldovan Leu |
MKD |
Macedonian Denar |
NOK |
Norwegian Krone |
PLN |
Polish Zloty |
RON |
Romanian Leu |
RSD |
Serbian Dinar |
RUB |
Russian Ruble |
SEK |
Swedish Krone |
TRY |
Turkish Lira |
UAH |
Ukrainian Hryvnia |
USD |
US Dollars |
Responses
Http status |
Description |
201 |
Created and returned the order entity |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden (i.e. wrong or missing access token) |
422 |
Unprocessable entity (i.e. invalid or missing request parameter) |
500 |
Internal Server Error |
Example
POST /api/rest/v1/dedicated-orders HTTP/1.1
Host: tfs.system.trans.eu
Accept: application/hal+json
Content-Type: application/json
Authorization: Bearer {access_token}
{
"number": "DE/3455/4460",
"route" : {
"events": [
{
"place": {
"address": {
"locality": "Berlin",
"postal_code": "3456",
"country": "DE"
}
},
"type": "loading"
},
{
"place": {
"address": {
"locality": "Wysoka",
"postal_code": "12345",
"country": "PL"
}
},
"type": "unloading"
}
]
},
"payment": {
"price": {
"value": 34,
"currency": "PLN"
},
"date_interval": "P10D"
},
"loads" : [
{
"weight" : {
"value" : 13,
"unit" : "T"
}
},
{
"weight" : {
"value" : 14,
"unit" : "T"
}
}
]
}
HTTP/1.1 201 Created
Content-Type: application/hal+json
{
"id": "56acf700-1774-11e6-8ab6-0002a5d5c51b",
...
}
POST response data structure is identical to GET response structure.