diff --git a/MP modules/TOMP-API-NOTIFY.yaml b/MP modules/TOMP-API-NOTIFY.yaml index ceaffaa..6008671 100644 --- a/MP modules/TOMP-API-NOTIFY.yaml +++ b/MP modules/TOMP-API-NOTIFY.yaml @@ -209,30 +209,7 @@ components: $ref: "../TOMP-API-1-CORE.yaml#/components/schemas/packageReference" assetInfo: - type: object - properties: - location: - $ref: "../TOMP-API-1-CORE.yaml#/components/schemas/placeReference" - assetState: - type: string - description: in case the fare is dependent on being in use or being paused, this field must be used. Default IN_USE - enum: [IN_USE, PAUSED] - default: IN_USE - distance: - $ref: "../TOMP-API-1-CORE.yaml#/components/schemas/float" - description: the travelled distance, in km. Only if applicable. - distanceUnits: - type: string - enum: [KM, MILE] - duration: - $ref: "../TOMP-API-1-CORE.yaml#/components/schemas/normalInt" - description: the time in seconds that the assed is used OR to reach the pickup location (ETA). Only if applicable. - currentCharge: - type: integer - minimum: 0 - maximum: 100 - description: percentage of charge available - + $ref: "../TOMP-API-1-CORE.yaml#/components/schemas/assetInfo" links: $ref: "../TOMP-API-1-CORE.yaml#/components/schemas/links" message: diff --git a/TOMP-API-1-CORE.yaml b/TOMP-API-1-CORE.yaml index 98d623b..9457336 100644 --- a/TOMP-API-1-CORE.yaml +++ b/TOMP-API-1-CORE.yaml @@ -704,6 +704,37 @@ components: fee: $ref: "#/components/schemas/fareStructure" + assetInfo: + x-semantics: + - transmodel: VEHICLE, PARKING BAY, CYCLE STORAGE EQUIPMENT, VEHICLE CHARGING, EQUIPMENT + type: object + description: asset status information + properties: + id: + $ref: "#/components/schemas/assetReference" + description: Identifier of an asset. Can be an external reference, but also a (internal) ID + location: + $ref: "#/components/schemas/placeReference" + assetState: + type: string + description: in case the fare is dependent on being in use or being paused, this field must be used. Default IN_USE + enum: [IN_USE, PAUSED] + default: IN_USE + distance: + $ref: "#/components/schemas/float" + description: the travelled distance, in km. Only if applicable. + distanceUnits: + type: string + enum: [KM, MILE] + duration: + $ref: "#/components/schemas/normalInt" + description: the time in seconds that the assed is used OR to reach the pickup location (ETA). Only if applicable. + currentCharge: + type: integer + minimum: 0 + maximum: 100 + description: percentage of charge available + cargoLimits: x-semantics: - transmodel: LUGGAGE ALLOWANCE diff --git a/draft modules/TOMP-API-0-INFORMATION.yaml b/draft modules/TOMP-API-0-INFORMATION.yaml index 4738a4b..934d3cf 100644 --- a/draft modules/TOMP-API-0-INFORMATION.yaml +++ b/draft modules/TOMP-API-0-INFORMATION.yaml @@ -133,6 +133,49 @@ paths: default: $ref: "../TOMP-API-1-CORE.yaml#/components/responses/errorResponse" + /collections/asset-info/items: + get: + operationId: getAssetInfo + summary: "Retrieve asset info for assets that are assigned to a leg. Only + legs are included that were created on behalf of the calling party." + parameters: + - $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/acceptLanguage" + - $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/authorization" + - $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/optionalLegId" + - $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/limit" + - $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/offset" + - $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/bbox" + security: + - BearerAuth: [] + - OpenData: [] + tags: + - travel information + responses: + "200": + description: asset info + headers: + Version: + $ref: '../TOMP-API-1-CORE.yaml#/components/headers/version' + Content-Language: + $ref: '../TOMP-API-1-CORE.yaml#/components/headers/contentLanguage' + Digest: + $ref: '../TOMP-API-1-CORE.yaml#/components/headers/digest' + PublicKey: + $ref: '../TOMP-API-1-CORE.yaml#/components/headers/publicKey' + SignedDigest: + $ref: '../TOMP-API-1-CORE.yaml#/components/headers/signedDigest' + content: + application/json: + schema: + type: object + properties: + assets: + type: array + items: + $ref: '../TOMP-API-1-CORE.yaml#/components/schemas/assetInfo' + default: + $ref: "../TOMP-API-1-CORE.yaml#/components/responses/errorResponse" + components: responses: userProfilesResponse: