{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://cvs.preview.ted.europa.eu"}],"paths":{"/v1/notices/validation":{"post":{"tags":["notice-rest-controller"],"summary":"Validate the notice","description":"Validate a notice sent on body. The request returns a schematron validation report which describes all the tests performed.","operationId":"validate","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputNoticeValidation"}}},"required":true},"responses":{"200":{"description":"The report is returned.","content":{"application/xml":{"schema":{"type":"object","xml":{"name":"schematron-output"}},"example":"<svrl:schematron-output xmlns:svrl=\"http://purl.oclc.org/dsdl/svrl\" title=\"eForms schematron rules\" phase=\"1\">\n    <svrl:ns-prefix-in-attribute-values prefix=\"xs\" uri=\"http://www.w3.org/2001/XMLSchema\" />\n    <svrl:ns-prefix-in-attribute-values prefix=\"sch\" uri=\"http://purl.oclc.org/dsdl/schematron\" />\n    <svrl:ns-prefix-in-attribute-values prefix=\"cbc\" uri=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" />\n    <svrl:active-pattern id=\"EFORMS-validation-stage-1a\" />\n    <svrl:fired-rule context=\"/*\" />\n    <svrl:fired-rule context=\"//cbc:ActivityTypeCode\" />\n    <svrl:fired-rule context=\"//cbc:CountrySubentityCode\" />\n    <svrl:active-pattern id=\"EFORMS-validation-stage-4-1\" />\n    <svrl:fired-rule context=\"/*/cac:ProcurementProject[$noticeSubType = '1']\" />\n    <svrl:fired-rule context=\"/*/cac:ProcurementProject/cac:RealizedLocation[$noticeSubType = '1']\" />\n    <svrl:active-pattern id=\"EFORMS-validation-stage-5\" />\n    <svrl:fired-rule context=\"/*\" />\n    <svrl:fired-rule context=\"/*/cac:ContractingParty\" />\n    <svrl:fired-rule context=\"/*/cac:ContractingParty/cac:Party\" />\n    <svrl:fired-rule context=\"/*/cac:ContractingParty/cac:Party/cac:PartyIdentification/cbc:ID\" />\n</svrl:schematron-output>\n"}}},"400":{"description":"Possible issues:\n- The 'language' parameter is not valid.\n- The 'validationMode' parameter is not valid. The 'validationMode' parameter is not valid.\n- The rules are missing for the following version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TedAppsErrorResponse"},"example":{"errorCode":400,"message":"The validation mode is an invalid mode. Please choose between 'static' or 'dynamic' mode.","timestamp":"2025-12-23T09:33:59Z"}}}},"401":{"description":"Possible issues:\n- The provided API key doesn't exist or it is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TedAppsErrorResponse"},"example":{"errorCode":401,"message":"Missing key in header: X-API-Key","timestamp":"2025-12-23T09:39:39Z"}}}},"500":{"description":"Possible issues:\n- The provided API key cannot be currently validated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TedAppsErrorResponse"},"example":{"errorCode":500,"message":"Service is unavailable, key in header X-API-Key cannot be validated","timestamp":"2025-12-23T09:40:27Z"}}}}}}},"/v1/version-range":{"get":{"tags":["config-rest-controller"],"summary":"Return version-range.json","description":"Return content of the 'version-range.json' file as a JSON response body","operationId":"validate_1","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The information on accepted SDK versions is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkConfigDto"},"example":{"updatedOn":"2025-02-12T10:00:00","activeVersionRange":{"earliest":{"before":"1.7","after":"1.12","switchDate":"2025-04-30T23:59:00+02:00"},"latest":{"before":"1.12","after":"1.14","switchDate":"2025-03-06T03:00:00+02:00"},"excluded":{"before":["0.1"],"after":["0.1"],"switchDate":"2020-01-01T10:00:00+02:00"}}}}}},"401":{"description":"Possible issues:\n- The provided API key doesn't exist or it is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TedAppsErrorResponse"},"example":{"errorCode":401,"message":"Missing key in header: X-API-Key","timestamp":"2025-12-23T09:39:39Z"}}}},"500":{"description":"Possible issues:\n- The provided API key cannot be currently validated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TedAppsErrorResponse"},"example":{"errorCode":500,"message":"Service is unavailable, key in header X-API-Key cannot be validated","timestamp":"2025-12-23T09:40:27Z"}}}}}}}},"components":{"schemas":{"InputNoticeValidation":{"type":"object","description":"Request parameters for validation","properties":{"notice":{"type":"string","format":"byte","description":"Payload in base64 for the XML document","example":"aGVsbG8="},"language":{"type":"string","default":"en","description":"Language to generate the SVRL report. Enum: [bg, cs, da, de, el, en, es, et, fi, fr, ga, hu, it, lt, lv, mt, nl, pl, pt, ro, sk, sl, sv, hr]","example":"en"},"validationMode":{"type":"string","default":"STATIC","description":"Specify the validation mode that will be applied, selecting the corresponding sub-group of the eForms SDK version.","enum":["DYNAMIC","STATIC"],"example":"STATIC"},"eFormsSdkVersion":{"type":"string","description":"Specify the eForms SDK version to use for validating the XML document encoded in base64.","example":"eforms-sdk-1.0"}},"required":["notice"]},"TedAppsErrorResponse":{"type":"object","description":"Error response","properties":{"errorCode":{"type":"integer","format":"int32","description":"HTTP error code"},"message":{"type":"string","description":"Error description"},"timestamp":{"type":"string","description":"Error timestamp in RFC 3339 format"}}},"SdkConfigActiveVersionRangeDto":{"type":"object","properties":{"latest":{"$ref":"#/components/schemas/SdkConfigBoundDto"},"earliest":{"$ref":"#/components/schemas/SdkConfigBoundDto"},"excluded":{"$ref":"#/components/schemas/SdkConfigExcludedDto"}}},"SdkConfigBoundDto":{"type":"object","properties":{"before":{"type":"string"},"after":{"type":"string"},"switchDate":{"type":"string","format":"date-time"}}},"SdkConfigDto":{"type":"object","properties":{"updatedOn":{"type":"string","format":"date-time"},"activeVersionRange":{"$ref":"#/components/schemas/SdkConfigActiveVersionRangeDto"}}},"SdkConfigExcludedDto":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"},"uniqueItems":true},"after":{"type":"array","items":{"type":"string"},"uniqueItems":true},"switchDate":{"type":"string","format":"date-time"}}}}}}