Back to Docs

ACSP REST API (0.0.1)

Download OpenAPI specification:Download

REST API Documentation for the Autoliv Connected Services Platform REST API

Campaign

Search for campaigns.

Lists all campaigns on the server filtered by any provided search filters.

Authorizations:
ACSP-OpenIDC
query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "campaign"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

campaign
string

Search for a specific campaign.

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{}

Create a new campaign

Creates a new campaign.

Authorizations:
ACSP-OpenIDC
path Parameters
campaign
required
string

The campaign identifier/name.

Request Body schema: application/json
secret
string (Secret)

Responses

Request samples

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

Delete an existing campaign.

Permanently deletes a campaign from the server.

Authorizations:
ACSP-OpenIDC
path Parameters
campaign
required
string

The campaign identifier/name.

Responses

Gain access to a specific campaign.

Checks whether you have access to the requested campaign given an optional secret.

Authorizations:
ACSP-OpenIDC
path Parameters
campaign
required
string

The campaign identifier/name.

Request Body schema: application/json
secret
string (Secret)

Responses

Request samples

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

Trips

Retrieve Conversations for a Trip

Gets all conversations associated with a specific trip.

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Responses

Response samples

Content type
application/json
{
  • "conversationId": 0,
  • "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",
  • "lat": 0,
  • "lng": 0,
  • "messages": [
    ]
}

Retrieve Conversations for a Trip

Create a new conversation associated with a specific trip.

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Request Body schema: application/json
content
required
string (Content)

Responses

Request samples

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

Query Trips

Gets the information of trips based on the query

Authorizations:
ACSP-OpenIDC
query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "startTime"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Create Trip

Creates a new trip

Authorizations:
ACSP-OpenIDC
header Parameters
X-ACSP-Campaign-Secret
string

Campaign secret for campaign

Request Body schema: application/json
vehicleId
string <uuid> (Vehicleid)
transportationMode
required
string (Transportationmode)
duration
required
integer (Duration) >= 0
startTime
required
string <date-time> (Starttime)
userWeight
integer (Userweight) > 0
userHeight
integer (Userheight) > 0
campaign
string (Campaign)

Responses

Request samples

Content type
application/json
{
  • "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",
  • "transportationMode": "string",
  • "duration": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "userWeight": 0,
  • "userHeight": 0,
  • "campaign": "string"
}

Retrieve Trip

Gets the information of a trip from its id

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Responses

Response samples

Content type
application/json
{
  • "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",
  • "transportationMode": "string",
  • "duration": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "userWeight": 0,
  • "userHeight": 0,
  • "campaign": "string",
  • "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"
}

Upsert Trip

Places a new trip in the specified location

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

header Parameters
X-ACSP-Campaign-Secret
string

Campaign secret for campaign

Request Body schema: application/json
vehicleId
string <uuid> (Vehicleid)
transportationMode
required
string (Transportationmode)
duration
required
integer (Duration) >= 0
startTime
required
string <date-time> (Starttime)
userWeight
integer (Userweight) > 0
userHeight
integer (Userheight) > 0
campaign
string (Campaign)

Responses

Request samples

Content type
application/json
{
  • "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",
  • "transportationMode": "string",
  • "duration": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "userWeight": 0,
  • "userHeight": 0,
  • "campaign": "string"
}

Delete Trip

Deletes the trip with the specified id. This deletes all items related to the trip such as blobs, events, and storage blobs.

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Responses

Query Trip Blobs

Gets the information of the blobs of the trips

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "deviceLocation"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Create Trip Blob

Creates a new blob

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Request Body schema: application/json
deviceId
required
string <uuid> (Deviceid)
deviceLocation
required
string (Devicelocation)
deviceFirmwareVersion
required
string (Devicefirmwareversion)

Responses

Request samples

Content type
application/json
{
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  • "deviceLocation": "string",
  • "deviceFirmwareVersion": "string"
}

Retrieve Trip Blob

Gets the information of a blob from its id

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

blobId
required
string <UUID>

The blob id

Responses

Response samples

Content type
application/json
{
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  • "deviceLocation": "string",
  • "deviceFirmwareVersion": "string",
  • "blobId": "0f49f85e-7d44-46b5-bdff-ecf86c7fc0da",
  • "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",
  • "blobUri": "http://example.com",
  • "existsInStorage": true
}

Upsert Trip Blob

Puts a blob in the specified location

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

blobId
required
string <UUID>

The blob id

Request Body schema: application/json
deviceId
required
string <uuid> (Deviceid)
deviceLocation
required
string (Devicelocation)
deviceFirmwareVersion
required
string (Devicefirmwareversion)

Responses

Request samples

Content type
application/json
{
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  • "deviceLocation": "string",
  • "deviceFirmwareVersion": "string"
}

Query Trip Events

Gets the information of events of a trip based on the query

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "timestamp"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Create Trip Event

Creates a new trip

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Request Body schema: application/json
type
required
string (Type)
comment
required
string (Comment)
timestamp
string <date-time> (Timestamp)

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "comment": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Retrieve Trip Event

Gets the information of an event using it's trip and event id

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

eventId
required
string <UUID>

The event id

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "comment": "string",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c",
  • "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5"
}

Upsert Trip Event

Places a new trip event in the specified location

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

eventId
required
string <UUID>

The event id

Request Body schema: application/json
type
required
string (Type)
comment
required
string (Comment)
timestamp
string <date-time> (Timestamp)

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "comment": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Conversations

Retrieve Conversations for a User

Gets all conversations associated with a specific user.

Authorizations:
ACSP-OpenIDC
path Parameters
userId
required
string <UUID>

The user id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Device

Get devices

Gets the information of devices based on the query

Authorizations:
ACSP-OpenIDC
query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "type"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Gets information of a device

Gets the information of a device from its id

Authorizations:
ACSP-OpenIDC
path Parameters
deviceId
required
string <UUID>

The device id

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "manufacturer": "string",
  • "model": "string",
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a"
}

Puts a device

Creates a new device

Authorizations:
ACSP-OpenIDC
path Parameters
type
required
string

Type of the device. Logger, mobile, etc.

manufacturer
required
string

Manufacturer of the device

model
required
string

Model of the device

Responses

Blobs

Query Trip Blobs

Gets the information of the blobs of the trips

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "deviceLocation"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Create Trip Blob

Creates a new blob

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Request Body schema: application/json
deviceId
required
string <uuid> (Deviceid)
deviceLocation
required
string (Devicelocation)
deviceFirmwareVersion
required
string (Devicefirmwareversion)

Responses

Request samples

Content type
application/json
{
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  • "deviceLocation": "string",
  • "deviceFirmwareVersion": "string"
}

Retrieve Trip Blob

Gets the information of a blob from its id

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

blobId
required
string <UUID>

The blob id

Responses

Response samples

Content type
application/json
{
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  • "deviceLocation": "string",
  • "deviceFirmwareVersion": "string",
  • "blobId": "0f49f85e-7d44-46b5-bdff-ecf86c7fc0da",
  • "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",
  • "blobUri": "http://example.com",
  • "existsInStorage": true
}

Upsert Trip Blob

Puts a blob in the specified location

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

blobId
required
string <UUID>

The blob id

Request Body schema: application/json
deviceId
required
string <uuid> (Deviceid)
deviceLocation
required
string (Devicelocation)
deviceFirmwareVersion
required
string (Devicefirmwareversion)

Responses

Request samples

Content type
application/json
{
  • "deviceId": "4de4adb9-21ee-47e3-aeb4-8cf8ed6c109a",
  • "deviceLocation": "string",
  • "deviceFirmwareVersion": "string"
}

Events

Query Trip Events

Gets the information of events of a trip based on the query

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "timestamp"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Create Trip Event

Creates a new trip

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

Request Body schema: application/json
type
required
string (Type)
comment
required
string (Comment)
timestamp
string <date-time> (Timestamp)

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "comment": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Retrieve Trip Event

Gets the information of an event using it's trip and event id

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

eventId
required
string <UUID>

The event id

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "comment": "string",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c",
  • "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5"
}

Upsert Trip Event

Places a new trip event in the specified location

Authorizations:
ACSP-OpenIDC
path Parameters
tripId
required
string <UUID>

The trip id

eventId
required
string <UUID>

The event id

Request Body schema: application/json
type
required
string (Type)
comment
required
string (Comment)
timestamp
string <date-time> (Timestamp)

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "comment": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

User

Get Users

Lists all users on the server filtered by any provided search filters.

Authorizations:
ACSP-OpenIDC
query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "userId"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "gender": "string",
  • "birthYear": 0,
  • "height": 0,
  • "weight": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "createDate": "2019-08-24"
}

Get User Me

Gets the information of a user the token.

Authorizations:
ACSP-OpenIDC

Responses

Response samples

Content type
application/json
{
  • "gender": "string",
  • "birthYear": 0,
  • "height": 0,
  • "weight": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "createDate": "2019-08-24"
}

Put User Me

Initialize a user account from a user token.

Authorizations:
ACSP-OpenIDC

Responses

Delete User Me

Disassociates the user account from a user token.

Authorizations:
ACSP-OpenIDC

Responses

Gets information about a user from the server.

Gets the information of a user from its id.

Authorizations:
ACSP-OpenIDC
path Parameters
userId
required
string <UUID>

The user id

Responses

Response samples

Content type
application/json
{
  • "gender": "string",
  • "birthYear": 0,
  • "height": 0,
  • "weight": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "createDate": "2019-08-24"
}

Put User

Creates a new user and associates it with the provided id.

Authorizations:
ACSP-OpenIDC
path Parameters
userId
required
string <UUID>

The user id

Request Body schema: application/json
gender
string (Gender)
birthYear
integer (Birthyear)
height
integer (Height) >= 0
weight
integer (Weight) >= 0

Responses

Request samples

Content type
application/json
{
  • "gender": "string",
  • "birthYear": 0,
  • "height": 0,
  • "weight": 0
}

Patch User

Updates parameters of the user associated with the provided id.

Authorizations:
ACSP-OpenIDC
path Parameters
userId
required
string <UUID>

The user id

Request Body schema: application/json
gender
string (Gender)
birthYear
integer (Birthyear)
height
integer (Height) >= 0
weight
integer (Weight) >= 0

Responses

Request samples

Content type
application/json
{
  • "gender": "string",
  • "birthYear": 0,
  • "height": 0,
  • "weight": 0
}

Vehicle

Query Vehicles

Gets the information of vehicles based on the query

Authorizations:
ACSP-OpenIDC
query Parameters
skip
integer
Default: 0

Number of items to skip

take
integer
Default: 10

Number of items to take

sortBy
string
Default: "vehicleType"

Column used for sorting

sortAsc
boolean
Default: false

Flag is sorting is ascending

query
string

Query string use to filter the data

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totalCount": 0,
}

Get Vehicle

Gets the information of a vehicle from its id

Authorizations:
ACSP-OpenIDC
path Parameters
vehicleId
required
string <UUID>

The vehicle id

Responses

Response samples

Content type
application/json
{
  • "vehicleType": "string",
  • "manufacturer": "string",
  • "model": "string",
  • "year": 0,
  • "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb"
}

Puts a vehicle

Creates a new vehicle

Authorizations:
ACSP-OpenIDC
path Parameters
vehicleType
required
string

Type of the vehicle. Car, Motorcycle, etc.

manufacturer
required
string

Manufacturer of the vehicle

model
required
string

Model of the vehicle

year
required
integer

Year of the vehicle release

Responses