{"openapi":"3.0.4","info":{"title":"ABT – Gesamt-API (Store/CCP + CheckService/Control)","version":"v1","x-revision":"rev3","x-revision-date":"2026-07-08","x-note":"Zusammengefuehrt aus ABT_Store_CCP_API_rev3 und ABT_CheckService_Control_API_rev3 (merge_openapi.py)","x-changelog":["rev1 – Original-Spezifikationen des Auftraggebers (OpenAPI 3.0.4, v1)","rev2 – Zeitfelder harmonisiert (int64, Unix-Sekunden, UTC); MediumIdDto.mediumNumber auf int64 erweitert (mind. 17 Stellen, MediumID gesamt >= 19 Stellen)","rev3 – mediumStatus in der Control-API auf MediumStatus-Enum {5, 7, 19, 88} typisiert; MediumDto dedupliziert. Verbleibende Variante: EntitlementDtoControl (Befund 3 offen)"],"description":"Zusammengefuehrte Spezifikation. Store: API for customer contract partner purposes. Zeitfelder harmonisiert: alle Zeitstempel einheitlich als int64, Unix-Sekunden (UTC). MediumIdDto.mediumNumber auf int64 erweitert (mind. 17 Stellen; MediumID gesamt >= 19 Stellen). // Control: API for control purposes. Zeitfelder harmonisiert: alle Zeitstempel einheitlich als int64, Unix-Sekunden (UTC). MediumIdDto.mediumNumber auf int64 erweitert (mind. 17 Stellen; MediumID gesamt >= 19 Stellen). mediumStatus auf MediumStatus-Enum {5, 7, 19, 88} typisiert (einheitlich mit Store-API)."},"paths":{"/api/entitlements":{"post":{"tags":["Entitlements"],"summary":"Creates a new entitlement.","description":"If the linked medium does not exist, it will be created and the entitlement will be linked to that medium.\nIf the entitlement is a CiCo, the old entitlement for the medium will be removed and all linked inspections\nwill be updated to reference the new entitlement.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntitlementDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateEntitlementDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateEntitlementDto"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/entitlements/status":{"patch":{"tags":["Entitlements"],"summary":"Updates the status of an existing entitlement.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntitlementStatusDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateEntitlementStatusDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateEntitlementStatusDto"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/entitlements/expiration-time":{"patch":{"tags":["Entitlements"],"summary":"Updates the expiration time of an existing entitlement","description":"Only CiCo entitlements (ProductType == 3) support updating the expiration time.\nFor all other entitlement types, this endpoint will return a BadRequest response.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntitlementExpirationTimeDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateEntitlementExpirationTimeDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateEntitlementExpirationTimeDto"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/mediums/{mediumId}/entitlements":{"get":{"tags":["Mediums"],"summary":"Get all entitlements for a given medium.","parameters":[{"name":"mediumId","in":"path","description":"Id of the Medium.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntitlementDto"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/mediums/status":{"patch":{"tags":["Mediums"],"summary":"Updates the status of an existing medium.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMediumStatusDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateMediumStatusDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateMediumStatusDto"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/Inspections":{"post":{"tags":["Inspections"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestInspectionDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/RequestInspectionDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/RequestInspectionDto"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ResponseInspectionDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/ResponseInspectionDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/ResponseInspectionDto"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/Inspections/with-entitlements":{"post":{"tags":["Inspections"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestInspectionWithEntitlementsDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/RequestInspectionWithEntitlementsDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/RequestInspectionWithEntitlementsDto"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ResponseInspectionDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/ResponseInspectionDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/ResponseInspectionDto"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CreateEntitlementDto":{"required":["entitlement","medium"],"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumDto"},"entitlement":{"$ref":"#/components/schemas/EntitlementDto"}},"additionalProperties":false},"EntitlementDto":{"required":["areaOfValidity","entitlementEffectiveTime","entitlementExpirationTime","entitlementID","entitlementStatus","entitlementStatusTime","infoText","productID"],"type":"object","properties":{"entitlementID":{"$ref":"#/components/schemas/EntitlementIdDto"},"entitlementStatus":{"$ref":"#/components/schemas/EntitlementStatus"},"entitlementStatusTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"productID":{"$ref":"#/components/schemas/EntitlementProductIdDto"},"entitlementEffectiveTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"entitlementExpirationTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"areaOfValidity":{"type":"string","nullable":true},"infoText":{"type":"string","nullable":true}},"additionalProperties":false},"EntitlementIdDto":{"required":["ccpOrgID","entitlementIssuerCounter","samID"],"type":"object","properties":{"ccpOrgID":{"type":"integer","format":"int32"},"samID":{"$ref":"#/components/schemas/EntitlementSamIdDto"},"entitlementIssuerCounter":{"type":"integer","format":"int32"}},"additionalProperties":false},"EntitlementProductIdDto":{"required":["productNumber","productOwnerID","productType"],"type":"object","properties":{"productOwnerID":{"type":"integer","format":"int32"},"productType":{"type":"integer","format":"int32"},"productNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"EntitlementSamIdDto":{"required":["registrationAuthorityID","subjectNumber","subjectRole"],"type":"object","properties":{"registrationAuthorityID":{"type":"integer","format":"int32"},"subjectRole":{"type":"string","nullable":true},"subjectNumber":{"type":"string","nullable":true}},"additionalProperties":false},"EntitlementStatus":{"enum":[5,7,19],"type":"integer","format":"int32"},"EntitlementStatusDto":{"required":["entitlementID","entitlementStatus","entitlementStatusTime"],"type":"object","properties":{"entitlementID":{"$ref":"#/components/schemas/EntitlementIdDto"},"entitlementStatus":{"$ref":"#/components/schemas/EntitlementStatus"},"entitlementStatusTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"}},"additionalProperties":false},"MediumDto":{"required":["mediumEffectiveTime","mediumExpirationTime","mediumID","mediumStatus","mediumStatusTime","mediumTime","mediumType"],"type":"object","properties":{"mediumID":{"$ref":"#/components/schemas/MediumIdDto"},"mediumStatus":{"$ref":"#/components/schemas/MediumStatus"},"mediumStatusTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"mediumType":{"type":"integer","format":"int32"},"mediumTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"mediumEffectiveTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"mediumExpirationTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"}},"additionalProperties":false},"MediumIdDto":{"required":["ccpOrgID","mediumNumber"],"type":"object","properties":{"ccpOrgID":{"type":"integer","format":"int32"},"mediumNumber":{"type":"integer","format":"int64","description":"Mediennummer (mind. 17 Stellen). Erweitert von int32 auf int64. Vergaberegel: Werte <= 9223372036854775807 (int64-Grenze). Konsumenten muessen 64-Bit-Ganzzahlen verlustfrei verarbeiten (kein Parsing als IEEE-754-Double, Rundung ab ~16 Stellen)."}},"additionalProperties":false},"MediumStatus":{"enum":[5,7,19,88],"type":"integer","format":"int32"},"MediumStatusDto":{"required":["mediumID","mediumStatus","mediumStatusTime"],"type":"object","properties":{"mediumID":{"$ref":"#/components/schemas/MediumIdDto"},"mediumStatus":{"$ref":"#/components/schemas/MediumStatus"},"mediumStatusTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"}},"additionalProperties":false},"MediumWithIdOnlyDto":{"type":"object","properties":{"mediumID":{"$ref":"#/components/schemas/MediumIdDto"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}},"UpdateEntitlementExpirationTimeDto":{"required":["entitlementExpirationTime","entitlementID"],"type":"object","properties":{"entitlementID":{"$ref":"#/components/schemas/EntitlementIdDto"},"entitlementExpirationTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"}},"additionalProperties":false},"UpdateEntitlementStatusDto":{"required":["entitlement","medium"],"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumWithIdOnlyDto"},"entitlement":{"$ref":"#/components/schemas/EntitlementStatusDto"}},"additionalProperties":false},"UpdateMediumStatusDto":{"required":["medium"],"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumStatusDto"}},"additionalProperties":false},"EntitlementProductParameterDto":{"required":["content","productParameterContentTypeCode"],"type":"object","properties":{"productParameterContentTypeCode":{"type":"integer","format":"int32"},"content":{"type":"string","nullable":true}},"additionalProperties":false},"InspectionLocationDto":{"required":["locationNumber","locationTypeCode","orgID"],"type":"object","properties":{"orgID":{"type":"integer","format":"int32"},"locationTypeCode":{"type":"integer","format":"int32"},"locationNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"InspectionResult":{"enum":[1,2,3],"type":"integer","format":"int32"},"InspectionTerminalIdDto":{"required":["deviceType","orgID","terminalNumber"],"type":"object","properties":{"orgID":{"type":"integer","format":"int32"},"deviceType":{"type":"integer","format":"int32"},"terminalNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"LocationWrapperDto":{"required":["locationCurrent","locationNext"],"type":"object","properties":{"locationCurrent":{"$ref":"#/components/schemas/InspectionLocationDto"},"locationNext":{"$ref":"#/components/schemas/InspectionLocationDto"}},"additionalProperties":false},"RequestInspectionDto":{"required":["controlTime","location","medium","operatorID","terminalID","vehicleTypeCode"],"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumDto"},"location":{"$ref":"#/components/schemas/LocationWrapperDto"},"vehicleTypeCode":{"type":"integer","format":"int32"},"controlTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"terminalID":{"$ref":"#/components/schemas/InspectionTerminalIdDto"},"operatorID":{"type":"integer","format":"int32"}},"additionalProperties":false},"RequestInspectionWithEntitlementsDto":{"required":["controlTime","entitlements","location","medium","operatorID","terminalID","vehicleTypeCode"],"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumDto"},"location":{"$ref":"#/components/schemas/LocationWrapperDto"},"vehicleTypeCode":{"type":"integer","format":"int32"},"controlTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"terminalID":{"$ref":"#/components/schemas/InspectionTerminalIdDto"},"operatorID":{"type":"integer","format":"int32"},"entitlements":{"type":"array","items":{"$ref":"#/components/schemas/EntitlementDtoControl"},"nullable":true}},"additionalProperties":false},"ResponseInspectionDto":{"required":["entitlements","responseStatus","results"],"type":"object","properties":{"responseStatus":{"type":"integer","format":"int32"},"entitlements":{"type":"array","items":{"$ref":"#/components/schemas/EntitlementDtoControl"},"nullable":true},"results":{"$ref":"#/components/schemas/ResultsDto"}},"additionalProperties":false},"ResultsDto":{"required":["areaOfValidityResult","explanationText","inspectionResult"],"type":"object","properties":{"explanationText":{"type":"string","nullable":true},"inspectionResult":{"$ref":"#/components/schemas/InspectionResult"},"areaOfValidityResult":{"type":"boolean"}},"additionalProperties":false},"EntitlementDtoControl":{"required":["entitlementEffectiveTime","entitlementExpirationTime","entitlementID","entitlementStatus","entitlementStatusTime","infoText","productID","productParameter"],"type":"object","properties":{"entitlementID":{"$ref":"#/components/schemas/EntitlementIdDto"},"entitlementStatus":{"$ref":"#/components/schemas/EntitlementStatus"},"entitlementStatusTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"productID":{"$ref":"#/components/schemas/EntitlementProductIdDto"},"entitlementEffectiveTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"entitlementExpirationTime":{"type":"integer","format":"int64","description":"Unix-Zeit in Sekunden seit Epoch (UTC)"},"productParameter":{"$ref":"#/components/schemas/EntitlementProductParameterDto"},"infoText":{"type":"string","nullable":true}},"additionalProperties":false}}},"tags":[{"name":"Inspections"}]}