{"openapi":"3.1.0","info":{"contact":{"email":"hi@hedia.com","name":"Hedia ApS","url":"https://hedia.com"},"termsOfService":"https://www.hedia.com/terms-and-conditions","title":"License API","version":"1.0.0"},"servers":[{"url":"https://licensing.hedia.com/api/v1"}],"security":[{"accessToken":[]}],"tags":[{"name":"Licenses","description":"License management.","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/operations#licenses","description":"Documentation"}}],"paths":{"/activate-license":{"post":{"summary":"Activate License","operationId":"activateLicense","description":"Activate a license for a product for the currently authenticated user.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"oneOf":[{"$ref":"#/components/schemas/ProductId"},{"$ref":"#/components/schemas/ProductCode"}]}},"required":["product"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"A valid license for the product was found and successfully activated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseInfo"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestActivateLicense"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"499":{"$ref":"#/components/responses/SignalAborted"},"default":{"$ref":"#/components/responses/InternalServerError"}},"tags":["Licenses"],"externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/operations/activateLicense","description":"Documentation"}}},"/check-license":{"get":{"summary":"Check License","operationId":"checkLicense","description":"Check if the currently authenticated user has an active license for a given product.","parameters":[{"$ref":"#/components/parameters/ProductRequiredQueryParameter"}],"responses":{"200":{"description":"OK - The user currently has an active license for the product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseInfo"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestCheckLicense"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"499":{"$ref":"#/components/responses/SignalAborted"},"default":{"$ref":"#/components/responses/InternalServerError"}},"tags":["Licenses"],"externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/operations/checkLicense","description":"Documentation"}}},"/register-license":{"post":{"summary":"Register License","operationId":"registerLicense","description":"Get a url for a page where the currently authenticated user can go and register a license for the given product.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"description":"The `Product Code` or `Product ID` for which to check a license.","oneOf":[{"$ref":"#/components/schemas/ProductId"},{"$ref":"#/components/schemas/ProductCode"}]},"callbackUrl":{"$ref":"#/components/schemas/CallbackUrl"}},"required":["product","callbackUrl"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}}},"400":{"$ref":"#/components/responses/InvalidRequestBody"},"401":{"$ref":"#/components/responses/Unauthorized"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"499":{"$ref":"#/components/responses/SignalAborted"},"default":{"$ref":"#/components/responses/InternalServerError"}},"tags":["Licenses"],"externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/operations/registerLicense","description":"Documentation"}}}},"components":{"securitySchemes":{"accessToken":{"description":"An Oauth2 Access Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ProductId":{"title":"Product ID","type":"string","format":"uuid","examples":["5f50e769-7c0e-4839-a6a7-d3a07474dc28"],"$id":"./components/schemas/ProductId","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/ProductId","description":"Documentation"}},"ProductCode":{"title":"Product Code","type":"string","pattern":"^[A-Z-0-9]{3,8}$","examples":["HDA"],"$id":"./components/schemas/ProductCode","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/ProductCode","description":"Documentation"}},"ProblemDetails":{"title":"Problem Details","description":"A problem details object provides additional information about a problem that occurred during an API request.","type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type.","examples":["/problems/unauthorized","about:blank"]},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","examples":["Unauthorized"]},"status":{"type":"number","description":"The HTTP status code generated by the origin server for this occurrence of the problem.","examples":[401]},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["You must authenticate and provide the necessary permissions to access this resource. Please check your credentials or token."]}},"required":["type"],"$id":"./components/schemas/ProblemDetails","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/ProblemDetails","description":"Documentation"}},"InternalServerErrorProblem":{"title":"Internal Server Error Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/internal-server-error"},"title":{"type":"string"},"status":{"type":"number","const":500},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/InternalServerErrorProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/InternalServerErrorProblem","description":"Documentation"}},"LicenseKey":{"title":"License Key","type":"string","pattern":"[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}","examples":["R4A8-Y6O5-F4E2"],"$id":"./components/schemas/LicenseKey","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseKey","description":"Documentation"}},"LicenseType":{"title":"License Type","type":"string","enum":["perpetual","subscription","time-limited"],"examples":["perpetual"],"$id":"./components/schemas/LicenseType","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseType","description":"Documentation"}},"LicenseStartDate":{"title":"License Start Date","description":"When issuing a license, you can set a start date for it. Adding a start date to a license will not allow license activations until that date. The start date must be today or in the future, and it can not be after the end date.","type":"string","format":"date","examples":["2025-01-01"],"$id":"./components/schemas/LicenseStartDate","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseStartDate","description":"Documentation"}},"LicenseEndDate":{"title":"License End Date","description":"The date when the license ends. If specified, it must be today or in the future, and it can not be before the start date.","type":"string","format":"date","examples":["2025-07-01"],"$id":"./components/schemas/LicenseEndDate","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseEndDate","description":"Documentation"}},"Duration":{"title":"License Duration","description":"How long the license will stay active after activation.","type":"string","enum":["P1M","P3M","P6M","P12M"],"examples":["P1M"],"$id":"./components/schemas/Duration","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/Duration","description":"Documentation"}},"LicenseIsActive":{"title":"License Is Active","type":"boolean","$id":"./components/schemas/LicenseIsActive","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseIsActive","description":"Documentation"}},"LicenseInfo":{"title":"License Info","type":"object","properties":{"key":{"$ref":"#/components/schemas/LicenseKey"},"type":{"$ref":"#/components/schemas/LicenseType"},"startDate":{"$ref":"#/components/schemas/LicenseStartDate"},"endDate":{"$ref":"#/components/schemas/LicenseEndDate"},"duration":{"$ref":"#/components/schemas/Duration"},"isActive":{"$ref":"#/components/schemas/LicenseIsActive"}},"additionalProperties":false,"required":["key","type","startDate","isActive"],"$id":"./components/schemas/LicenseInfo","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseInfo","description":"Documentation"}},"InvalidLicenseProblem":{"title":"Invalid License Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/invalid-license"},"title":{"type":"string","const":"Invalid License"},"status":{"type":"number","const":400},"detail":{"type":"string"}},"required":["type","title","status","detail"],"$id":"./components/schemas/InvalidLicenseProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/InvalidLicenseProblem","description":"Documentation"}},"LicenseAlreadyActiveProblem":{"title":"License Already Active Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/license-already-active"},"title":{"type":"string","const":"License Already Active"},"status":{"type":"number","const":400},"detail":{"type":"string"}},"required":["type","title","status","detail"],"$id":"./components/schemas/LicenseAlreadyActiveProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseAlreadyActiveProblem","description":"Documentation"}},"LicenseNotFoundProblem":{"title":"License Not Found Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/license-not-found"},"title":{"type":"string"},"status":{"type":"number","const":400},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/LicenseNotFoundProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/LicenseNotFoundProblem","description":"Documentation"}},"InvalidRequestBodyProblem":{"title":"Invalid Request Body Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/invalid-request-body"},"title":{"type":"string"},"status":{"type":"number","const":400},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/InvalidRequestBodyProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/InvalidRequestBodyProblem","description":"Documentation"}},"BadRequestActivateLicense":{"title":"Bad Request for activateLicense","oneOf":[{"$ref":"#/components/schemas/InvalidLicenseProblem"},{"$ref":"#/components/schemas/LicenseAlreadyActiveProblem"},{"$ref":"#/components/schemas/LicenseNotFoundProblem"},{"$ref":"#/components/schemas/InvalidRequestBodyProblem"}],"$id":"./components/schemas/BadRequestActivateLicense","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/BadRequestActivateLicense","description":"Documentation"}},"UnauthorizedProblem":{"title":"Unauthorized Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/unauthorized"},"title":{"type":"string"},"status":{"type":"number","const":401},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/UnauthorizedProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/UnauthorizedProblem","description":"Documentation"}},"UnsupportedMediaTypeProblem":{"title":"Unsupported Media Type Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/unsupported-media-type"},"title":{"type":"string"},"status":{"type":"number","const":415},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/UnsupportedMediaTypeProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/UnsupportedMediaTypeProblem","description":"Documentation"}},"Html":{"title":"Html","description":"The HTML is the HTML content of the page.","type":"string","$id":"./components/schemas/Html","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/Html","description":"Documentation"}},"SignalAbortedProblem":{"title":"Signal Aborted Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/signal-aborted"},"title":{"type":"string"},"status":{"type":"number","const":499},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/SignalAbortedProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/SignalAbortedProblem","description":"Documentation"}},"InactiveLicenseProblem":{"title":"Inactive License Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/inactive-license"},"title":{"type":"string","const":"Inactive License"},"status":{"type":"number","const":400},"detail":{"type":"string"}},"required":["type","title","status","detail"],"$id":"./components/schemas/InactiveLicenseProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/InactiveLicenseProblem","description":"Documentation"}},"InvalidRequestParameterProblem":{"title":"Invalid Request Parameter Problem","type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"type":{"type":"string","const":"/problems/invalid-request-parameter"},"title":{"type":"string"},"status":{"type":"number","const":400},"detail":{"type":"string"}},"required":["type","title","status"],"$id":"./components/schemas/InvalidRequestParameterProblem","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/InvalidRequestParameterProblem","description":"Documentation"}},"BadRequestCheckLicense":{"title":"Bad Request for checkLicense","oneOf":[{"$ref":"#/components/schemas/InactiveLicenseProblem"},{"$ref":"#/components/schemas/InvalidLicenseProblem"},{"$ref":"#/components/schemas/LicenseNotFoundProblem"},{"$ref":"#/components/schemas/InvalidRequestParameterProblem"}],"$id":"./components/schemas/BadRequestCheckLicense","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/BadRequestCheckLicense","description":"Documentation"}},"CallbackUrl":{"title":"Callback URL","type":"string","format":"uri","examples":["https://hedia.com/callback"],"$id":"./components/schemas/CallbackUrl","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/CallbackUrl","description":"Documentation"}},"RegistrationURL":{"title":"Registration URL","description":"The URL to register a license key.","type":"string","format":"uri","examples":["https://example.com/activations/6e44e4a3-0abb-44b7-a105-5e95300fdb1b"],"maxLength":1024,"$id":"./components/schemas/RegistrationURL","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/RegistrationURL","description":"Documentation"}},"Registration":{"title":"Registration","type":"object","properties":{"url":{"$ref":"#/components/schemas/RegistrationURL"}},"required":["url"],"additionalProperties":false,"$id":"./components/schemas/Registration","externalDocs":{"url":"https://developer.hedia.com/services/licensing/api/v1/components/schemas/Registration","description":"Documentation"}}},"responses":{"InternalServerError":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblem"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"UnsupportedMediaType":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeProblem"}},"text/html":{"schema":{"$ref":"#/components/schemas/Html"}}}},"SignalAborted":{"description":"Signal Aborted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SignalAbortedProblem"}}}},"InvalidRequestBody":{"description":"Invalid Request Body","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InvalidRequestBodyProblem"}}}}},"parameters":{"ProductRequiredQueryParameter":{"name":"product","in":"query","required":true,"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductCode"},{"$ref":"#/components/schemas/ProductId"}]}}}},"externalDocs":{"url":"https://developer.hedia.com/","description":"Documentation"}}