Parsyl API (1.0)

Download OpenAPI specification:Download

The public facing Parsyl API

Authentication

Login to the Parsyl API

This endpoint serves two purposes. It either sends a One Time Password (OTP) to an email address or phone, or exchanges a client ID and secret pair for an access token. In the first case, the OTP must be exchanged for an access token by calling the token exchange endpoint below. If a client ID and secret are used, no further authentication is required.

Request Body schema: application/json

The login request

One of
locale
string
Enum: "en" "fr"

The language to use for the emailed one time password.

redirectTo
string

For internal use only

email
string

The email address to send a one time password to.

Responses

Request samples

Content type
application/json
Example
{
  • "locale": "en",
  • "redirectTo": "string",
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "expires_in": 0,
  • "sends": 0,
  • "maxSends": 0,
  • "retryAfter": 0
}

Token exchange

This endpoint will either exchange a One Time Password (OTP) for an access token, or exchange an expired access token and refresh token pair for a new access token.

query Parameters
refresh
boolean

An optional parameter to indicate whether a refresh token should be issued along with the access token

Request Body schema: application/json

The login request

One of
One of
token
string

The one time password.

email
string

The email address this one time password was sent to.

Responses

Request samples

Content type
application/json
Example
{
  • "token": "string",
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "refreshToken": "string"
}

Shipments

List all shipments

Obtain the list of all shipments

path Parameters
companyId
required
any

The ID of the company

query Parameters
limit
any

The limit on devices to return

offset
any

The current query offset

header Parameters
Authorization
required
any

Authorization JWT token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a shipment

Create a shipment

path Parameters
companyId
required
any

The ID of the company

header Parameters
Authorization
required
any

Authorization JWT token

Request Body schema: application/json

The shipment definition

name
string

The name of this shipment. Can be any string.

description
string

A description for this shipment. Can be any string.

goods
string

A description of the contents of this shipment. Can be any string.

status
string
Enum: "pending" "in-transit" "complete"

The current status of this shipment.

start
integer <int64>

The start time of this shipment. The time is in Unix Timestamp milliseconds.

stop
integer <int64>

The stop time of this shipment. The time is in Unix Timestamp milliseconds.

object

The identifier (UUID) of the origin waypoint.

object

The identifier (UUID) of the destination waypoint.

object (InsuredValue)
Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "goods": "string",
  • "status": "pending",
  • "start": 0,
  • "stop": 0,
  • "origin": {
    },
  • "destination": {
    },
  • "insuredValue": {
    },
  • "devices": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "goods": "string",
  • "status": "pending",
  • "start": 0,
  • "stop": 0,
  • "autoGenerated": true,
  • "origin": {
    },
  • "destination": {
    },
  • "insuredValue": {
    },
  • "devices": [
    ],
  • "excursions": {
    }
}

Update a shipment

Update a shipment

path Parameters
companyId
required
any

The company ID

shipmentId
required
any

The ID of the shipment to update

header Parameters
Authorization
required
any

Authorization JWT token

Request Body schema: application/json

The shipment definition

name
string

The name of this shipment. Can be any string.

description
string

A description for this shipment. Can be any string.

goods
string

A description of the contents of this shipment. Can be any string.

status
string
Enum: "pending" "in-transit" "complete"

The current status of this shipment.

start
integer <int64>

The start time of this shipment. The time is in Unix Timestamp milliseconds.

stop
integer <int64>

The stop time of this shipment. The time is in Unix Timestamp milliseconds.

object

The identifier (UUID) of the origin waypoint.

object

The identifier (UUID) of the destination waypoint.

object (InsuredValue)
Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "goods": "string",
  • "status": "pending",
  • "start": 0,
  • "stop": 0,
  • "origin": {
    },
  • "destination": {
    },
  • "insuredValue": {
    },
  • "devices": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "goods": "string",
  • "status": "pending",
  • "start": 0,
  • "stop": 0,
  • "autoGenerated": true,
  • "origin": {
    },
  • "destination": {
    },
  • "insuredValue": {
    },
  • "devices": [
    ],
  • "excursions": {
    }
}

Get a shipment

Get a specific shipment and its details

path Parameters
shipmentId
required
any

The shipment ID

header Parameters
Authorization
required
any

Authorization JWT token

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "goods": "string",
  • "status": "pending",
  • "start": 0,
  • "stop": 0,
  • "autoGenerated": true,
  • "origin": {
    },
  • "destination": {
    },
  • "insuredValue": {
    },
  • "devices": [
    ],
  • "excursions": {
    }
}

Waypoints

Get all company waypoints

Get all waypoints associated with a company

path Parameters
companyId
required
any

The ID of the company

query Parameters
related
any

If 'false' don't include the company's related waypoints

header Parameters
Authorization
required
any

Authorization JWT token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a waypoint

Create a waypoint

path Parameters
companyId
required
any

The ID of the company

header Parameters
Authorization
required
any

Authorization JWT token

Request Body schema: application/json

The waypoint definition

name
string

The name of this waypoint. Can be any string.

timezone
string

The timezone associated with this waypoint.

customName
string

An alternate name of this waypoint. Can be any string.

object

The location of this waypoint

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "timezone": "string",
  • "customName": "string",
  • "location": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "timezone": "string",
  • "customName": "string",
  • "location": {
    }
}

Get a waypoint

Get a specific waypoint and its details.

path Parameters
companyId
required
any

The ID of the company

waypointId
required
any

The ID of the waypoint

header Parameters
Authorization
required
any

Authorization JWT token

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "timezone": "string",
  • "customName": "string",
  • "location": {
    }
}

Update a waypoint

Update a waypoint

path Parameters
companyId
required
any

The ID of the company

waypointId
required
any

The ID of the waypoint

header Parameters
Authorization
required
any

Authorization JWT token

Request Body schema: application/json

The waypoint definition

name
string

The name of this waypoint. Can be any string.

timezone
string

The timezone associated with this waypoint.

customName
string

An alternate name of this waypoint. Can be any string.

object

The location of this waypoint

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "timezone": "string",
  • "customName": "string",
  • "location": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "timezone": "string",
  • "customName": "string",
  • "location": {
    }
}

Delete a waypoint

Delete a waypoint

path Parameters
companyId
required
any

The ID of the company

waypointId
required
any

The ID of the waypoint

header Parameters
Authorization
required
any

Authorization JWT token

Responses

Advertisements

Parse a Trek advertisement

Parse a Trek advertisement

path Parameters
advertisement
required
any

Advertisement data as a hex string

header Parameters
Authorization
required
any

Authorization JWT token

Responses

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "profileId": "string",
  • "ageOfShipmentEnd": {
    },
  • "ageOfShipmentStart": {
    },
  • "latestTemperature": 0,
  • "latestHumidity": 0,
  • "dataReady": true,
  • "epochUnset": true,
  • "button": true,
  • "shockEventSeverity": 0,
  • "tempUnderSeverity": 0,
  • "tempOverSeverity": 0,
  • "humidityUnderSeverity": 0,
  • "humidityOverSeverity": 0,
  • "recordingState": "string",
  • "switchTempFailsafeActive": true,
  • "selfTestFailed": true,
  • "modeSwitch": true,
  • "minutesSinceLastRecordingPeriodStarted": 0,
  • "minutesSinceLastRecordingPeriodStopped": 0,
  • "minutesUntilRecordingStarts": 0,
  • "minutesUntilRecordingPeriodStarts": 0,
  • "minutesUntilRecordingPeriodStops": 0,
  • "minutesSinceCurrentRecordingPeriodStarted": 0,
  • "minutesUntilCurrentRecordingPeriodStops": 0
}