You can manage issued licenses data and get the list of downloadable files via API at marketplace.cs-cart.com/api/4.0/licenses.

Request for a list of licenses

The request for a list of licenses looks like this:

GET http://marketplace.test/api.php?_d=4.0/licenses
Content-Type: application/json
Authorization: Basic c2thdGVyNEBjcy1jYXJ0LmNvbTpvMmszNzIycTVzNnFJTVo5M0RCNzgxWUZwYTY4ZjRCMw==

Response:

    { 
        "purchase_id": 3, 
        "order_id": 5517, 
        "product_id": 2652,
        "created_at": 1595321424, 
        "expires_at": 0, 
        "file_id": 874, 
        "license_number": "CSC-12A4-ABCD-ABCD-1234", 
        "domain_names": "", 
        "email": "[email protected]", 
        "user_id": 2947 
    }, 
    ... 
]

To get one specific license you need to send a request with the license ID. 

For example: http://marketplace.test/api.php?_d=4.0/licenses/{id}

You can also use various parameters in the URL to search for licenses: user_id, product_id, page, order_id, items_per_page, license_number, email, domain_name.

For example: http://marketplace.test/api.php?_d=4.0/licenses&user_id=2947

Editing domains and a license expiration date: expiration date in the timestamp format

The date editing request looks like this:

PUT http://marketplace.test/api.php?_d=4.0/licenses/{id}
Content-Type: application/json
Authorization: Basic c2thdGVyNEBjcy1jYXJ0LmNvbTpvMmszNzIycTVzNnFJTVo5M0RCNzgxWUZwYTY4ZjRCMw==

Response:

    "expires_at": "1919710900", 
    "domain_name": "test.cs-cart.io" 
}

Both parameters can be passed in separate requests. You can pass both a string and an array in domain_name:

    "domain_name": [ 
        "test1.cs-cart.io", 
        "test2.cs-cart.io", 
        "test3.cs-cart.io" 
        ] 
}

Getting a list of files and links to download the package file:

You need to add the get_all_packages=1 to a request for a list of licenses:

GET http://marketplace.test/api.php?_d=4.0/licenses&get_all_packages=1
Content-Type: application/json
Authorization: Basic c2thdGVyNEBjcy1jYXJ0LmNvbTpvMmszNzIycTVzNnFJTVo5M0RCNzgxWUZwYTY4ZjRCMw==

Response:

    { 
        "purchase_id": 3, 
        "order_id": 5517, 
        "product_id": 2652, 
        "created_at": 1595321424, 
        "expires_at": 1919710900, 
        "file_id": 874, 
        "license_number": "CSC-12A4-ABCD-ABCD-1234", 
        "domain_names": [ 
            "test1.cs-cart.io", 
            "test2.cs-cart.io", 
            "test3.cs-cart.io" 
        ], 
        "email": "[email protected]", 
        "user_id": 2947, 
        "packages": [ 
            { 
                "file_id": 874, 
                "file_path": "csc_addons_manager-1.1-1578921387.zip", 
                "file_size": 23456, 
                "status": "A", 
                "is_upgrade": false, 
                "from_version": null, 
                "to_version": null, 
                "timestamp": 1578921387, 
                "file_name": "1.1", 
                "url": "https://marketplace.test.io/index.php?dispatch=product_packages.get_package&package_id=874&product_id=2652&license_number=CSC-12A4-ABCD-ABCD-1234" 
            } 
        ] 
    }, 
    ... 
]