ScriptX logotype
  • Getting started
  • Documentation
  • Samples
  • Pricing
Free Trial Downloads
  • Home
  • Getting started
  • Documentation
  • Samples
  • Pricing
Developers ›  Knowledge Bank ›  Technical Reference ›  ScriptX.Services ›  Web ServiceAPI Reference ›  Licensing ›  licensing (POST)

licensing (POST)

{server}/api/v1/licensing

Description

Install/update a client-side license for ScriptX.Services for Windows PC. If sent to ScriptX.Services for Cloud or ScriptX.Services for On-Premise Devices, request parameters are ignored and the license details for the already installed license will be returned.

See also the OpenAPI (Swagger) definition.

No authorization header is required for this API call.

Applies to:

  • ScriptX.Services for Windows PC

Request parameters


ClientLicense {
    guid (string, optional),
    url (string, optional),
    revision (integer, optional)
}

ClientLicense:
guid (string, optional;)
The Guid for the license to be installed or updated.
url (string, required)
Location of the license. If the value "warehouse" is used the MeadCo license service is contacted for the license.
revision (integer, optional)
Revision number of the license to be installed.

Response model


License {
    guid (string, optional),
    company (string, optional),
    companyHomePage (string, optional),
    from (string, optional),
    to (string, optional),
    options (LicenseOptions, optional),
    domains (Array[string], optional)
}

LicenseOptions {
    basicHtmlPrinting (boolean, optional),
    advancedPrinting (boolean, optional),
    enhancedFormatting (boolean, optional),
    printPdf (boolean, optional),
    printRaw (boolean, optional)
}

License:
guid (string, optional)
Confirms the license identifier GUID installed or updated.
company (string, optional)
Name of the company or organisation to whom this license is assigned.
companyHomePage (string, optional)
URL of company or organisation website home page.
from (string, optional)
Start date of license in ISO date-time format eg. 2017-02-23T00:00:00+00:00.
to (string, optional)
End date of license in ISO date-time format eg. 2017-02-23T00:00:00.
options (LicenseOptions, optional)
Options for this license as defined by the LicenseOptions class.
domains (Array[string], optional)
Domains for which this license is valid. Only requests from licensed domains will be processed by the ScriptX.Services server.
LicenseOptions:
basicHtmlPrinting (boolean, optional)
Indicates whether the license (as specified in the request Authorisation header) is valid for basic HTML printing.
advancedPrinting (boolean, optional)
Indicates whether the license (as specified in the request Authorisation header) is valid for advanced printing options.
enhancedFormatting (boolean, optional)
Indicates whether the license (as specified in the request Authorisation header) is valid for enhanced formatting options.
printPdf (boolean, optional)
Indicates whether the license (as specified in the request Authorisation header) is valid for printing PDF documents.
printRaw (boolean, optional)
Indicates whether the license (as specified in the request Authorisation header) is valid for direct (RAW) printing.

Example usage




<script type="text/javascript">
    const requestData = {
        "guid": "8f351de0-5990-45c3-8fd2-8037b878939f",
        "url": "warehouse",
        "revision": 0
    };

    const servicesLocalURL = "http://127.0.0.1:41191";
 
    fetch(`${servicesLocalURL}/api/v1/licensing`, {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        body: JSON.stringify(requestData)
    })
    .then(response => {
        if (!response.ok) {
            throw new Error('Network response was not ok');
        }
        return response.json();
    })
    .then(data => {
        // do something with the response license information
        const printingLicensedForThisDomain = data.domains.some(domain => domain === window.location.hostname);
        if (printingLicensedForThisDomain) {
            console.log("Printing is licensed for this domain.");
        } else {
            console.log("Printing is not licensed for this domain.");
        }
    })
    .catch(error => {
        console.error('There has been a problem with your fetch operation:', error);
    });
</script>





Response 
Response headers
  • Knowledge Bank
  • 'How To' Guides
    • ScriptX.Services
      • Introduction
      • Getting started
      • Evaluate with modern code
      • Maintaining investment in current code
        • Stage 1: Adding UI
        • Stage 2: Printing with ScriptX.Services
        • Stage 3: Summary and review
        • Stage 4: Error reporting
        • Stage 5: Prompted printing
        • Stage 6: Preparing for advanced uses
        • Stage 7: WaitForSpoolingComplete
        • Stage 8: Recommendations for some common issues
      • Printing with the API
      • MeadCoScriptXJS Library
      • Installing ScriptX.Services
        • For Windows PC
        • For On Premise Devices hosted on Windows Server
        • For On Premise Devices hosted on Windows 10/11
        • Configure options For On Premise Devices
        • Cloud
      • Orchestrator
      • Debugging
      • License deployment
        • For Windows PC
        • For On Premise Devices
      • Samples
        • Configure for Windows PC
        • Configure for On Premise
        • Configure for Cloud
    • Security Manager
      • Deploying a license or revision
    • ScriptX.Add-on
      • Introduction
      • Installing ScriptX on client PCs
      • Basic printing with ScriptX
      • Advanced printing features
      • Backwards compatibility
      • How to check if ScriptX is installed
      • License deployment
      • Quick start with Visual Studio
        • ASP.NET MVC
        • ASP.NET Web Forms
      • Nuget Packages
        • MeadCoScriptXJS Library
        • Installer helpers
        • ASP.NET WebForms Controls
        • Helpers for ASP.NET MVC
      • Client-side printing samples
  • Technical Reference
    • ScriptX.Services
      • Web service API
        • Service Description
          • (GET)
        • Licensing
          • licensing (GET)
          • licensing (POST)
          • licensing/ping (GET)
        • Printer
          • settings (GET)
          • current (GET)
          • current (PUT)
          • connection (PUT)
          • connection (DELETE)
        • PrintHtml
          • settings (GET)
          • deviceinfo (GET)
          • htmlPrintDefaults (GET)
          • print (POST)
          • status (GET)
          • download (GET)
          • canceljob (PUT)
        • PrintPdf
          • print (POST)
          • status (GET)
          • download (GET)
        • PrintDirect
          • print (POST)
      • Orchestrator API
        • v1
          • GET
        • v2
          • PUT
          • GET
      • ScriptX.Services compatibility roadmap
    • Security Manager
      • How it works
      • License Expiry
      • Testing for a valid license
      • About the license file (.mlf)
        • LICENSE
        • APPLICENSE
        • TITLE
        • DOMAINS
        • DOMAIN
        • PERMISSION
      • API
        • Apply
        • License
        • result
        • validLicense
    • ScriptX.Add-on
      • factory
        • baseUrl
        • ComponentVersionString
        • IsUniqueIDAvailable
        • OnDocumentComplete
        • relativeUrl
        • ResetUniqueID
        • ScriptXVersion
        • SecurityManagerVersion
        • Shutdown
        • UniqueID
      • printing
        • AddPrinterConnection
        • BatchPrintPDF
        • BatchPrintPDFEx
        • bottomMargin
        • collate
        • copies
        • currentPrinter
        • DefaultPrinter
        • disableUI
        • duplex
        • duplex2
        • EnumJobs
        • EnumPrinters
        • footer
        • GetJobsCount
        • GetMarginMeasure
        • header
        • headerFooterFont
        • IsSpooling
        • IsTemplateSupported
        • leftMargin
        • onafterprint
        • onbeforeprint
        • onbeforeunload
        • onpagesetup
        • onuserpagesetup
        • onuserprint
        • onuserprintpreview
        • orientation
        • OwnQueue
        • pageHeight
        • PageSetup
        • pageWidth
        • paperSize
        • paperSource
        • paperSource2
        • portrait
        • Preview
        • Print
        • printBackground
        • printer
        • PrintHTML
        • PrintHTMLEx
        • PrintPDF
        • PrintSetup
        • printToFileName
        • RemovePrinterConnection
        • rightMargin
        • SetMarginMeasure
        • SetPageRange
        • SetPreviewZoom
        • SetPrintScale
        • Sleep
        • templateURL
        • topMargin
        • TotalPrintPages
        • unprintableBottom
        • unprintableLeft
        • unprintableRight
        • unprintableTop
        • WaitForSpoolingComplete
      • printerControl
        • attributes
        • Bins
        • Forms
        • isLocal
        • isNetwork
        • isShared
        • Jobs
        • location
        • name
        • Pause
        • port
        • Purge
        • Resume
        • serverName
        • shareName
        • status
      • Job
        • Delete
        • Pause
        • Restart
        • Resume
      • enhancedFormatting
        • allFooterHeight
        • allHeaderHeight
        • allPagesFooter
        • allPagesHeader
        • extraFirstFooterHeight
        • extraFirstPageFooter
        • firstFooterHeight
        • firstHeaderHeight
        • firstPageFooter
        • firstPageHeader
        • pageRange
        • printingPass
      • rawPrinting
        • printer
        • printDocument
        • printString
    • Change and history logs
    • Articles
      • v1.15.x ScriptX Client Library
      • Dialogs with ScriptX.Services
      • Accessing protected content
      • Long term servicing (LTS)
 
ScriptX logotype
Home Getting started Documentation Samples Contact us

© 2025 Mead & Co Limited.

Follow us:
LinkedIn   GitHub
X

Warning:

This ScriptX.Add-on sample can only be viewed using Internet Explorer.