openapi: 3.0.0 info: title: Open Trip Model version: v5.4 description: > ## Why OTM? In this day and age more and more information about logistics and traffic is shared over the Internet between various parties. To make this communication easier the _Open Trip Model_ specification was created. It is a lightweight data model used to exchange real-time logistic trip data on the web, and to make it easier for shippers, carriers, software vendors, OEMs, and truck manufacturers to create new multi-brand applications and services. To learn more about the what, the why and the how see the **[developer portal](https://otm5developerportal.redoc.ly/)**. ## Changelog Found any bugs on this page? Or have any feature requests for OTM? Create a new ticket on the [OTM5 change requests Github page](https://github.com/opentripmodel/otm5-change-requests) **Version 5.4 candidate (expected release 2022-05)** Note: a new version candidate makes no promises on what will actually be in that release. It is very _likely_ though that everything comes in unless oversights are found. The changes will be added to the API definition below once made official. * _2022-05-02_: Add a `TransportEquipmentConstraint`. [See 46](https://github.com/opentripmodel/otm5-change-requests/issues/46). * _2022-05-02_: Add `averageFuelConsumption` to vehicle. [See 48](https://github.com/opentripmodel/otm5-change-requests/issues/48). * _2022-05-02_: Add fuel consumption and emission events. [See 49](https://github.com/opentripmodel/otm5-change-requests/issues/49). * _2022-05-02_: Add `contextEvents` on entities. [See 49](https://github.com/opentripmodel/otm5-change-requests/issues/49). * _2022-05-02_: Add `sequenceNr` to all action types. [See 50](https://github.com/opentripmodel/otm5-change-requests/issues/50). * _2022-05-02_: Add `cancelled` on action results and `receiverAbsent` as 'reason' type. [See 53](https://github.com/opentripmodel/otm5-change-requests/issues/53). * _2022-05-02_: Add `actors` to all event types. [See 55](https://github.com/opentripmodel/otm5-change-requests/issues/55). * _2022-05-02_: Add `description` to all constraint types. [See 56](https://github.com/opentripmodel/otm5-change-requests/issues/56). **Version 5.3 (released on 2021-12-16)** * _2021-09-23_: Support 204 (No Content) for delete requests. [See 23](https://github.com/opentripmodel/otm5-change-requests/issues/23). * _2021-09-23_: Add classification lines to goods. [See 26](https://github.com/opentripmodel/otm5-change-requests/issues/26). * _2021-09-23_: Add a result to actions. [See 30](https://github.com/opentripmodel/otm5-change-requests/issues/30). * _2021-09-23_: Extend ADR with points and transport category. [See 31](https://github.com/opentripmodel/otm5-change-requests/issues/31). * _2021-12-16_: Support `relatedConsignments` in consignments. [See 32](https://github.com/opentripmodel/otm5-change-requests/issues/32). * _2021-12-16_: Support UNCode and GLN in locations. [See 36](https://github.com/opentripmodel/otm5-change-requests/issues/36). * _2021-12-16_: Support `temperatureConstraint` as a possible constraint type. [See 37](https://github.com/opentripmodel/otm5-change-requests/issues/37). * _2021-12-16_: Add some references to existing code lists. [See 27](https://github.com/opentripmodel/otm5-change-requests/issues/27). - Using ISO country codes in the country field in addresses. - Using ISO currency codes in 'value-with-unit' fields. - Using the metric system as recommend and default system for dealing with mass, velocity, weight and sizes. - Using the package material codes from the GS1 standard. **Version 5.2 (released on 2021-09-09)** * _2021-08-17_: Add `transportEquipmentSubType` for example to indicate what type of pallets you use. [See 19](https://github.com/opentripmodel/otm5-change-requests/issues/19). * _2021-08-17_: Add `timeWindowConstraint` to replace `startDateTimeConstraint` and `endDateTimeConstraint`. [See 6](https://github.com/opentripmodel/otm5-change-requests/issues/6). * _2021-07-27_: Add `operationalBase` as a location type. [See 22](https://github.com/opentripmodel/otm5-change-requests/issues/22). * _2021-07-27_: Add more actor role types. [See 20](https://github.com/opentripmodel/otm5-change-requests/issues/20). * _2021-07-27_: Add new break and wait actions. [See 17](https://github.com/opentripmodel/otm5-change-requests/issues/17). * _2021-07-27_: Allow for server side UUID generation. [See 16](https://github.com/opentripmodel/otm5-change-requests/issues/16). **Version 5.1 (released on 2021-06-01)** * _2021-05-31_: Add an optional `emission` to Vehicle. [See 13](https://github.com/opentripmodel/otm5-change-requests/issues/13). * _2021-05-31_: Add an optional `transportMode` to Trip and Move. [See 12](https://github.com/opentripmodel/otm5-change-requests/issues/12). * _2021-05-31_: Add optional `grossWeight` to Goods. [See 11](https://github.com/opentripmodel/otm5-change-requests/issues/11). * _2021-05-31_: Add`mobilePhone` as contact detail option. [See 5](https://github.com/opentripmodel/otm5-change-requests/issues/5). * _2021-05-31_: Add an optional `lastModified` field to each entity. [See 2](https://github.com/opentripmodel/otm5-change-requests/issues/2). * _2021-05-25_: Add an optional language to contact details. [See 9](https://github.com/opentripmodel/otm5-change-requests/issues/9). * _2021-05-25_: Add a new entity Document to deal with information about files that can be shared. [See 7](https://github.com/opentripmodel/otm5-change-requests/issues/7). * _2021-05-25_: Add new statuses to Trip and Consignment. [See 4](https://github.com/opentripmodel/otm5-change-requests/issues/4). * _2021-02-02_: Add an optional sensors association to vehicle. [See 2](https://github.com/opentripmodel/otm5-change-requests/issues/2). **Version 5.0 (only documentation changes)** * _2021-01-15_: Add documentation about validation endpoints. * _2021-01-15_: Add reference to the otm5-change-requests github. * _2020-12-03_: Fix the broken checkbox for actions when choosing the `Stop` action. * _2020-12-03_: Document the license plate on a `TransportEquipment` (i.e. a trailer). paths: /api/v5/actors: put: responses: "200": description: The same entity content: application/json: schema: example: id: 00031877-2307-3103-000f-9794dd120862 name: Logistics manager contactDetails: - value: Simon Isaac remark: Wants to be called 'Sim'. type: firstName - value: Macan type: lastName - value: +31 33 1234567 remark: Don't call after 13:00. type: phone - value: simon@macan.com type: email - value: NL74BANK5890469479 type: iban - value: NL000099998B57 type: vatCode type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" contactDetails: description: Contact details for this `Actor`. type: array items: oneOf: - $ref: "#/components/schemas/phone" - $ref: "#/components/schemas/mobilePhone" - $ref: "#/components/schemas/email" - $ref: "#/components/schemas/firstName" - $ref: "#/components/schemas/middleName" - $ref: "#/components/schemas/lastName" - $ref: "#/components/schemas/name" - $ref: "#/components/schemas/vatCode" - $ref: "#/components/schemas/gln" - $ref: "#/components/schemas/iban" - $ref: "#/components/schemas/other" discriminator: propertyName: type mapping: phone: "#/components/schemas/phone" mobilePhone: "#/components/schemas/mobilePhone" email: "#/components/schemas/email" firstName: "#/components/schemas/firstName" middleName: "#/components/schemas/middleName" lastName: "#/components/schemas/lastName" name: "#/components/schemas/name" vatCode: "#/components/schemas/vatCode" gln: "#/components/schemas/gln" iban: "#/components/schemas/iban" other: "#/components/schemas/other" locations: description: Locations for this `Actor`. type: array items: oneOf: - $ref: "#/components/schemas/associated-locations-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-locations-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Actor requestBody: content: application/json: schema: example: id: 00031877-2307-3103-000f-9794dd120862 name: Logistics manager contactDetails: - value: Simon Isaac remark: Wants to be called 'Sim'. type: firstName - value: Macan type: lastName - value: +31 33 1234567 remark: Don't call after 13:00. type: phone - value: simon@macan.com type: email - value: NL74BANK5890469479 type: iban - value: NL000099998B57 type: vatCode type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" contactDetails: description: Contact details for this `Actor`. type: array items: oneOf: - $ref: "#/components/schemas/phone" - $ref: "#/components/schemas/mobilePhone" - $ref: "#/components/schemas/email" - $ref: "#/components/schemas/firstName" - $ref: "#/components/schemas/middleName" - $ref: "#/components/schemas/lastName" - $ref: "#/components/schemas/name" - $ref: "#/components/schemas/vatCode" - $ref: "#/components/schemas/gln" - $ref: "#/components/schemas/iban" - $ref: "#/components/schemas/other" discriminator: propertyName: type mapping: phone: "#/components/schemas/phone" mobilePhone: "#/components/schemas/mobilePhone" email: "#/components/schemas/email" firstName: "#/components/schemas/firstName" middleName: "#/components/schemas/middleName" lastName: "#/components/schemas/lastName" name: "#/components/schemas/name" vatCode: "#/components/schemas/vatCode" gln: "#/components/schemas/gln" iban: "#/components/schemas/iban" other: "#/components/schemas/other" locations: description: Locations for this `Actor`. type: array items: oneOf: - $ref: "#/components/schemas/associated-locations-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-locations-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" tags: - Actor security: - BearerToken: [] /api/v5/actors/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: 00031877-2307-3103-000f-9794dd120862 name: Logistics manager contactDetails: - value: Simon Isaac remark: Wants to be called 'Sim'. type: firstName - value: Macan type: lastName - value: +31 33 1234567 remark: Don't call after 13:00. type: phone - value: simon@macan.com type: email - value: NL74BANK5890469479 type: iban - value: NL000099998B57 type: vatCode type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" contactDetails: description: Contact details for this `Actor`. type: array items: oneOf: - $ref: "#/components/schemas/phone" - $ref: "#/components/schemas/mobilePhone" - $ref: "#/components/schemas/email" - $ref: "#/components/schemas/firstName" - $ref: "#/components/schemas/middleName" - $ref: "#/components/schemas/lastName" - $ref: "#/components/schemas/name" - $ref: "#/components/schemas/vatCode" - $ref: "#/components/schemas/gln" - $ref: "#/components/schemas/iban" - $ref: "#/components/schemas/other" discriminator: propertyName: type mapping: phone: "#/components/schemas/phone" mobilePhone: "#/components/schemas/mobilePhone" email: "#/components/schemas/email" firstName: "#/components/schemas/firstName" middleName: "#/components/schemas/middleName" lastName: "#/components/schemas/lastName" name: "#/components/schemas/name" vatCode: "#/components/schemas/vatCode" gln: "#/components/schemas/gln" iban: "#/components/schemas/iban" other: "#/components/schemas/other" locations: description: Locations for this `Actor`. type: array items: oneOf: - $ref: "#/components/schemas/associated-locations-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-locations-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Actor by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Actor required: true tags: - Actor security: - BearerToken: [] delete: responses: "204": description: Deleted actor with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Actor parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Actor required: true tags: - Actor security: - BearerToken: [] /api/v5/constraints: put: responses: "200": description: The same entity content: application/json: schema: example: id: 89a7bb4d-8720-4db9-aef7-4c3309186c3e name: Time window constraints value: and: - startTime: 2021-06-23T10:00:00Z endTime: 2021-06-23T13:00:00Z description: alert-threshold type: timeWindowConstraint - constraintType: maximum maximum: value: 5 unit: C type: temperatureConstraint type: andConstraint type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" value: $ref: "#/components/schemas/constraintValue" required: - value "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Constraint requestBody: content: application/json: schema: example: id: 89a7bb4d-8720-4db9-aef7-4c3309186c3e name: Time window constraints value: and: - startTime: 2021-06-23T10:00:00Z endTime: 2021-06-23T13:00:00Z description: alert-threshold type: timeWindowConstraint - constraintType: maximum maximum: value: 5 unit: C type: temperatureConstraint type: andConstraint type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" value: $ref: "#/components/schemas/constraintValue" required: - value tags: - Constraint security: - BearerToken: [] /api/v5/constraints/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: 89a7bb4d-8720-4db9-aef7-4c3309186c3e name: Time window constraints value: and: - startTime: 2021-06-23T10:00:00Z endTime: 2021-06-23T13:00:00Z description: alert-threshold type: timeWindowConstraint - constraintType: maximum maximum: value: 5 unit: C type: temperatureConstraint type: andConstraint type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" value: $ref: "#/components/schemas/constraintValue" required: - value "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Constraint by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Constraint required: true tags: - Constraint security: - BearerToken: [] delete: responses: "204": description: Deleted constraint with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Constraint parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Constraint required: true tags: - Constraint security: - BearerToken: [] /api/v5/locations: put: responses: "200": description: The same entity content: application/json: schema: example: id: 00000014-69a6-9702-0000-0021dca4629b name: Main warehouse geoReference: lat: 5.4126792 lon: 52.1956251 type: latLonPointGeoReference type: warehouse administrativeReference: name: Main entrance of the warehouse street: Valutaboulevard houseNumber: "16" houseNumberAddition: C postalCode: 1825BT city: Amersfoort country: NL remark: The cafe around the corner has the best coffee in town. type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" geoReference: description: Describes a geographic reference, this is the primary way to link a `Location` entity to a physical, geographic location. oneOf: - $ref: "#/components/schemas/latLonPointGeoReference" - $ref: "#/components/schemas/latLonArrayGeoReference" - $ref: "#/components/schemas/Feature" - $ref: "#/components/schemas/openLRGeoReference" - $ref: "#/components/schemas/tmcLocationGeoReference" - $ref: "#/components/schemas/tmcArrayGeoReference" - $ref: "#/components/schemas/addressGeoReference" discriminator: propertyName: type mapping: latLonPointGeoReference: "#/components/schemas/latLonPointGeoReference" latLonArrayGeoReference: "#/components/schemas/latLonArrayGeoReference" Feature: "#/components/schemas/Feature" openLRGeoReference: "#/components/schemas/openLRGeoReference" tmcLocationGeoReference: "#/components/schemas/tmcLocationGeoReference" tmcArrayGeoReference: "#/components/schemas/tmcArrayGeoReference" addressGeoReference: "#/components/schemas/addressGeoReference" unCode: description: >- the United Nations Code for Trade and Transport Locations, is a geographic coding scheme developed and maintained by United Nations Economic Commission for Europe (UNECE) to uniquely identify locations. See [this Wikipedia page](https://en.wikipedia.org/wiki/UN/LOCODE). type: string gln: description: >- The Global Location Number (GLN) is part of the GS1 systems of standards to uniquely identify a location. See also this [Wikipedia page](https://en.wikipedia.org/wiki/Global_Location_Number) type: string type: description: The type of location. type: string enum: - warehouse - store - environmentalZone - restrictedArea - customer - operationalBase administrativeReference: description: "Address information that is used as an administrative reference. For example: when the actual load location is different from the officially registered location, this holds the latter" allOf: - $ref: "#/components/schemas/Address" contactDetails: description: Contact details for this `Location`. type: array items: oneOf: - $ref: "#/components/schemas/phone" - $ref: "#/components/schemas/mobilePhone" - $ref: "#/components/schemas/email" - $ref: "#/components/schemas/firstName" - $ref: "#/components/schemas/middleName" - $ref: "#/components/schemas/lastName" - $ref: "#/components/schemas/name" - $ref: "#/components/schemas/vatCode" - $ref: "#/components/schemas/gln" - $ref: "#/components/schemas/iban" - $ref: "#/components/schemas/other" discriminator: propertyName: type mapping: phone: "#/components/schemas/phone" mobilePhone: "#/components/schemas/mobilePhone" email: "#/components/schemas/email" firstName: "#/components/schemas/firstName" middleName: "#/components/schemas/middleName" lastName: "#/components/schemas/lastName" name: "#/components/schemas/name" vatCode: "#/components/schemas/vatCode" gln: "#/components/schemas/gln" iban: "#/components/schemas/iban" other: "#/components/schemas/other" remark: description: Remark about the location. Please don't misuse this field for external references, use the `externalAttributes` field instead. type: string actors: description: Locations can be associated with actors in multiple ways, though the most common one is the _owner_ of the location, either a person or a legal entity. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: Multiple actions can be associated with a location, such as a Last-Mile guidance that should be followed to reach that location. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: >- In the context of a `Location`, access to the location is only allowed if the given constraint applies. > **ℹ Note** that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. oneOf: - $ref: "#/components/schemas/location-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/location-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" required: - geoReference "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Location requestBody: content: application/json: schema: example: id: 00000014-69a6-9702-0000-0021dca4629b name: Main warehouse geoReference: lat: 5.4126792 lon: 52.1956251 type: latLonPointGeoReference type: warehouse administrativeReference: name: Main entrance of the warehouse street: Valutaboulevard houseNumber: "16" houseNumberAddition: C postalCode: 1825BT city: Amersfoort country: NL remark: The cafe around the corner has the best coffee in town. type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" geoReference: description: Describes a geographic reference, this is the primary way to link a `Location` entity to a physical, geographic location. oneOf: - $ref: "#/components/schemas/latLonPointGeoReference" - $ref: "#/components/schemas/latLonArrayGeoReference" - $ref: "#/components/schemas/Feature" - $ref: "#/components/schemas/openLRGeoReference" - $ref: "#/components/schemas/tmcLocationGeoReference" - $ref: "#/components/schemas/tmcArrayGeoReference" - $ref: "#/components/schemas/addressGeoReference" discriminator: propertyName: type mapping: latLonPointGeoReference: "#/components/schemas/latLonPointGeoReference" latLonArrayGeoReference: "#/components/schemas/latLonArrayGeoReference" Feature: "#/components/schemas/Feature" openLRGeoReference: "#/components/schemas/openLRGeoReference" tmcLocationGeoReference: "#/components/schemas/tmcLocationGeoReference" tmcArrayGeoReference: "#/components/schemas/tmcArrayGeoReference" addressGeoReference: "#/components/schemas/addressGeoReference" unCode: description: >- the United Nations Code for Trade and Transport Locations, is a geographic coding scheme developed and maintained by United Nations Economic Commission for Europe (UNECE) to uniquely identify locations. See [this Wikipedia page](https://en.wikipedia.org/wiki/UN/LOCODE). type: string gln: description: >- The Global Location Number (GLN) is part of the GS1 systems of standards to uniquely identify a location. See also this [Wikipedia page](https://en.wikipedia.org/wiki/Global_Location_Number) type: string type: description: The type of location. type: string enum: - warehouse - store - environmentalZone - restrictedArea - customer - operationalBase administrativeReference: description: "Address information that is used as an administrative reference. For example: when the actual load location is different from the officially registered location, this holds the latter" allOf: - $ref: "#/components/schemas/Address" contactDetails: description: Contact details for this `Location`. type: array items: oneOf: - $ref: "#/components/schemas/phone" - $ref: "#/components/schemas/mobilePhone" - $ref: "#/components/schemas/email" - $ref: "#/components/schemas/firstName" - $ref: "#/components/schemas/middleName" - $ref: "#/components/schemas/lastName" - $ref: "#/components/schemas/name" - $ref: "#/components/schemas/vatCode" - $ref: "#/components/schemas/gln" - $ref: "#/components/schemas/iban" - $ref: "#/components/schemas/other" discriminator: propertyName: type mapping: phone: "#/components/schemas/phone" mobilePhone: "#/components/schemas/mobilePhone" email: "#/components/schemas/email" firstName: "#/components/schemas/firstName" middleName: "#/components/schemas/middleName" lastName: "#/components/schemas/lastName" name: "#/components/schemas/name" vatCode: "#/components/schemas/vatCode" gln: "#/components/schemas/gln" iban: "#/components/schemas/iban" other: "#/components/schemas/other" remark: description: Remark about the location. Please don't misuse this field for external references, use the `externalAttributes` field instead. type: string actors: description: Locations can be associated with actors in multiple ways, though the most common one is the _owner_ of the location, either a person or a legal entity. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: Multiple actions can be associated with a location, such as a Last-Mile guidance that should be followed to reach that location. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: >- In the context of a `Location`, access to the location is only allowed if the given constraint applies. > **ℹ Note** that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. oneOf: - $ref: "#/components/schemas/location-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/location-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" required: - geoReference tags: - Location security: - BearerToken: [] /api/v5/locations/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: 00000014-69a6-9702-0000-0021dca4629b name: Main warehouse geoReference: lat: 5.4126792 lon: 52.1956251 type: latLonPointGeoReference type: warehouse administrativeReference: name: Main entrance of the warehouse street: Valutaboulevard houseNumber: "16" houseNumberAddition: C postalCode: 1825BT city: Amersfoort country: NL remark: The cafe around the corner has the best coffee in town. type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" geoReference: description: Describes a geographic reference, this is the primary way to link a `Location` entity to a physical, geographic location. oneOf: - $ref: "#/components/schemas/latLonPointGeoReference" - $ref: "#/components/schemas/latLonArrayGeoReference" - $ref: "#/components/schemas/Feature" - $ref: "#/components/schemas/openLRGeoReference" - $ref: "#/components/schemas/tmcLocationGeoReference" - $ref: "#/components/schemas/tmcArrayGeoReference" - $ref: "#/components/schemas/addressGeoReference" discriminator: propertyName: type mapping: latLonPointGeoReference: "#/components/schemas/latLonPointGeoReference" latLonArrayGeoReference: "#/components/schemas/latLonArrayGeoReference" Feature: "#/components/schemas/Feature" openLRGeoReference: "#/components/schemas/openLRGeoReference" tmcLocationGeoReference: "#/components/schemas/tmcLocationGeoReference" tmcArrayGeoReference: "#/components/schemas/tmcArrayGeoReference" addressGeoReference: "#/components/schemas/addressGeoReference" unCode: description: >- the United Nations Code for Trade and Transport Locations, is a geographic coding scheme developed and maintained by United Nations Economic Commission for Europe (UNECE) to uniquely identify locations. See [this Wikipedia page](https://en.wikipedia.org/wiki/UN/LOCODE). type: string gln: description: >- The Global Location Number (GLN) is part of the GS1 systems of standards to uniquely identify a location. See also this [Wikipedia page](https://en.wikipedia.org/wiki/Global_Location_Number) type: string type: description: The type of location. type: string enum: - warehouse - store - environmentalZone - restrictedArea - customer - operationalBase administrativeReference: description: "Address information that is used as an administrative reference. For example: when the actual load location is different from the officially registered location, this holds the latter" allOf: - $ref: "#/components/schemas/Address" contactDetails: description: Contact details for this `Location`. type: array items: oneOf: - $ref: "#/components/schemas/phone" - $ref: "#/components/schemas/mobilePhone" - $ref: "#/components/schemas/email" - $ref: "#/components/schemas/firstName" - $ref: "#/components/schemas/middleName" - $ref: "#/components/schemas/lastName" - $ref: "#/components/schemas/name" - $ref: "#/components/schemas/vatCode" - $ref: "#/components/schemas/gln" - $ref: "#/components/schemas/iban" - $ref: "#/components/schemas/other" discriminator: propertyName: type mapping: phone: "#/components/schemas/phone" mobilePhone: "#/components/schemas/mobilePhone" email: "#/components/schemas/email" firstName: "#/components/schemas/firstName" middleName: "#/components/schemas/middleName" lastName: "#/components/schemas/lastName" name: "#/components/schemas/name" vatCode: "#/components/schemas/vatCode" gln: "#/components/schemas/gln" iban: "#/components/schemas/iban" other: "#/components/schemas/other" remark: description: Remark about the location. Please don't misuse this field for external references, use the `externalAttributes` field instead. type: string actors: description: Locations can be associated with actors in multiple ways, though the most common one is the _owner_ of the location, either a person or a legal entity. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: Multiple actions can be associated with a location, such as a Last-Mile guidance that should be followed to reach that location. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: >- In the context of a `Location`, access to the location is only allowed if the given constraint applies. > **ℹ Note** that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. oneOf: - $ref: "#/components/schemas/location-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/location-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" required: - geoReference "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Location by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Location required: true tags: - Location security: - BearerToken: [] delete: responses: "204": description: Deleted location with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Location parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Location required: true tags: - Location security: - BearerToken: [] /api/v5/routes: put: responses: "200": description: The same entity content: application/json: schema: example: name: An example route using coordinates to indicate how to drive. geoReferences: geometry: coordinates: - - 1 - 0 - - 5 - 0 - - 5 - 3 - - 13 - 3 - - 13 - 7 type: LineString type: Feature type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" geoReferences: description: Geographic representation of this route. oneOf: - $ref: "#/components/schemas/latLonPointGeoReference" - $ref: "#/components/schemas/latLonArrayGeoReference" - $ref: "#/components/schemas/Feature" - $ref: "#/components/schemas/openLRGeoReference" - $ref: "#/components/schemas/tmcLocationGeoReference" - $ref: "#/components/schemas/tmcArrayGeoReference" - $ref: "#/components/schemas/addressGeoReference" discriminator: propertyName: type mapping: latLonPointGeoReference: "#/components/schemas/latLonPointGeoReference" latLonArrayGeoReference: "#/components/schemas/latLonArrayGeoReference" Feature: "#/components/schemas/Feature" openLRGeoReference: "#/components/schemas/openLRGeoReference" tmcLocationGeoReference: "#/components/schemas/tmcLocationGeoReference" tmcArrayGeoReference: "#/components/schemas/tmcArrayGeoReference" addressGeoReference: "#/components/schemas/addressGeoReference" actors: description: Actors associated with this route, for instance the Company that requires this route as a Last-Mile guidance. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: All the actions that need to be executed on this route. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints of using this route, for instance it might only be used by vehicles with below a certain weight. oneOf: - $ref: "#/components/schemas/route-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/route-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" required: - geoReferences "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Route requestBody: content: application/json: schema: example: name: An example route using coordinates to indicate how to drive. geoReferences: geometry: coordinates: - - 1 - 0 - - 5 - 0 - - 5 - 3 - - 13 - 3 - - 13 - 7 type: LineString type: Feature type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" geoReferences: description: Geographic representation of this route. oneOf: - $ref: "#/components/schemas/latLonPointGeoReference" - $ref: "#/components/schemas/latLonArrayGeoReference" - $ref: "#/components/schemas/Feature" - $ref: "#/components/schemas/openLRGeoReference" - $ref: "#/components/schemas/tmcLocationGeoReference" - $ref: "#/components/schemas/tmcArrayGeoReference" - $ref: "#/components/schemas/addressGeoReference" discriminator: propertyName: type mapping: latLonPointGeoReference: "#/components/schemas/latLonPointGeoReference" latLonArrayGeoReference: "#/components/schemas/latLonArrayGeoReference" Feature: "#/components/schemas/Feature" openLRGeoReference: "#/components/schemas/openLRGeoReference" tmcLocationGeoReference: "#/components/schemas/tmcLocationGeoReference" tmcArrayGeoReference: "#/components/schemas/tmcArrayGeoReference" addressGeoReference: "#/components/schemas/addressGeoReference" actors: description: Actors associated with this route, for instance the Company that requires this route as a Last-Mile guidance. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: All the actions that need to be executed on this route. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints of using this route, for instance it might only be used by vehicles with below a certain weight. oneOf: - $ref: "#/components/schemas/route-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/route-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" required: - geoReferences tags: - Route security: - BearerToken: [] /api/v5/routes/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: name: An example route using coordinates to indicate how to drive. geoReferences: geometry: coordinates: - - 1 - 0 - - 5 - 0 - - 5 - 3 - - 13 - 3 - - 13 - 7 type: LineString type: Feature type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" geoReferences: description: Geographic representation of this route. oneOf: - $ref: "#/components/schemas/latLonPointGeoReference" - $ref: "#/components/schemas/latLonArrayGeoReference" - $ref: "#/components/schemas/Feature" - $ref: "#/components/schemas/openLRGeoReference" - $ref: "#/components/schemas/tmcLocationGeoReference" - $ref: "#/components/schemas/tmcArrayGeoReference" - $ref: "#/components/schemas/addressGeoReference" discriminator: propertyName: type mapping: latLonPointGeoReference: "#/components/schemas/latLonPointGeoReference" latLonArrayGeoReference: "#/components/schemas/latLonArrayGeoReference" Feature: "#/components/schemas/Feature" openLRGeoReference: "#/components/schemas/openLRGeoReference" tmcLocationGeoReference: "#/components/schemas/tmcLocationGeoReference" tmcArrayGeoReference: "#/components/schemas/tmcArrayGeoReference" addressGeoReference: "#/components/schemas/addressGeoReference" actors: description: Actors associated with this route, for instance the Company that requires this route as a Last-Mile guidance. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: All the actions that need to be executed on this route. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints of using this route, for instance it might only be used by vehicles with below a certain weight. oneOf: - $ref: "#/components/schemas/route-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/route-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" required: - geoReferences "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Route by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Route required: true tags: - Route security: - BearerToken: [] delete: responses: "204": description: Deleted route with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Route parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Route required: true tags: - Route security: - BearerToken: [] /api/v5/sensors: put: responses: "200": description: The same entity content: application/json: schema: example: id: 3f8913ee-c69f-bc4f-1417-edd9ae2fff3d name: My temperature sensor placement: Trailer main compartment sensorType: temperature type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" placement: description: >- Sometimes more than one sensor can be associated with a single entity. This is the case e.g. in cooled trailers that are divided into compartments with different temperatures, where each compartment has its own sensor. The `placement` member can be used to identify where a sensor is placed. Parties using OpenTripModel to exchange sensor data may wish to agree on a standardized naming, but this is too specific to describe in the standard. type: string sensorType: description: The type of sensor. type: string actors: description: The actors associated with this sensor, for instance the owners, the producers or the users of this sensor. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" constraint: description: > In the context of a `Sensor`, only `sensorValueConstraint`s really make sense. You can use such a constraint to model a sensor of which the measured value must be within certain bounds at all times. > **ℹ Note** that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. oneOf: - $ref: "#/components/schemas/sensor-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/sensor-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Sensor requestBody: content: application/json: schema: example: id: 3f8913ee-c69f-bc4f-1417-edd9ae2fff3d name: My temperature sensor placement: Trailer main compartment sensorType: temperature type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" placement: description: >- Sometimes more than one sensor can be associated with a single entity. This is the case e.g. in cooled trailers that are divided into compartments with different temperatures, where each compartment has its own sensor. The `placement` member can be used to identify where a sensor is placed. Parties using OpenTripModel to exchange sensor data may wish to agree on a standardized naming, but this is too specific to describe in the standard. type: string sensorType: description: The type of sensor. type: string actors: description: The actors associated with this sensor, for instance the owners, the producers or the users of this sensor. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" constraint: description: > In the context of a `Sensor`, only `sensorValueConstraint`s really make sense. You can use such a constraint to model a sensor of which the measured value must be within certain bounds at all times. > **ℹ Note** that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. oneOf: - $ref: "#/components/schemas/sensor-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/sensor-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" tags: - Sensor security: - BearerToken: [] /api/v5/sensors/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: 3f8913ee-c69f-bc4f-1417-edd9ae2fff3d name: My temperature sensor placement: Trailer main compartment sensorType: temperature type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" placement: description: >- Sometimes more than one sensor can be associated with a single entity. This is the case e.g. in cooled trailers that are divided into compartments with different temperatures, where each compartment has its own sensor. The `placement` member can be used to identify where a sensor is placed. Parties using OpenTripModel to exchange sensor data may wish to agree on a standardized naming, but this is too specific to describe in the standard. type: string sensorType: description: The type of sensor. type: string actors: description: The actors associated with this sensor, for instance the owners, the producers or the users of this sensor. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" constraint: description: > In the context of a `Sensor`, only `sensorValueConstraint`s really make sense. You can use such a constraint to model a sensor of which the measured value must be within certain bounds at all times. > **ℹ Note** that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. oneOf: - $ref: "#/components/schemas/sensor-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/sensor-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Sensor by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Sensor required: true tags: - Sensor security: - BearerToken: [] delete: responses: "204": description: Deleted sensor with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Sensor parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Sensor required: true tags: - Sensor security: - BearerToken: [] /api/v5/consignments: put: responses: "200": description: The same entity content: application/json: schema: example: id: 047cfa4d-fd8b-47ba-b8e9-87067294d2fa externalAttributes: id: TEST1312979 information: TESTGR000040487 description: Shipment for mr. X status: requested type: HumanFood goods: - entity: quantity: 1 productType: Game type: items associationType: inline remark: Please step 1.5m away after ringing the door bell actors: - entity: name: Party X associationType: inline - entity: name: Party Y associationType: inline - entity: name: Party Z associationType: inline actions: - entity: location: entity: geoReference: street: valutaboulevard houseNumber: "16" postalCode: 1234AB type: addressGeoReference associationType: inline startTime: 2020-04-03T10:00:00Z actionType: load associationType: inline - entity: location: entity: geoReference: street: Boris Pasternaklaan houseNumber: "22" postalCode: 9999ZZ type: addressGeoReference associationType: inline startTime: 2020-04-03T10:12:00Z actionType: unload associationType: inline constraint: entity: value: and: - startDateTime: 2020-04-03T09:00:00Z type: startDateTimeConstraint - endDateTime: 2020-04-03T12:00:00Z type: endDateTimeConstraint type: andConstraint associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" description: description: General description of consignment in Free text. e.g 20 europallets fruit. type: string status: description: >- Whether this consignment is a draft, requested, confirmed, in transit, completed or cancelled. The values accepted (replaced by confirmed) and modified (replaced the lastModified field on every entity) are deprecated since OTM5.1, but will be supported for the whole OTM5.X line. type: string enum: - draft - requested - confirmed - inTransit - completed - cancelled - accepted - modified type: description: Free text to describe type of consignment e.g. FTL, Full Truck Load, LTL Less than Truck Load, bulk, reverse logistics orders, pick up order, delivery order. type: string goods: description: The various goods that need to be transported, together they are part of this consignment. type: array items: oneOf: - $ref: "#/components/schemas/goods-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/goods-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" documents: description: Documents that are relevant for this consignment. Such as an official agreement between consignee and consignor. type: array items: oneOf: - $ref: "#/components/schemas/documents-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/documents-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" remark: description: >- Remark concerning the complete consignment, to be printed on the transport document. type: string actors: description: The actors associated with this consignment, for instance the shipper and carrier. One should inline the actors only on the top-level entity (such as the transportOrder or trip) type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: General description of actions related to the consignment f.e. loading, unloading, hand over, drop of. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints this consignment has to abide to, such special equipment (tail lift, truck mounted forklift), special vehicle, special instructions related to consignor and consignee. oneOf: - $ref: "#/components/schemas/consignment-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/consignment-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" relatedConsignments: description: >- Consignments that have replaced the current consignment. Because of various reasons a consignment can be cancelled and replaced by one or more other consignments. An example is that the consignment is too large to be transported as a single 'transportable unit'. You can use the `relation` field in the association to indicate the type of relationship. type: array items: oneOf: - $ref: "#/components/schemas/relatedConsignments-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/relatedConsignments-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Consignment requestBody: content: application/json: schema: example: id: 047cfa4d-fd8b-47ba-b8e9-87067294d2fa externalAttributes: id: TEST1312979 information: TESTGR000040487 description: Shipment for mr. X status: requested type: HumanFood goods: - entity: quantity: 1 productType: Game type: items associationType: inline remark: Please step 1.5m away after ringing the door bell actors: - entity: name: Party X associationType: inline - entity: name: Party Y associationType: inline - entity: name: Party Z associationType: inline actions: - entity: location: entity: geoReference: street: valutaboulevard houseNumber: "16" postalCode: 1234AB type: addressGeoReference associationType: inline startTime: 2020-04-03T10:00:00Z actionType: load associationType: inline - entity: location: entity: geoReference: street: Boris Pasternaklaan houseNumber: "22" postalCode: 9999ZZ type: addressGeoReference associationType: inline startTime: 2020-04-03T10:12:00Z actionType: unload associationType: inline constraint: entity: value: and: - startDateTime: 2020-04-03T09:00:00Z type: startDateTimeConstraint - endDateTime: 2020-04-03T12:00:00Z type: endDateTimeConstraint type: andConstraint associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" description: description: General description of consignment in Free text. e.g 20 europallets fruit. type: string status: description: >- Whether this consignment is a draft, requested, confirmed, in transit, completed or cancelled. The values accepted (replaced by confirmed) and modified (replaced the lastModified field on every entity) are deprecated since OTM5.1, but will be supported for the whole OTM5.X line. type: string enum: - draft - requested - confirmed - inTransit - completed - cancelled - accepted - modified type: description: Free text to describe type of consignment e.g. FTL, Full Truck Load, LTL Less than Truck Load, bulk, reverse logistics orders, pick up order, delivery order. type: string goods: description: The various goods that need to be transported, together they are part of this consignment. type: array items: oneOf: - $ref: "#/components/schemas/goods-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/goods-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" documents: description: Documents that are relevant for this consignment. Such as an official agreement between consignee and consignor. type: array items: oneOf: - $ref: "#/components/schemas/documents-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/documents-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" remark: description: |- Remark concerning the complete consignment, to be printed on the transport document. type: string actors: description: The actors associated with this consignment, for instance the shipper and carrier. One should inline the actors only on the top-level entity (such as the transportOrder or trip) type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: General description of actions related to the consignment f.e. loading, unloading, hand over, drop of. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints this consignment has to abide to, such special equipment (tail lift, truck mounted forklift), special vehicle, special instructions related to consignor and consignee. oneOf: - $ref: "#/components/schemas/consignment-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/consignment-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" relatedConsignments: description: >- Consignments that have replaced the current consignment. Because of various reasons a consignment can be cancelled and replaced by one or more other consignments. An example is that the consignment is too large to be transported as a single 'transportable unit'. You can use the `relation` field in the association to indicate the type of relationship. type: array items: oneOf: - $ref: "#/components/schemas/relatedConsignments-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/relatedConsignments-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" tags: - Consignment security: - BearerToken: [] /api/v5/consignments/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: 047cfa4d-fd8b-47ba-b8e9-87067294d2fa externalAttributes: id: TEST1312979 information: TESTGR000040487 description: Shipment for mr. X status: requested type: HumanFood goods: - entity: quantity: 1 productType: Game type: items associationType: inline remark: Please step 1.5m away after ringing the door bell actors: - entity: name: Party X associationType: inline - entity: name: Party Y associationType: inline - entity: name: Party Z associationType: inline actions: - entity: location: entity: geoReference: street: valutaboulevard houseNumber: "16" postalCode: 1234AB type: addressGeoReference associationType: inline startTime: 2020-04-03T10:00:00Z actionType: load associationType: inline - entity: location: entity: geoReference: street: Boris Pasternaklaan houseNumber: "22" postalCode: 9999ZZ type: addressGeoReference associationType: inline startTime: 2020-04-03T10:12:00Z actionType: unload associationType: inline constraint: entity: value: and: - startDateTime: 2020-04-03T09:00:00Z type: startDateTimeConstraint - endDateTime: 2020-04-03T12:00:00Z type: endDateTimeConstraint type: andConstraint associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" description: description: General description of consignment in Free text. e.g 20 europallets fruit. type: string status: description: >- Whether this consignment is a draft, requested, confirmed, in transit, completed or cancelled. The values accepted (replaced by confirmed) and modified (replaced the lastModified field on every entity) are deprecated since OTM5.1, but will be supported for the whole OTM5.X line. type: string enum: - draft - requested - confirmed - inTransit - completed - cancelled - accepted - modified type: description: Free text to describe type of consignment e.g. FTL, Full Truck Load, LTL Less than Truck Load, bulk, reverse logistics orders, pick up order, delivery order. type: string goods: description: The various goods that need to be transported, together they are part of this consignment. type: array items: oneOf: - $ref: "#/components/schemas/goods-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/goods-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" documents: description: Documents that are relevant for this consignment. Such as an official agreement between consignee and consignor. type: array items: oneOf: - $ref: "#/components/schemas/documents-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/documents-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" remark: description: >- Remark concerning the complete consignment, to be printed on the transport document. type: string actors: description: The actors associated with this consignment, for instance the shipper and carrier. One should inline the actors only on the top-level entity (such as the transportOrder or trip) type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: General description of actions related to the consignment f.e. loading, unloading, hand over, drop of. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints this consignment has to abide to, such special equipment (tail lift, truck mounted forklift), special vehicle, special instructions related to consignor and consignee. oneOf: - $ref: "#/components/schemas/consignment-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/consignment-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" relatedConsignments: description: >- Consignments that have replaced the current consignment. Because of various reasons a consignment can be cancelled and replaced by one or more other consignments. An example is that the consignment is too large to be transported as a single 'transportable unit'. You can use the `relation` field in the association to indicate the type of relationship. type: array items: oneOf: - $ref: "#/components/schemas/relatedConsignments-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/relatedConsignments-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Consignment by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Consignment required: true tags: - Consignment security: - BearerToken: [] delete: responses: "204": description: Deleted consignment with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Consignment parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Consignment required: true tags: - Consignment security: - BearerToken: [] /api/v5/goods: put: responses: "200": description: The same entity content: application/json: schema: oneOf: - $ref: "#/components/schemas/items" - $ref: "#/components/schemas/transportEquipment" discriminator: propertyName: type mapping: items: "#/components/schemas/items" transportEquipment: "#/components/schemas/transportEquipment" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Goods requestBody: content: application/json: schema: oneOf: - $ref: "#/components/schemas/items" - $ref: "#/components/schemas/transportEquipment" discriminator: propertyName: type mapping: items: "#/components/schemas/items" transportEquipment: "#/components/schemas/transportEquipment" tags: - Goods security: - BearerToken: [] /api/v5/goods/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: oneOf: - $ref: "#/components/schemas/items" - $ref: "#/components/schemas/transportEquipment" discriminator: propertyName: type mapping: items: "#/components/schemas/items" transportEquipment: "#/components/schemas/transportEquipment" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Goods by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Goods required: true tags: - Goods security: - BearerToken: [] delete: responses: "204": description: Deleted goods with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Goods parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Goods required: true tags: - Goods security: - BearerToken: [] /api/v5/transportOrders: put: responses: "200": description: The same entity content: application/json: schema: example: id: baa507c2-1d81-4092-a5c2-e80820ee4fd1 externalAttributes: id: OrderId description: Transport order containing all consignments to be shipped. consignments: - entity: description: Package for miss X. associationType: inline - entity: description: Package for mr Y. associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" description: description: Actions related to this transport order, for example all loading and unloading actions of the consignments. type: string consignments: description: All consignments belonging to this transport order. type: array items: oneOf: - $ref: "#/components/schemas/consignments-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/consignments-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" actors: description: The actors associated with this transport order, for instance the consignor, consignee. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" constraint: description: Constraints this transport order has to abide to, such as the expected delivery time windows. oneOf: - $ref: "#/components/schemas/transport-order-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/transport-order-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new TransportOrder requestBody: content: application/json: schema: example: id: baa507c2-1d81-4092-a5c2-e80820ee4fd1 externalAttributes: id: OrderId description: Transport order containing all consignments to be shipped. consignments: - entity: description: Package for miss X. associationType: inline - entity: description: Package for mr Y. associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" description: description: Actions related to this transport order, for example all loading and unloading actions of the consignments. type: string consignments: description: All consignments belonging to this transport order. type: array items: oneOf: - $ref: "#/components/schemas/consignments-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/consignments-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" actors: description: The actors associated with this transport order, for instance the consignor, consignee. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" constraint: description: Constraints this transport order has to abide to, such as the expected delivery time windows. oneOf: - $ref: "#/components/schemas/transport-order-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/transport-order-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" tags: - TransportOrder security: - BearerToken: [] /api/v5/transportOrders/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: baa507c2-1d81-4092-a5c2-e80820ee4fd1 externalAttributes: id: OrderId description: Transport order containing all consignments to be shipped. consignments: - entity: description: Package for miss X. associationType: inline - entity: description: Package for mr Y. associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" description: description: Actions related to this transport order, for example all loading and unloading actions of the consignments. type: string consignments: description: All consignments belonging to this transport order. type: array items: oneOf: - $ref: "#/components/schemas/consignments-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/consignments-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" actors: description: The actors associated with this transport order, for instance the consignor, consignee. type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" constraint: description: Constraints this transport order has to abide to, such as the expected delivery time windows. oneOf: - $ref: "#/components/schemas/transport-order-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/transport-order-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific TransportOrder by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this TransportOrder required: true tags: - TransportOrder security: - BearerToken: [] delete: responses: "204": description: Deleted transportOrder with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a TransportOrder parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this TransportOrder required: true tags: - TransportOrder security: - BearerToken: [] /api/v5/trips: put: responses: "200": description: The same entity content: application/json: schema: example: id: 3f8913ee-c69f-bc4f-1417-edd9ae2fff3d name: Daily supply trip vehicle: uuid: cf10200f-5a09-4487-876d-984c79dac8f2 entityType: vehicle associationType: reference actions: - entity: name: Stop at the distribution center sequenceNr: 0 actions: - entity: id: adcd2548-0c2c-4f39-8b4c-317dcbcb9c41 lifecycle: planned consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T10:00:00Z actionType: load associationType: inline - entity: id: adcd2548-0c2c-4f39-8b4c-317dcbcb9c41 lifecycle: realized consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T10:15:00Z actionType: load associationType: inline actionType: stop associationType: inline - entity: name: Stop at the store sequenceNr: 1 actions: - entity: id: 83585e11-d56f-4550-998d-1ef9299295d4 lifecycle: planned consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T11:00:00Z actionType: unload associationType: inline - entity: id: 83585e11-d56f-4550-998d-1ef9299295d4 lifecycle: realized consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T11:15:00Z actionType: unload associationType: inline actionType: stop associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" status: description: >- Whether this trip is a draft, requested, confirmed, in transit, completed or cancelled. The values accepted (replaced by confirmed) and modified (replaced the lastModified field on every entity) are deprecated since OTM5.1, but will be supported for the whole OTM5.X line. type: string enum: - draft - requested - confirmed - inTransit - completed - cancelled - accepted - modified transportMode: description: |- Method of transport used for the carriage of goods on this trip, can either be using a ship (maritime or inland waterway), a truck/car/van/bike/etc. (road), using the train (rail), or using a plane (air). These values are based on the [recommendation of UNECE](https://unece.org/fileadmin/DAM/cefact/recommendations/rec19/rec19_ecetrd138.pdf). type: string enum: - maritime - road - rail - air - inlandWaterway vehicle: description: The `Vehicle` that is driving this trip. oneOf: - $ref: "#/components/schemas/vehicle-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/vehicle-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" actors: description: The actors associated with this trip, for instance the client or the executing party type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: All actions that are/were happening on this trip, such as stopping at certain locations and loading and unloading of consignments. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints this trip has to abide to, such as the start and end date times in which it has to be completed. oneOf: - $ref: "#/components/schemas/trip-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/trip-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Adds a new Trip requestBody: content: application/json: schema: example: id: 3f8913ee-c69f-bc4f-1417-edd9ae2fff3d name: Daily supply trip vehicle: uuid: cf10200f-5a09-4487-876d-984c79dac8f2 entityType: vehicle associationType: reference actions: - entity: name: Stop at the distribution center sequenceNr: 0 actions: - entity: id: adcd2548-0c2c-4f39-8b4c-317dcbcb9c41 lifecycle: planned consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T10:00:00Z actionType: load associationType: inline - entity: id: adcd2548-0c2c-4f39-8b4c-317dcbcb9c41 lifecycle: realized consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T10:15:00Z actionType: load associationType: inline actionType: stop associationType: inline - entity: name: Stop at the store sequenceNr: 1 actions: - entity: id: 83585e11-d56f-4550-998d-1ef9299295d4 lifecycle: planned consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T11:00:00Z actionType: unload associationType: inline - entity: id: 83585e11-d56f-4550-998d-1ef9299295d4 lifecycle: realized consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T11:15:00Z actionType: unload associationType: inline actionType: stop associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" status: description: >- Whether this trip is a draft, requested, confirmed, in transit, completed or cancelled. The values accepted (replaced by confirmed) and modified (replaced the lastModified field on every entity) are deprecated since OTM5.1, but will be supported for the whole OTM5.X line. type: string enum: - draft - requested - confirmed - inTransit - completed - cancelled - accepted - modified transportMode: description: |- Method of transport used for the carriage of goods on this trip, can either be using a ship (maritime or inland waterway), a truck/car/van/bike/etc. (road), using the train (rail), or using a plane (air). These values are based on the [recommendation of UNECE](https://unece.org/fileadmin/DAM/cefact/recommendations/rec19/rec19_ecetrd138.pdf). type: string enum: - maritime - road - rail - air - inlandWaterway vehicle: description: The `Vehicle` that is driving this trip. oneOf: - $ref: "#/components/schemas/vehicle-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/vehicle-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" actors: description: The actors associated with this trip, for instance the client or the executing party type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: All actions that are/were happening on this trip, such as stopping at certain locations and loading and unloading of consignments. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints this trip has to abide to, such as the start and end date times in which it has to be completed. oneOf: - $ref: "#/components/schemas/trip-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/trip-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" tags: - Trip security: - BearerToken: [] /api/v5/trips/{UUID}: get: responses: "200": description: Returned the entity with the provided UUID content: application/json: schema: example: id: 3f8913ee-c69f-bc4f-1417-edd9ae2fff3d name: Daily supply trip vehicle: uuid: cf10200f-5a09-4487-876d-984c79dac8f2 entityType: vehicle associationType: reference actions: - entity: name: Stop at the distribution center sequenceNr: 0 actions: - entity: id: adcd2548-0c2c-4f39-8b4c-317dcbcb9c41 lifecycle: planned consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T10:00:00Z actionType: load associationType: inline - entity: id: adcd2548-0c2c-4f39-8b4c-317dcbcb9c41 lifecycle: realized consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T10:15:00Z actionType: load associationType: inline actionType: stop associationType: inline - entity: name: Stop at the store sequenceNr: 1 actions: - entity: id: 83585e11-d56f-4550-998d-1ef9299295d4 lifecycle: planned consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T11:00:00Z actionType: unload associationType: inline - entity: id: 83585e11-d56f-4550-998d-1ef9299295d4 lifecycle: realized consignment: uuid: 8ee13f36-8a41-4d1b-97b9-eb41eca469b8 entityType: consignment associationType: reference startTime: 2020-07-22T11:15:00Z actionType: unload associationType: inline actionType: stop associationType: inline type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" status: description: >- Whether this trip is a draft, requested, confirmed, in transit, completed or cancelled. The values accepted (replaced by confirmed) and modified (replaced the lastModified field on every entity) are deprecated since OTM5.1, but will be supported for the whole OTM5.X line. type: string enum: - draft - requested - confirmed - inTransit - completed - cancelled - accepted - modified transportMode: description: |- Method of transport used for the carriage of goods on this trip, can either be using a ship (maritime or inland waterway), a truck/car/van/bike/etc. (road), using the train (rail), or using a plane (air). These values are based on the [recommendation of UNECE](https://unece.org/fileadmin/DAM/cefact/recommendations/rec19/rec19_ecetrd138.pdf). type: string enum: - maritime - road - rail - air - inlandWaterway vehicle: description: The `Vehicle` that is driving this trip. oneOf: - $ref: "#/components/schemas/vehicle-association-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/vehicle-association-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" actors: description: The actors associated with this trip, for instance the client or the executing party type: array items: oneOf: - $ref: "#/components/schemas/associated-actors-inline" - $ref: "#/components/schemas/reference-roles" - $ref: "#/components/schemas/attributeRestriction-roles" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/associated-actors-inline" reference: "#/components/schemas/reference-roles" attributeRestriction: "#/components/schemas/attributeRestriction-roles" actions: description: All actions that are/were happening on this trip, such as stopping at certain locations and loading and unloading of consignments. type: array items: $ref: "#/components/schemas/associations-actions" constraint: description: Constraints this trip has to abide to, such as the start and end date times in which it has to be completed. oneOf: - $ref: "#/components/schemas/trip-constraint-inline" - $ref: "#/components/schemas/reference" - $ref: "#/components/schemas/attributeRestriction" discriminator: propertyName: associationType mapping: inline: "#/components/schemas/trip-constraint-inline" reference: "#/components/schemas/reference" attributeRestriction: "#/components/schemas/attributeRestriction" "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "404": description: "" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Get a specific Trip by its UUID parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Trip required: true tags: - Trip security: - BearerToken: [] delete: responses: "204": description: Deleted trip with the provided UUID "400": description: "" content: application/json: schema: type: array items: oneOf: - $ref: "#/components/schemas/invalidJson" - $ref: "#/components/schemas/invalidField" - $ref: "#/components/schemas/missingField" discriminator: propertyName: type mapping: invalidJson: "#/components/schemas/invalidJson" invalidField: "#/components/schemas/invalidField" missingField: "#/components/schemas/missingField" "401": description: "" content: application/json: schema: type: object properties: message: type: string required: - message "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/endpoints.Errors" summary: Deletes a Trip parameters: - name: UUID in: path schema: type: string format: uuid description: The unique ID of this Trip required: true tags: - Trip security: - BearerToken: [] /api/v5/vehicles: put: responses: "200": description: The same entity content: application/json: schema: example: id: 0000704f-b6d0-e702-5c33-003ee53ec29b name: Bob's Boxtruck vehicleType: boxtruck fuel: battery length: value: 8 unit: m height: value: 2.8 unit: m width: value: 2 unit: m licensePlate: AB-12-CD emptyWeight: value: 2000 unit: kg type: object properties: id: description: >- Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server. type: string name: description: Name of the entity. For display purposes and search only. type: string externalAttributes: description: > External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The `externalAttributes` member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system. > Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended. type: object properties: {} additionalProperties: oneOf: - type: string - type: array items: type: string creationDate: description: The creation date of this entity. type: string lastModified: description: The last modified date of this entity. If none is given the creation date is used instead. type: string contextEvents: description: >- The context events provides some optional information about the events that can provide additional information on the current state of this entity. For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context. type: array items: $ref: "#/components/schemas/events" vehicleType: description: The type of vehicle type: string fuel: description: The type of fuel the vehicle runs on. For vehicle without an engine of their own, such as a trailer, you may choose `not-applicable`. For trailers with cooling capabilities, choose the fuel type of the cooling engine. type: string averageFuelConsumption: description: The average fuel consumption for this vehicle. Usually measured in distance per 100l type: object properties: value: description: Value in the given unit. type: number format: double unit: description: |- Measurement unit of this value. OTM5 currently does not enforce any units of measure. So you are free to use any unit necessary. However to ensure parties use OTM5 consistently there are a few rules: * For **currencies** use the [ISO_4217 standard](https://en.wikipedia.org/wiki/ISO_4217) * For **mass**, **volume** and **length** the [SI system (International System of Units)](https://en.wikipedia.org/wiki/International_System_of_Units) is recommended. To avoid problems with symbols, square and cubic units of measure are simply communicated using the proper number. Thus a square meter is `m2` and a cubic meter is `m3`. * For degrees the recommend approach is Celsius, but Fahrenheit and Kelvin are also supported. To again avoid problems with symbols, the degree symbol (° in °C) is left off, thus only the single capital letter remains (C, F, or K). * For velocity use the metric system. The required format would then be /