{"openapi":"3.1.0","info":{"title":"Image Portal Products API","description":"API for managing media products in the Image Portal","version":"1.0.0"},"servers":[{"url":"https://products.api.im.test.ntb.dev","description":"Server URL in Test environment"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Licenses","description":"Manage licenses within license groups"},{"name":"Metadata Fields","description":"Manage metadata fields for products"},{"name":"Downloads","description":"Reserve download credits and finish downloads"},{"name":"Subscriptions","description":"Manage subscriptions of image portal"},{"name":"Price Resolver","description":"Resolve and provide price for media"},{"name":"License Groups","description":"Manage license groups for scopes and products"},{"name":"Price List","description":"Manage price lists of image portal"},{"name":"Products","description":"Manage products of image portal"},{"name":"Scope Parameters","description":"Manage scope parameters to create scopes for products"},{"name":"Scopes","description":"Manage scopes for products"}],"paths":{"/api/v1/metadata-fields/{metadataFieldId}":{"get":{"tags":["Metadata Fields"],"summary":"Get metadata field by ID","description":"Get metadata field by ID from the Products service.","operationId":"getMetadataField","parameters":[{"name":"metadataFieldId","in":"path","description":"Metadata field ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseMetadataFieldResponse"}}}}}},"put":{"tags":["Metadata Fields"],"summary":"Update metadata field by ID","description":"Update metadata field by ID in the Products service.","operationId":"updateMetadataField","parameters":[{"name":"metadataFieldId","in":"path","description":"Metadata field ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataFieldRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseMetadataFieldResponse"}}}}}},"delete":{"tags":["Metadata Fields"],"summary":"Delete metadata field by ID","description":"Delete metadata field by ID from the Products service.","operationId":"deleteMetadataField","parameters":[{"name":"metadataFieldId","in":"path","description":"Metadata field ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}}},"/api/v1/subscriptions":{"get":{"tags":["Subscriptions"],"summary":"List subscriptions","description":"Lists all subscriptions with optional filtering and pagination","operationId":"listSubscriptions","parameters":[{"name":"searchString","in":"query","description":"Text to search in subscriptions","required":false,"schema":{"type":"string"},"example":"subscription"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","type","validFrom","validTo","downloadCount","createdAt","updatedAt"]},"example":"name"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseSubscriptionResponse"}}}}}},"post":{"tags":["Subscriptions"],"summary":"Creates subscription","description":"Creates a new subscription for a customer with product and license group","operationId":"createSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"An active subscription for the same product already exists in the workspace","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Subscription created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseSubscriptionResponse"}}}}}}},"/api/v1/scopes":{"get":{"tags":["Scopes"],"summary":"List scope parameters available in the Products service","description":"List scope parameters available in the Products service.","operationId":"listScopes","parameters":[{"name":"searchString","in":"query","description":"Text to search in scopes","required":false,"schema":{"type":"string"},"example":"all"},{"name":"type","in":"query","description":"Scope type filter","required":false,"schema":{"type":"string","enum":["primary","secondary"]},"example":"primary"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","type","priority","createdAt","updatedAt"]},"example":"name"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseScopeBaseWithParentResponse"}}}}}},"post":{"tags":["Scopes"],"summary":"Creates scopes for the Products service","description":"Creates scopes for the Products service.","operationId":"createScope","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A scope with the same type, parent scope and parameter values already exists","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Scope created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseScopeGetResponse"}}}}}}},"/api/v1/scope-parameters":{"get":{"tags":["Scope Parameters"],"summary":"List scope parameters available in the Products service","description":"List scope parameters available in the Products service.","operationId":"listScopeParameters","parameters":[{"name":"searchString","in":"query","description":"Text to search in scope parameters","required":false,"schema":{"type":"string"},"example":"distributor"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","fieldType","state","createdAt","updatedAt"]},"example":"name"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseScopeParameterResponse"}}}}}},"post":{"tags":["Scope Parameters"],"summary":"Creates scope parameters for the Products service","description":"Creates scope parameters for the Products service.","operationId":"createScopeParameter","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScopeParameterRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseScopeParameterResponse"}}}}}}},"/api/v1/products":{"get":{"tags":["Products"],"summary":"List products available in the Products service","description":"List products available in the Products service.","operationId":"listProducts","parameters":[{"name":"searchString","in":"query","description":"Text to search in products","required":false,"schema":{"type":"string"},"example":"all"},{"name":"type","in":"query","description":"Product type filter","required":false,"schema":{"type":"string","enum":["main","variant"]},"example":"main"},{"name":"state","in":"query","description":"Product state filter","required":false,"schema":{"type":"string","enum":["draft","published"]},"example":"draft"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","type","state","createdAt","updatedAt"]},"example":"name"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseProductResponse"}}}}}},"post":{"tags":["Products"],"summary":"Creates products for media items","description":"Creates a product with a name, description and scope","operationId":"createProduct","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseProductResponse"}}}}}}},"/api/v1/price-resolver":{"post":{"tags":["Price Resolver"],"summary":"Resolve price for a media item based on metadata","operationId":"resolvePrice","parameters":[{"name":"customerGroupId","in":"query","description":"Workspace ID (owned by user-api) to resolve prices for","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaData"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseMediaPriceResponse"}}}}}}},"/api/v1/price-lists":{"get":{"tags":["Price List"],"summary":"List all price lists","operationId":"listPriceLists","parameters":[{"name":"searchString","in":"query","description":"Text to search in price lists","required":false,"schema":{"type":"string"},"example":"product"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","validFrom","validTo","createdAt","updatedAt"]},"example":"updatedAt"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponsePriceListResponse"}}}}}},"post":{"tags":["Price List"],"summary":"Create a new price list","operationId":"createPriceList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceListRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListResponse"}}}}}}},"/api/v1/metadata-fields":{"get":{"tags":["Metadata Fields"],"summary":"List metadata fields available in the Products service","description":"List metadata fields available in the Products service.","operationId":"listMetadataFields","parameters":[{"name":"searchString","in":"query","description":"Text to search in metadata fields","required":false,"schema":{"type":"string"},"example":"distributor"},{"name":"dataType","in":"query","description":"Filter by data type","required":false,"schema":{"type":"string","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]},"example":"ENUM"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["key","label","dataType","createdAt","updatedAt"]},"example":"key"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseMetadataFieldResponse"}}}}}},"post":{"tags":["Metadata Fields"],"summary":"Creates metadata fields for the Products service","description":"Creates metadata fields for the Products service.","operationId":"createMetadataField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataFieldRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseMetadataFieldResponse"}}}}}}},"/api/v1/license-groups":{"get":{"tags":["License Groups"],"summary":"List License Groups available in the Products service","description":"List License Groups available in the Products service.","operationId":"listLicenseGroups","parameters":[{"name":"searchString","in":"query","description":"Text to search in license groups","required":false,"schema":{"type":"string"},"example":"license"},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","createdAt","updatedAt"]},"example":"name"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseLicenseGroupResponse"}}}}}},"post":{"tags":["License Groups"],"summary":"Creates license group for media products","description":"Creates a license group with a name, description and associates them with scopes","operationId":"createLicenseGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLicenseGroupRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseLicenseGroupResponse"}}}}}}},"/api/v1/license-groups/{licenseGroupId}/licenses":{"get":{"tags":["Licenses"],"summary":"List licenses in a license group","description":"List all licenses available in a specific license group.","operationId":"listLicenses","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Page number (Min 1)","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"limit","in":"query","description":"Items per page (Max 50, Min 1)","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":1},"example":10},{"name":"sortBy","in":"query","description":"Sort by field","required":false,"schema":{"type":"string","enum":["name","createdAt","updatedAt"]},"example":"name"},{"name":"sortDirection","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponseLicenseResponse"}}}}}},"post":{"tags":["Licenses"],"summary":"Create a license type","description":"Creates a new license type within a license group.","operationId":"createLicense","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLicenseRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseLicenseResponse"}}}}}}},"/api/v1/downloads/finish":{"post":{"tags":["Downloads"],"summary":"Finish a download","description":"COMPLETED keeps the credit used. RELEASED gives it back, and does nothing when no reservation exists for this download id","operationId":"finish","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinishDownloadRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"COMPLETED for an unknown download id","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The download was reserved by another user","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"COMPLETED for a download that was released or cancelled","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Finished, or nothing left to change"}}}},"/api/v1/downloads/authorize":{"post":{"tags":["Downloads"],"summary":"Authorize a download","description":"Resolves the price for a media and reserves download credits","operationId":"authorize","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeDownloadRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not in the workspace, or no subscription covers the media","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"No credits left, or the download id was already used or released","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseAuthorizeDownloadResponse"}}}}}}},"/api/v1/subscriptions/{subscriptionId}":{"get":{"tags":["Subscriptions"],"summary":"Get subscription by ID","description":"Fetches a subscription using its unique identifier","operationId":"getSubscription","parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseSubscriptionResponse"}}}}}},"delete":{"tags":["Subscriptions"],"summary":"Delete subscription by ID","description":"Deletes a subscription using its unique identifier","operationId":"deleteSubscription","parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["Subscriptions"],"summary":"Update subscription by ID","description":"Updates a subscription using its unique identifier","operationId":"patchSubscription","parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSubscriptionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"An active subscription for the same product already exists in the workspace","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Subscription updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseSubscriptionResponse"}}}}}}},"/api/v1/scopes/{scopeId}":{"get":{"tags":["Scopes"],"operationId":"getScope","parameters":[{"name":"scopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseScopeGetResponse"}}}}}},"delete":{"tags":["Scopes"],"operationId":"deleteScope","parameters":[{"name":"scopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["Scopes"],"operationId":"updateScope","parameters":[{"name":"scopeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A scope with the same type, parent scope and parameter values already exists","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Scope updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseScopeGetResponse"}}}}}}},"/api/v1/scope-parameters/{scopeParameterId}":{"get":{"tags":["Scope Parameters"],"summary":"Get scope parameter by ID","description":"Get scope parameter by ID from the Products service.","operationId":"getScopeParameter","parameters":[{"name":"scopeParameterId","in":"path","description":"Scope parameter ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseScopeParameterResponse"}}}}}},"delete":{"tags":["Scope Parameters"],"summary":"Delete scope parameter by ID","description":"Delete scope parameter by ID from the Products service.","operationId":"deleteScopeParameter","parameters":[{"name":"scopeParameterId","in":"path","description":"Scope parameter ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["Scope Parameters"],"summary":"Patch scope parameter by ID","description":"Patch scope parameter by ID in the Products service.","operationId":"patchScopeParameter","parameters":[{"name":"scopeParameterId","in":"path","description":"Scope parameter ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchScopeParameterRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseScopeParameterResponse"}}}}}}},"/api/v1/products/{productId}":{"get":{"tags":["Products"],"summary":"Get product by ID","description":"Fetches a product using its unique identifier","operationId":"getProductById","parameters":[{"name":"productId","in":"path","description":"Product ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseProductWithVariantsResponse"}}}}}},"delete":{"tags":["Products"],"summary":"Delete product by ID","description":"Deletes an existing product using its unique identifier. Cannot delete products that have variant products.","operationId":"deleteProduct","parameters":[{"name":"productId","in":"path","description":"Product ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["Products"],"summary":"Update product by ID","description":"Updates an existing product's details using its unique identifier. Note: product type and parent product cannot be changed.","operationId":"updateProduct","parameters":[{"name":"productId","in":"path","description":"Product ID","required":true,"schema":{"type":"string","format":"uuid"},"example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseProductResponse"}}}}}}},"/api/v1/price-lists/{priceListId}":{"get":{"tags":["Price List"],"summary":"Get a price list by ID","operationId":"getPriceList","parameters":[{"name":"priceListId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponsePriceListResponse"}}}}}},"delete":{"tags":["Price List"],"summary":"Delete a price list","operationId":"deletePriceList","parameters":[{"name":"priceListId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["Price List"],"summary":"Update a price list","operationId":"updatePriceList","parameters":[{"name":"priceListId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPriceListRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponsePriceListResponse"}}}}}}},"/api/v1/license-groups/{licenseGroupId}":{"get":{"tags":["License Groups"],"summary":"Get license group by ID","description":"Get license group by ID with associated scopes.","operationId":"getLicenseGroup","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseLicenseGroupResponse"}}}}}},"delete":{"tags":["License Groups"],"summary":"Delete license group by ID","description":"Delete license group by ID in the Products service.","operationId":"deleteLicenseGroup","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["License Groups"],"summary":"Update license group by ID","description":"Update license group by ID in the Products service.","operationId":"updateLicenseGroup","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLicenseGroupRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseLicenseGroupResponse"}}}}}}},"/api/v1/license-groups/{licenseGroupId}/licenses/{licenseId}":{"get":{"tags":["Licenses"],"summary":"Get a license type by ID","description":"Get a specific license type by ID within a license group.","operationId":"getLicense","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"licenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseLicenseResponse"}}}}}},"delete":{"tags":["Licenses"],"summary":"Delete a license type","description":"Delete a license type by ID within a license group.","operationId":"deleteLicense","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"licenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}},"patch":{"tags":["Licenses"],"summary":"Update a license type","description":"Update a license type by ID within a license group.","operationId":"updateLicense","parameters":[{"name":"licenseGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"licenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLicenseRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseLicenseResponse"}}}}}}}},"components":{"schemas":{"APIFieldError":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldError":{"type":"string"}}},"APIMeta":{"type":"object","properties":{"description":{"type":"string"},"version":{"type":"string"}}},"APIStatusError":{"type":"object","properties":{"message":{"type":"string"},"statusCode":{"type":"integer","format":"int32"},"timestamp":{"type":"string"},"path":{"type":"string"},"success":{"type":"boolean"},"apiFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/APIFieldError"},"uniqueItems":true}}},"ErrorResponse":{"type":"object","properties":{"_status":{"$ref":"#/components/schemas/APIStatusError"},"_meta":{"$ref":"#/components/schemas/APIMeta"}}},"MetadataFieldRequest":{"type":"object","description":"Request for creating or updating a metadata field","properties":{"key":{"type":"string","description":"Metadata field key","minLength":1},"label":{"type":"string","description":"Metadata field label","minLength":1},"dataType":{"type":"string","description":"Metadata field data type","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]},"values":{"type":"array","description":"List of possible values for the metadata field","items":{"type":"string"}}},"required":["dataType","key","label"]},"GetResponseMetadataFieldResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/MetadataFieldResponse"}}},"Meta":{"type":"object","properties":{"description":{"type":"string"},"version":{"type":"string"}}},"MetadataFieldResponse":{"type":"object","description":"Response for a metadata field","properties":{"id":{"type":"string","format":"uuid","description":"Metadata field ID"},"key":{"type":"string","description":"Metadata field key"},"label":{"type":"string","description":"Metadata field label"},"dataType":{"type":"string","description":"Metadata field data type","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"},"values":{"type":"array","description":"List of metadata field values","items":{"$ref":"#/components/schemas/MetadataFieldValueResponse"}}},"required":["createdAt","dataType","id","key","label","values"]},"MetadataFieldValueResponse":{"type":"object","description":"Response for a metadata field value","properties":{"id":{"type":"string","format":"uuid","description":"Metadata field value ID"},"value":{"type":["string","null"],"description":"Value"},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"}},"required":["createdAt","id"]},"CreateSubscriptionRequest":{"type":"object","description":"Request for creating a subscription","properties":{"validFrom":{"type":"string","format":"date-time","description":"Date/time from which the resource is valid","example":"2026-01-01T00:00:00Z"},"validTo":{"type":"string","format":"date-time","description":"Date/time until which the resource is valid (nullable)","example":"2027-12-31T23:59:59Z"},"name":{"type":"string","description":"Human readable name for the subscription"},"description":{"type":"string","description":"Detailed description explaining the subscription contents and purpose"},"type":{"type":"string","description":"Type of subscription (enum) affecting billing or behavior","enum":["time","quota"]},"productId":{"type":"string","format":"uuid","description":"Identifier of the product the subscription belongs to"},"customerGroupId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) targeted by this subscription"},"customerGroupName":{"type":"string","description":"Workspace name (owned by user-api), stored for display purposes","maxLength":255,"minLength":0},"licenseGroupId":{"type":"string","format":"uuid","description":"Identifier of the license group applied to this subscription"},"downloadLimit":{"type":"integer","format":"int32","description":"Optional maximum number of downloads permitted for this subscription","minimum":1},"subscriptionPrice":{"type":"number","description":"Price for the subscription in the chosen currency","minimum":0},"currency":{"type":"string","description":"ISO currency code for the subscription price (default: NOK)","enum":["NOK"]},"status":{"type":"boolean","description":"Whether the subscription is currently active (default: true)"},"subscriptionLicenses":{"type":"array","description":"List of license entries (licenseId  quantity) to include in the subscription","items":{"$ref":"#/components/schemas/SubscriptionLicenseRequest"}}},"required":["customerGroupId","customerGroupName","licenseGroupId","name","productId","status","subscriptionLicenses","type"]},"SubscriptionLicenseRequest":{"type":"object","description":"Represents a license entry (license id + quantity) used by subscription create/update requests","properties":{"licenseId":{"type":"string","format":"uuid","description":"Identifier of the license to include in the subscription"},"quantityLimit":{"type":"integer","format":"int32","description":"Maximum number of items/licenses allowed for this license within the subscription (minimum 1)","minimum":1}},"required":["licenseId"]},"GetResponseSubscriptionResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"SubscriptionLicenses":{"type":"object","properties":{"licenseId":{"type":"string","format":"uuid","description":"Identifier of the license included in the subscription"},"quantityLimit":{"type":["integer","null"],"format":"int32","description":"Maximum quantity allowed for this license within the subscription"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when this subscription-license relation was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when this subscription-license relation was last updated"}},"required":["createdAt","licenseId"]},"SubscriptionResponse":{"type":"object","description":"Response for a subscription","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the subscription"},"name":{"type":"string","description":"Human readable name of the subscription"},"description":{"type":["string","null"],"description":"Longer description explaining the subscription's purpose and contents"},"type":{"type":"string","description":"Subscription type (enum) describing billing","enum":["time","quota"]},"productId":{"type":"string","format":"uuid","description":"Identifier of the product that this subscription belongs to"},"customerGroupId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) this subscription targets"},"customerGroupName":{"type":"string","description":"Workspace name stored for display; may be stale if the workspace was renamed in user-api"},"licenseGroupId":{"type":"string","format":"uuid","description":"Identifier of the license group applied to this subscription"},"downloadLimit":{"type":["integer","null"],"format":"int32","description":"Maximum number of downloads allowed for this subscription"},"downloadCount":{"type":"integer","format":"int32","description":"Number of downloads made under this subscription"},"subscriptionPrice":{"type":["number","null"],"description":"Price for the subscription in the chosen currency"},"currency":{"type":"string","description":"ISO currency code for the subscription price (default: NOK)","enum":["NOK"]},"status":{"type":"boolean","description":"Whether the subscription is currently active"},"validFrom":{"type":["string","null"],"format":"date-time","description":"Date/time from which the subscription is valid"},"validTo":{"type":["string","null"],"format":"date-time","description":"Date/time until which the subscription is valid"},"subscriptionLicenses":{"type":"array","description":"List of licenses and their limits included with this subscription","items":{"$ref":"#/components/schemas/SubscriptionLicenses"}},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the subscription was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the subscription was last updated"}},"required":["createdAt","currency","customerGroupId","customerGroupName","downloadCount","id","licenseGroupId","name","productId","status","subscriptionLicenses","type"]},"ScopeParameterRequest":{"type":"object","properties":{"scopeParameterId":{"type":"string","format":"uuid","description":"Scope parameter ID"},"metadataFields":{"type":"array","description":"List of metadata fields associated with the scope parameter","items":{"$ref":"#/components/schemas/MetadataFieldRequest"}}}},"ScopeRequest":{"type":"object","description":"Request for creating or updating a scope","properties":{"name":{"type":"string","description":"Scope name","minLength":1},"description":{"type":"string","description":"Scope description","maxLength":255,"minLength":0},"type":{"type":"string","description":"Scope type","enum":["primary","secondary"]},"priority":{"type":"integer","format":"int32","description":"Priority for secondary scopes"},"parentScopeId":{"type":"string","format":"uuid","description":"Parent scope ID for hierarchical scopes","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"parameters":{"type":"array","description":"List of scope parameters","example":[{"scopeParameterId":"d290f1ee-6c54-4b01-90e6-d701748f0851","metadataFields":[{"metadataFieldId":"123e4567-e89b-12d3-a456-426614174000","metadataFieldValueIds":["223e4567-e89b-12d3-a456-426614174000"]}]}],"items":{"$ref":"#/components/schemas/ScopeParameterRequest"}}},"required":["name"]},"GetResponseScopeGetResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/ScopeGetResponse"}}},"ScopeBaseResponse":{"type":"object","description":"Base response for scope information","properties":{"id":{"type":"string","format":"uuid","description":"Scope ID"},"name":{"type":"string","description":"Scope name"},"description":{"type":["string","null"],"description":"Scope description"},"priority":{"type":"integer","format":"int32","description":"Scope priority"},"type":{"type":"string","description":"Scope type","enum":["primary","secondary"]},"createdAt":{"type":"string","format":"date-time","description":"Scope creation timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Scope last update timestamp"}},"required":["createdAt","id","name","priority","type"]},"ScopeBaseWithParametersResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Scope ID"},"name":{"type":"string","description":"Scope name"},"description":{"type":["string","null"],"description":"Scope description"},"priority":{"type":"integer","format":"int32","description":"Scope priority"},"type":{"type":"string","description":"Scope type","enum":["primary","secondary"]},"createdAt":{"type":"string","format":"date-time","description":"Scope creation timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Scope last update timestamp"},"parameters":{"type":"array","description":"Parameters of the parent scope","items":{"$ref":"#/components/schemas/ScopeParameterScopeResponse"}}},"required":["createdAt","id","name","parameters","priority","type"]},"ScopeGetResponse":{"type":"object","description":"Response for a scope","properties":{"id":{"type":"string","format":"uuid","description":"Scope ID"},"name":{"type":"string","description":"Scope name"},"description":{"type":["string","null"],"description":"Scope description"},"priority":{"type":"integer","format":"int32","description":"Scope priority"},"type":{"type":"string","description":"Scope type","enum":["primary","secondary"]},"createdAt":{"type":"string","format":"date-time","description":"Scope creation timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Scope last update timestamp"},"parentScope":{"type":"null","$ref":"#/components/schemas/ScopeBaseWithParametersResponse","description":"Parent scope information"},"secondaryScopes":{"type":["array","null"],"description":"Secondary scopes information","items":{"$ref":"#/components/schemas/ScopeBaseResponse"}},"parameters":{"type":"array","description":"Parameters of the scope","items":{"$ref":"#/components/schemas/ScopeParameterScopeResponse"}}},"required":["createdAt","id","name","parameters","priority","type"]},"ScopeParameterScopeResponse":{"type":"object","description":"Response for scope parameter (used in Scope)","properties":{"id":{"type":"string","format":"uuid","description":"Scope Parameter ID"},"name":{"type":"string","description":"Scope Parameter name"},"metadataFields":{"type":"array","description":"Metadata fields for the scope parameter","items":{"$ref":"#/components/schemas/MetadataFieldResponse"}},"createdAt":{"type":"string","format":"date-time","description":"Scope Parameter creation timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Scope Parameter last update timestamp"}},"required":["createdAt","id","metadataFields","name"]},"CreateScopeParameterRequest":{"type":"object","description":"Request for creating a scope parameter","properties":{"name":{"type":"string","description":"Scope parameter name","minLength":1},"description":{"type":"string","description":"Scope parameter description"},"fieldType":{"type":"string","description":"Data type of the scope parameter. All associated metadata fields must share this type.","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]},"metadataFieldIds":{"type":"array","description":"List of metadata field IDs associated with the scope parameter","example":["123e4567-e89b-12d3-a456-426614174000","223e4567-e89b-12d3-a456-426614174000"],"items":{"type":"string","format":"uuid"},"minItems":1}},"required":["fieldType","metadataFieldIds","name"]},"GetResponseScopeParameterResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/ScopeParameterResponse"}}},"MetadataFieldDto":{"type":"object","description":"Metadata field associated with the scope parameter","properties":{"id":{"type":"string","format":"uuid","description":"Metadata field ID"},"key":{"type":"string","description":"Metadata field key"},"label":{"type":"string","description":"Metadata field label"},"dataType":{"type":"string","description":"Metadata field data type","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]}},"required":["dataType","id","key","label"]},"ScopeParameterResponse":{"type":"object","description":"Response for a scope parameter","properties":{"id":{"type":"string","format":"uuid","description":"Scope parameter ID"},"name":{"type":"string","description":"Scope parameter name"},"description":{"type":["string","null"],"description":"Scope parameter description"},"fieldType":{"type":"string","description":"Data type of this scope parameter","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]},"state":{"type":"string","description":"Lifecycle state of this scope parameter","enum":["IN_USE","UNUSED","DEPRECATED"]},"required":{"type":"boolean","description":"Whether this scope parameter is required"},"metadataFields":{"type":"array","description":"List of metadata fields associated with the scope parameter","items":{"$ref":"#/components/schemas/MetadataFieldDto"}},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"}},"required":["createdAt","fieldType","id","metadataFields","name","required","state"]},"CreateProductRequest":{"type":"object","description":"Payload used to create a product definition within a specific scope and group of licenses.","properties":{"name":{"type":"string","description":"Product name","minLength":1},"description":{"type":"string","description":"Product description"},"type":{"type":"string","description":"Product type","enum":["main","variant"]},"scopeId":{"type":"string","format":"uuid","description":"Scope ID associated with the product"},"licenseGroupId":{"type":"string","format":"uuid","description":"License group ID associated with the product"},"parentProductId":{"type":"string","format":"uuid","description":"Parent product ID"},"licenseBasePrices":{"type":"array","description":"Define base prices for the product licenses","items":{"$ref":"#/components/schemas/ProductLicenseBasePriceRequest"}}},"required":["licenseBasePrices","licenseGroupId","name","scopeId","type"]},"ProductLicenseBasePriceRequest":{"type":"object","properties":{"validFrom":{"type":"string","format":"date-time","description":"Date/time from which the resource is valid","example":"2026-01-01T00:00:00Z"},"validTo":{"type":"string","format":"date-time","description":"Date/time until which the resource is valid (nullable)","example":"2027-12-31T23:59:59Z"},"licenseId":{"type":"string","format":"uuid","description":"Unique identifier for the license."},"licenseGroupId":{"type":"string","format":"uuid","description":"Unique identifier for the license group."},"basePrice":{"type":"number","description":"Base price of the product license.","example":1099.99},"currency":{"type":"string","description":"Currency ISO code (default: NOK)","enum":["NOK"]},"orderIndex":{"type":"integer","format":"int32","description":"Display order of this base price within the product's license base prices.","example":0,"minimum":0}},"required":["basePrice","currency","licenseGroupId","licenseId","orderIndex"]},"GetResponseProductResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/ProductResponse"}}},"LicenseGroupBaseResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"License group ID"},"name":{"type":"string","description":"License group name"},"description":{"type":["string","null"],"description":"License group description"},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"}},"required":["createdAt","id","name"]},"ProductLicenseBasePriceResponse":{"type":"object","properties":{"validFrom":{"type":"string","format":"date-time","description":"Date/time from which this base price is valid"},"validTo":{"type":["string","null"],"format":"date-time","description":"Date/time until which this base price is valid"},"id":{"type":"string","format":"uuid","description":"Unique identifier for the product license base price entry. Only used for responses."},"licenseId":{"type":"string","format":"uuid","description":"Unique identifier for the license."},"licenseName":{"type":"string","description":"Name of the license."},"licenseGroupId":{"type":"string","format":"uuid","description":"Unique identifier for the license group."},"basePrice":{"type":"number","description":"Base price of the product license."},"currency":{"type":"string","description":"Currency code (default: NOK)"},"orderIndex":{"type":"integer","format":"int32","description":"Display order of this base price within the product's license base prices."}},"required":["basePrice","currency","id","licenseGroupId","licenseId","licenseName","orderIndex","validFrom"]},"ProductResponse":{"type":"object","description":"Response for a product","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the product"},"name":{"type":"string","description":"Name of the product"},"description":{"type":["string","null"],"description":"Description of the product"},"type":{"type":"string","description":"Product type","enum":["main","variant"]},"state":{"type":"string","description":"Lifecycle state of the product","enum":["draft","published"]},"licenseBasePrices":{"type":["array","null"],"description":"Define base prices for the product licenses","items":{"$ref":"#/components/schemas/ProductLicenseBasePriceResponse"}},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the product was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the product was last updated"},"scope":{"$ref":"#/components/schemas/ScopeBaseResponse","description":"Associated scope configuration for the product"},"licenseGroup":{"$ref":"#/components/schemas/LicenseGroupBaseResponse","description":"Associated license group for the product"},"parentProduct":{"type":"null","$ref":"#/components/schemas/ProductWithScopeResponse","description":"Main product information including scope if this product is derived from another"}},"required":["createdAt","id","licenseBasePrices","licenseGroup","name","scope","state","type"]},"ProductWithScopeResponse":{"type":"object","description":"Minimal representation of a base product used in nested responses","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the product"},"name":{"type":"string","description":"Name of the product"},"description":{"type":["string","null"],"description":"Description of the product"},"type":{"type":"string","description":"Product type","enum":["main","variant"]},"state":{"type":"string","description":"Lifecycle state of the product","enum":["draft","published"]},"licenseBasePrices":{"type":["array","null"],"description":"Define base prices for the product licenses","items":{"$ref":"#/components/schemas/ProductLicenseBasePriceResponse"}},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the product was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the product was last updated"},"scope":{"$ref":"#/components/schemas/ScopeBaseResponse","description":"Associated scope configuration for the product"}},"required":["createdAt","id","licenseBasePrices","name","scope","state","type"]},"Asset":{"type":"object","properties":{"fileType":{"type":"string"},"size":{"$ref":"#/components/schemas/Size"},"fileSize":{"type":"integer","format":"int64"},"mimeType":{"type":"string"},"duration":{"type":"integer","format":"int64"}}},"MediaData":{"type":"object","properties":{"id":{"type":"string"},"mediaFamily":{"type":"string"},"mediaType":{"type":"string"},"dateCreated":{"type":"string","format":"date-time"},"dateArchived":{"type":"string","format":"date-time"},"headline":{"type":"string"},"description":{"type":"string"},"credit":{"type":"string"},"distributorName":{"type":"string"},"distributorId":{"type":"string"},"sdlDistributorId":{"type":"integer","format":"int32"},"creator":{"type":"string"},"city":{"type":"string"},"countryName":{"type":"string"},"provinceState":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"},"uniqueItems":true},"datePosted":{"type":"string","format":"date-time"},"owner":{"type":"string"},"category":{"type":"string"},"locationShown":{"type":"array","items":{"type":"string"}},"terms":{"type":"array","items":{"type":"string"}},"persons":{"type":"array","items":{"type":"string"}},"organisations":{"type":"array","items":{"type":"string"}},"events":{"type":"array","items":{"type":"string"}},"jobid":{"type":"string"},"source":{"type":"string"},"instructions":{"type":"string"},"supplementalCategory":{"type":"string"},"supplier":{"type":"string"},"rating":{"type":"number","format":"double"},"usageTerms":{"type":"string"},"imageSupplierImageId":{"type":"string"},"originalFilename":{"type":"string"},"title":{"type":"string"},"orientation":{"type":"string","enum":["portrait","landscape","square"]},"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"},"uniqueItems":true},"systemInstruction":{"type":"array","items":{"type":"string"}},"archive":{"type":"string"}}},"Size":{"type":"object","properties":{"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"}}},"GetResponseMediaPriceResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/MediaPriceResponse"}}},"MediaPriceResponse":{"type":"object","description":"Response containing licenses with price information for a media","properties":{"mediaId":{"type":"string","description":"Media ID for which the price is resolved"},"tenantId":{"type":"string","format":"uuid","description":"Tenant ID associated with the media"},"customerGroupId":{"type":["string","null"],"format":"uuid","description":"Workspace ID (owned by user-api) the prices were resolved for"},"productId":{"type":"string","format":"uuid","description":"Product ID associated with the media"},"prices":{"type":"array","description":"List of price entries for the media","items":{"$ref":"#/components/schemas/PriceEntry"}}},"required":["mediaId","prices","productId","tenantId"]},"PriceEntry":{"type":"object","properties":{"licenseId":{"type":"string","format":"uuid","description":"License ID associated with the price entry"},"licenseName":{"type":"string","description":"License name associated with the price entry"},"licenseDescription":{"type":["string","null"],"description":"License description associated with the price entry"},"licenseGroupId":{"type":"string","format":"uuid","description":"License group ID associated with the price entry"},"licenseBasePrice":{"type":["number","null"],"description":"License base price"},"currency":{"type":["string","null"],"description":"ISO currency code for the license base price","enum":["NOK"]},"validFrom":{"type":["string","null"],"format":"date-time","description":"Start date and time from which the base price is valid"},"validTo":{"type":["string","null"],"format":"date-time","description":"End date and time until which the base price is valid"},"subscription":{"type":"null","$ref":"#/components/schemas/Subscription","description":"Subscription details associated with the license"},"priceList":{"type":"null","$ref":"#/components/schemas/PriceList","description":"Price list applying to this license"}},"required":["licenseGroupId","licenseId","licenseName"]},"PriceList":{"type":"object","properties":{"priceListId":{"type":"string","format":"uuid","description":"Identifier of the price list"},"priceListName":{"type":"string","description":"Name of the price list"},"validFrom":{"type":["string","null"],"format":"date-time","description":"Start date and time from which the price list is valid"},"validTo":{"type":["string","null"],"format":"date-time","description":"End date and time until which the price list is valid"},"priceListItem":{"$ref":"#/components/schemas/PriceListItem","description":"Price list item applying to this license"}},"required":["priceListId","priceListItem","priceListName"]},"PriceListItem":{"type":"object","properties":{"priceListItemId":{"type":"string","format":"uuid","description":"Identifier of the price list item"},"overridePrice":{"type":["number","null"],"description":"Override price for the license (absolute value)"},"discountPercentage":{"type":["number","null"],"description":"Discount percentage to apply to the base price (0-100)"}},"required":["priceListItemId"]},"Subscription":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid","description":"Subscription ID associated with the price entry"},"subscriptionName":{"type":"string","description":"Subscription name associated with the price entry"},"subscriptionType":{"type":"string","description":"Subscription type (enum) describing billing","enum":["time","quota"]},"downloadLimit":{"type":["integer","null"],"format":"int32","description":"Maximum number of downloads allowed for this subscription"},"downloadCount":{"type":"integer","format":"int32","description":"Number of downloads made under this subscription"},"subscriptionPrice":{"type":["number","null"],"description":"Subscription price"},"currency":{"type":"string","description":"ISO currency code for the subscription price (default: NOK)","enum":["NOK"]},"validFrom":{"type":["string","null"],"format":"date-time","description":"Start date and time from which the subscription is valid"},"validTo":{"type":["string","null"],"format":"date-time","description":"End date and time until which the subscription is valid"},"subscriptionLicense":{"$ref":"#/components/schemas/SubscriptionLicense","description":"License and its limits included with this subscription"}},"required":["currency","downloadCount","subscriptionId","subscriptionLicense","subscriptionName","subscriptionType"]},"SubscriptionLicense":{"type":"object","properties":{"subscriptionLicenseId":{"type":"string","format":"uuid","description":"Identifier of the subscription license"},"licenseId":{"type":"string","format":"uuid","description":"Identifier of the license"},"quantityLimit":{"type":["integer","null"],"format":"int32","description":"Maximum download limit for this specific license"}},"required":["licenseId","subscriptionLicenseId"]},"CreatePriceListRequest":{"type":"object","description":"Payload for creating a price list","properties":{"validFrom":{"type":"string","format":"date-time","description":"Date/time from which the resource is valid","example":"2026-01-01T00:00:00Z"},"validTo":{"type":"string","format":"date-time","description":"Date/time until which the resource is valid (nullable)","example":"2027-12-31T23:59:59Z"},"name":{"type":"string","description":"Price list name","minLength":1},"description":{"type":"string","description":"Price list description"},"customerGroupId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) associated with the price list"},"customerGroupName":{"type":"string","description":"Workspace name (owned by user-api), stored for display purposes","maxLength":255,"minLength":0},"productId":{"type":"string","format":"uuid","description":"Product ID associated with the price list"},"items":{"type":"array","description":"List of price list items","items":{"$ref":"#/components/schemas/PriceListItemRequest"},"minItems":1}},"required":["customerGroupId","customerGroupName","items","name","productId"]},"PriceListItemRequest":{"type":"object","description":"Single item within a price list","properties":{"productLicenseBasePriceId":{"type":"string","format":"uuid","description":"Reference to product license base price entry"},"overridePrice":{"type":"number","description":"Override price (mutually exclusive with discountPercentage)","example":199.0,"minimum":0},"discountPercentage":{"type":"number","description":"Discount percentage (0-100, mutually exclusive with overridePrice)","example":10.5,"maximum":200,"minimum":0}},"required":["productLicenseBasePriceId"]},"PriceListItemResponse":{"type":"object","description":"Single item within a price list","properties":{"id":{"type":"string","format":"uuid","description":"Price list item ID"},"productLicenseBasePriceId":{"type":"string","format":"uuid","description":"Reference to product license base price entry"},"overridePrice":{"type":["number","null"],"description":"Override price"},"discountPercentage":{"type":["number","null"],"description":"Discount percentage"},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"}},"required":["createdAt","id","productLicenseBasePriceId"]},"PriceListResponse":{"type":"object","description":"Response for a price list","properties":{"id":{"type":"string","format":"uuid","description":"Price list ID"},"name":{"type":"string","description":"Name of the price list"},"description":{"type":["string","null"],"description":"Description of the price list"},"customerGroupId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) associated with the price list"},"customerGroupName":{"type":"string","description":"Workspace name stored for display; may be stale if the workspace was renamed in user-api"},"productId":{"type":"string","format":"uuid","description":"Product ID associated with the price list"},"productName":{"type":"string","description":"Product name associated with the price list"},"productType":{"type":"string","description":"Product type of the price list","enum":["main","variant"]},"validFrom":{"type":["string","null"],"format":"date-time","description":"Start of validity for this price list"},"validTo":{"type":["string","null"],"format":"date-time","description":"End of validity for this price list"},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"},"items":{"type":"array","description":"Items included in the price list","items":{"$ref":"#/components/schemas/PriceListItemResponse"}}},"required":["createdAt","customerGroupId","customerGroupName","id","items","name","productId","productName","productType"]},"CreateLicenseGroupRequest":{"type":"object","description":"Request for creating a license group with associated scopes","properties":{"name":{"type":"string","description":"License group name","minLength":1},"description":{"type":"string","description":"License group description"},"scopeIds":{"type":"array","description":"List of scope IDs associated with the license group","items":{"type":"string","format":"uuid"}}},"required":["name"]},"GetResponseLicenseGroupResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/LicenseGroupResponse"}}},"LicenseGroupResponse":{"type":"object","description":"Response for a license group with associated scopes","properties":{"id":{"type":"string","format":"uuid","description":"License group ID"},"name":{"type":"string","description":"License group name"},"description":{"type":["string","null"],"description":"License group description"},"scopes":{"type":"array","description":"List of scopes associated with the license group","items":{"$ref":"#/components/schemas/LicenseGroupScopeResponse"}},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"}},"required":["createdAt","id","name","scopes"]},"LicenseGroupScopeResponse":{"type":"object","description":"Response for a license scope associated with a license group","properties":{"scopeId":{"type":"string","format":"uuid","description":"Scope ID"},"scopeType":{"type":["string","null"],"description":"Type of the license scope"},"priority":{"type":"integer","format":"int32","description":"Priority of the license scope"}},"required":["priority","scopeId"]},"CreateLicenseRequest":{"type":"object","description":"Request for creating a license","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"]},"GetResponseLicenseResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/LicenseResponse"}}},"LicenseResponse":{"type":"object","description":"Response for a license","properties":{"id":{"type":"string","format":"uuid","description":"License ID"},"name":{"type":"string","description":"License name"},"description":{"type":["string","null"],"description":"License description"},"licenseGroupId":{"type":"string","format":"uuid","description":"License Group ID"},"createdAt":{"type":"string","format":"date-time","description":"Created at timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Updated at timestamp"}},"required":["createdAt","id","licenseGroupId","name"]},"FinishDownloadRequest":{"type":"object","description":"Ends a download. Safe to repeat. RELEASED is also safe to send when the authorize call failed or timed out","properties":{"downloadId":{"type":"string","format":"uuid","description":"Download id sent to authorize"},"outcome":{"type":"string","description":"COMPLETED when the file was sent (the credit stays used), RELEASED when the download failed (the credit is given back)","enum":["COMPLETED","RELEASED"]}},"required":["downloadId","outcome"]},"AuthorizeDownloadRequest":{"type":"object","description":"Resolves the price for a media and reserves download credits for it","properties":{"downloadId":{"type":"string","format":"uuid","description":"Caller-chosen id for this download, used once. Pass it to release to undo the reserve"},"mediaData":{"$ref":"#/components/schemas/MediaData","description":"Metadata of the media to download"},"workspaceId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) the download is made for"},"licenseId":{"type":"string","format":"uuid","description":"License the user picked."},"quantity":{"type":"integer","format":"int32","default":1,"description":"Credits to reserve. Always 1: one download uses one credit","maximum":1,"minimum":1}},"required":["downloadId","licenseId","mediaData","quantity","workspaceId"]},"AuthorizeDownloadResponse":{"type":"object","description":"Resolved price for a media plus the credits reserved for downloading it","properties":{"downloadId":{"type":"string","format":"uuid","description":"Download id from the request"},"pricing":{"$ref":"#/components/schemas/MediaPriceResponse","description":"Resolved price for the media"},"subscriptionId":{"type":"string","format":"uuid","description":"Subscription the credits were reserved on"},"licenseId":{"type":"string","format":"uuid","description":"License of the price entry the download is made under"},"quantity":{"type":"integer","format":"int32","description":"Credits reserved by this call"},"downloadLimit":{"type":["integer","null"],"format":"int32","description":"Download limit of the subscription"},"downloadCount":{"type":"integer","format":"int32","description":"Download count after this reservation"},"creditsLeft":{"type":["integer","null"],"format":"int32","description":"Credits left after this reservation; null when unlimited"}},"required":["downloadCount","downloadId","licenseId","pricing","quantity","subscriptionId"]},"GetResponseAuthorizeDownloadResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/AuthorizeDownloadResponse"}}},"PatchSubscriptionRequest":{"type":"object","description":"Request for updating a subscription (partial fields allowed)","properties":{"validFrom":{"type":"string","format":"date-time","description":"Date/time from which the resource is valid","example":"2026-01-01T00:00:00Z"},"validTo":{"type":"string","format":"date-time","description":"Date/time until which the resource is valid (nullable)","example":"2027-12-31T23:59:59Z"},"name":{"type":"string","description":"Human readable name for the subscription"},"description":{"type":"string","description":"Detailed description explaining the subscription contents and purpose"},"type":{"type":"string","description":"Type of subscription (enum) affecting billing or behavior","enum":["time","quota"]},"productId":{"type":"string","format":"uuid","description":"Identifier of the product the subscription belongs to"},"customerGroupId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) targeted by this subscription"},"customerGroupName":{"type":"string","description":"Workspace name (owned by user-api), stored for display purposes","maxLength":255,"minLength":0},"licenseGroupId":{"type":"string","format":"uuid","description":"Identifier of the license group applied to this subscription"},"downloadLimit":{"type":"integer","format":"int32","description":"Optional maximum number of downloads permitted for this subscription","minimum":1},"subscriptionPrice":{"type":"number","description":"Price for the subscription in the chosen currency","minimum":0},"currency":{"type":"string","description":"ISO currency code for the subscription price","enum":["NOK"]},"status":{"type":"boolean","description":"Whether the subscription is currently active"},"subscriptionLicenses":{"type":"array","description":"List of license entries (licenseId + quantity) to include in the subscription","items":{"$ref":"#/components/schemas/SubscriptionLicenseRequest"}}}},"PatchScopeParameterRequest":{"type":"object","description":"Request for updating a scope parameter","properties":{"name":{"type":"string","description":"Scope parameter name"},"description":{"type":"string","description":"Scope parameter description"},"fieldType":{"type":"string","description":"Data type of the scope parameter. Only changeable when state is UNUSED. All associated metadata fields must share this type.","enum":["ENUM","MULTI_ENUM","DATE","BOOLEAN","NUMBER","FREE_TEXT"]},"required":{"type":"boolean","description":"A parameter marked as required must be configured during product creation. Only changeable when state is UNUSED."},"state":{"type":"string","description":"State transition for the scope parameter. Allowed transitions: IN_USE → DEPRECATED, DEPRECATED → IN_USE.","enum":["IN_USE","UNUSED","DEPRECATED"]},"metadataFieldIds":{"type":"array","description":"List of metadata field IDs associated with the scope parameter. Only changeable when state is UNUSED.","items":{"type":"string","format":"uuid"}}}},"UpdateProductRequest":{"type":"object","description":"Payload to partially update a product. Only mutable fields are accepted. Product type, parent product, and license group cannot be changed after creation.","properties":{"name":{"type":"string","description":"Product name"},"description":{"type":"string","description":"Product description"},"scopeId":{"type":"string","format":"uuid","description":"Scope ID associated with the product"},"state":{"type":"string","description":"Lifecycle state of the product (draft, published)","enum":["draft","published"]},"licenseBasePrices":{"type":"array","description":"Full desired set of license base prices for the product. Each entry is identified by its `licenseId`/`licenseGroupId` pair, which must be unique within the request. An entry whose pair matches an existing base price updates that price's amount, currency, order and validity in place. An entry whose pair has no existing base price is created. An existing base price whose pair is absent from the list is deleted, unless it is referenced by a price list item, in which case the request is rejected. Omit this field entirely to leave license base prices unchanged. An empty list deletes all base prices, subject to the same reference guard.","items":{"$ref":"#/components/schemas/ProductLicenseBasePriceRequest"}}}},"PatchPriceListRequest":{"type":"object","description":"Payload for updating a price list","properties":{"validFrom":{"type":"string","format":"date-time","description":"Date/time from which the resource is valid","example":"2026-01-01T00:00:00Z"},"validTo":{"type":"string","format":"date-time","description":"Date/time until which the resource is valid (nullable)","example":"2027-12-31T23:59:59Z"},"name":{"type":"string","description":"Price list name"},"description":{"type":"string","description":"Price list description"},"customerGroupId":{"type":"string","format":"uuid","description":"Workspace ID (owned by user-api) associated with the price list"},"customerGroupName":{"type":"string","description":"Workspace name (owned by user-api), stored for display purposes","maxLength":255,"minLength":0},"productId":{"type":"string","format":"uuid","description":"Product ID associated with the price list"},"items":{"type":"array","description":"List of price list items","items":{"$ref":"#/components/schemas/PriceListItemRequest"}}}},"GetResponsePriceListResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/PriceListResponse"}}},"UpdateLicenseGroupRequest":{"type":"object","description":"Request for updating a license group","properties":{"name":{"type":"string"},"description":{"type":"string"},"scopeIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"UpdateLicenseRequest":{"type":"object","description":"Request for updating a license","properties":{"name":{"type":"string"},"description":{"type":"string"}}},"ListResponseSubscriptionResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"Page":{"type":"object","properties":{"offset":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ListResponseScopeBaseWithParentResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/ScopeBaseWithParentResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"ScopeBaseWithParentResponse":{"type":"object","description":"Base response for scope information","properties":{"id":{"type":"string","format":"uuid","description":"Scope ID"},"name":{"type":"string","description":"Scope name"},"description":{"type":["string","null"],"description":"Scope description"},"priority":{"type":"integer","format":"int32","description":"Scope priority"},"type":{"type":"string","description":"Scope type","enum":["primary","secondary"]},"createdAt":{"type":"string","format":"date-time","description":"Scope creation timestamp"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Scope last update timestamp"},"parentScope":{"type":"null","$ref":"#/components/schemas/ScopeBaseResponse","description":"Parent scope information"}},"required":["createdAt","id","name","priority","type"]},"ListResponseScopeParameterResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/ScopeParameterResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"ListResponseProductResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"GetResponseProductWithVariantsResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/ProductWithVariantsResponse"}}},"ProductBaseResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the product"},"name":{"type":"string","description":"Name of the product"},"description":{"type":["string","null"],"description":"Description of the product"},"type":{"type":"string","description":"Product type","enum":["main","variant"]},"state":{"type":"string","description":"Lifecycle state of the product","enum":["draft","published"]},"licenseBasePrices":{"type":["array","null"],"description":"Define base prices for the product licenses","items":{"$ref":"#/components/schemas/ProductLicenseBasePriceResponse"}},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the product was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the product was last updated"}},"required":["createdAt","id","licenseBasePrices","name","state","type"]},"ProductWithVariantsResponse":{"type":"object","description":"Response for a product with its variants","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the product"},"name":{"type":"string","description":"Name of the product"},"description":{"type":["string","null"],"description":"Description of the product"},"type":{"type":"string","description":"Product type","enum":["main","variant"]},"state":{"type":"string","description":"Lifecycle state of the product","enum":["draft","published"]},"licenseBasePrices":{"type":["array","null"],"description":"Define base prices for the product licenses","items":{"$ref":"#/components/schemas/ProductLicenseBasePriceResponse"}},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the product was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the product was last updated"},"scope":{"$ref":"#/components/schemas/ScopeBaseResponse","description":"Associated scope configuration for the product"},"licenseGroup":{"$ref":"#/components/schemas/LicenseGroupBaseResponse","description":"Associated license group for the product"},"parentProduct":{"type":"null","$ref":"#/components/schemas/ProductWithScopeResponse","description":"Main product information including scope if this product is derived from another"},"variantProducts":{"type":["array","null"],"description":"List of variant products derived from this product","items":{"$ref":"#/components/schemas/ProductBaseResponse"}}},"required":["createdAt","id","licenseBasePrices","licenseGroup","name","scope","state","type"]},"ListResponsePriceListResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/PriceListResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"ListResponseMetadataFieldResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/MetadataFieldResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"ListResponseLicenseGroupResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/LicenseGroupResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}},"ListResponseLicenseResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/LicenseResponse"}},"_page":{"$ref":"#/components/schemas/Page"}}}},"securitySchemes":{"bearerAuth":{"type":"http","name":"Authorization","in":"header","scheme":"bearer","bearerFormat":"JWT"}}}}