{"openapi":"3.0.4","info":{"title":"ABT.Store – Customer Contract Partner API","version":"v1","x-revision":"rev3","x-revision-date":"2026-07-08","x-changelog":["rev1 – Original-Spezifikation 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 damit in beiden APIs identisch"],"description":"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)."},"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"}}}}}}}},"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}}}}