{"openapi":"3.0.4","info":{"title":"ABT.Store – CheckService API","description":"API for the ABT.CheckService.","version":"v1"},"paths":{"/api/inspections":{"post":{"tags":["Inspections"],"summary":"Create an Inspection.","description":"It is checked whether the medium exists. If not, a NotFoundException is thrown, which results in a 404 response.\nThe entitlement linked to the inspection is not checked for existence, as it can be null and does not have to exist\nfor an inspection to be created.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInspectionDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateInspectionDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateInspectionDto"}}}},"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"}}}}}}},"/{mediumId}":{"get":{"tags":["Mediums"],"summary":"Get Medium with all linked data.","description":"Returns the medium with all linked entitlements and inspections.","parameters":[{"name":"mediumId","in":"path","description":"Id of Medium","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMediumWithAllDataDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/mediums/{mediumId}/inspections":{"get":{"tags":["Mediums"],"summary":"Get all inspections 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/InspectionDto"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CreateInspectionDto":{"required":["entitlementId","inspectionData","mediumId"],"type":"object","properties":{"mediumId":{"type":"string","nullable":true},"entitlementId":{"type":"string","nullable":true},"inspectionData":{"$ref":"#/components/schemas/InspectionDto"}},"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"},"productID":{"$ref":"#/components/schemas/EntitlementProductIdDto"},"entitlementEffectiveTime":{"type":"integer","format":"int64"},"entitlementExpirationTime":{"type":"integer","format":"int64"},"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"},"GetMediumWithAllDataDto":{"required":["entitlements","inspections","medium"],"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumDto"},"entitlements":{"type":"array","items":{"$ref":"#/components/schemas/EntitlementDto"},"nullable":true},"inspections":{"type":"array","items":{"$ref":"#/components/schemas/InspectionDto"},"nullable":true}},"additionalProperties":false},"InspectionDto":{"required":["actionOperatorId","actionTimeStamp","inspectionResult","location","operatorID","terminalID"],"type":"object","properties":{"actionOperatorId":{"type":"integer","format":"int32"},"terminalID":{"$ref":"#/components/schemas/InspectionTerminalIdDto"},"actionTimeStamp":{"type":"integer","format":"int64"},"location":{"$ref":"#/components/schemas/InspectionLocationDto"},"inspectionResult":{"$ref":"#/components/schemas/InspectionResult"},"operatorID":{"type":"integer","format":"int32"}},"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},"MediumDto":{"required":["mediumEffectiveTime","mediumExpirationTime","mediumID","mediumStatus","mediumStatusTime","mediumTime","mediumType"],"type":"object","properties":{"mediumID":{"$ref":"#/components/schemas/MediumIdDto"},"mediumStatus":{"$ref":"#/components/schemas/MediumStatus"},"mediumStatusTime":{"type":"string","format":"date-time"},"mediumType":{"type":"integer","format":"int32"},"mediumTime":{"type":"integer","format":"int64"},"mediumEffectiveTime":{"type":"integer","format":"int64"},"mediumExpirationTime":{"type":"integer","format":"int64"}},"additionalProperties":false},"MediumIdDto":{"required":["ccpOrgID","mediumNumber"],"type":"object","properties":{"ccpOrgID":{"type":"integer","format":"int32"},"mediumNumber":{"type":"integer","format":"int32"}},"additionalProperties":false},"MediumStatus":{"enum":[5,7,19,88],"type":"integer","format":"int32"},"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":{}}}}}