POST api/freightwareauthentication/login

Authenticates against FreightWare and returns a FreightWare session token. This token must be used in the X-FreightWare request header for all authenticated API requests. Example Header: X-FreightWare : YOUR_TOKEN Username and Password are automatically encrypted before being sent to FreightWare.

Request Information

URI Parameters

None.

Body Parameters

LoginRequest containing: Username, Password, Station

LoginRequest
NameDescriptionTypeAdditional information
Username

string

None.

Password

string

None.

Station

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Username": "sample string 1",
  "Password": "sample string 2",
  "Station": "sample string 3"
}

application/xml, text/xml

Sample:
<LoginRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DCB_API">
  <Password>sample string 2</Password>
  <Station>sample string 3</Station>
  <Username>sample string 1</Username>
</LoginRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'LoginRequest'.

Response Information

Resource Description

FreightWare authentication response and session token.

LoginResponse
NameDescriptionTypeAdditional information
success

boolean

None.

token

string

None.

fwResponse

Object

None.

requestSent

string

None.

Response Formats

application/json, text/json

Sample:
{
  "success": true,
  "token": "sample string 2",
  "fwResponse": {},
  "requestSent": "sample string 4"
}

application/xml, text/xml

Sample:
<LoginResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DCB_API">
  <fwResponse />
  <requestSent>sample string 4</requestSent>
  <success>true</success>
  <token>sample string 2</token>
</LoginResponse>