The OTM Couple API provides REST endpoints to couple vehicles to trips
Couple a vehicle from a carrier to a trip by providing an AssociationCreatedEvent. The AssociationCreatedEvent contains two entities: entity1(Trip) and entity2(Vehicle). These two entities are order-insensitive.
The vehicle-entity should contain the devicedetails and should be either a combination of externalSystemId
and externalDeviceId
or a combination of externalSystemId
and licensePlate
.
The requestbody which is formatted as a valid OTM AssociationCreatedEvent with a Trip and Vehicle entity
The post message was succesfully processed. Either the vehicle was coupled to the trip or the coupling already exists
The request was invalid or cannot be otherwise served. Possible causes are invalid JSON objects or missing required parameters. An accompanying error message will explain further.
Authentication credentials were missing or incorrect.
The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why.
The URI requested is invalid or the resource requested does not exists. Also returned when the requested format is not supported by the requested method.
An unexpected server error has occurred, which needs further investigation. Please contact support.
{- "eventType": "AssociationCreated",
- "entity1": {
- "entityType": "trip",
- "associationType": "attributeRestriction",
- "restriction": {
- "externalAttributes": {
- "tripId": "9876",
- "shipperCode": "12"
}
}
}, - "entity2": {
- "entityType": "vehicle",
- "associationType": "attributeRestriction",
- "restriction": {
- "externalAttributes": {
- "externalSystemId": "xsystem-118001-55",
- "externalDeviceId": "9da8dc23-c91d-4b9c-90ae-74d8648fb099",
- "licensePlate": "ab-cd-12"
}
}
}
}