Skip to content

Product

sadhasivam edited this page Sep 10, 2024 · 1 revision

Add Product

URL: /api/admin/products/add

Method: POST

Description: Adds a new product.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required The API key secret used for authentication.
product_title String Required The title of the product.
product_sku String Required The SKU (Stock Keeping Unit) of the product.
product_status Integer Required The status of the product (integer value between 0 and 2).
product_description String Optional A description of the product.
product_url_homepage String Optional The URL of the product homepage.
product_url_download String Optional The URL for downloading the product.
product_version String Optional The version of the product.
product_envato_id Integer Optional The Envato ID of the product (should be an integer if provided).

Response

{
    "success": true,
    "message": "Product and the Product's details has been added",
    "data": ""
}

View Products

URL: /api/admin/viewproducts

Method: GET

Description: Displays the list of products.

Parameters

This endpoint does not require any parameters.

Response

{
    "success": true,
    "message": "All the Details of the Products registered so far are displayed.",
    "data": [
        {
            "product_id": 263,
            "product_title": "Product One",
            "product_sku": "SKU001",
            "product_status": 1,
            "licenses_count": 10,
            "installations_count": 5,
            "versions": "1.0.0",
            "versions_count": 2
        },
        {
            "product_id": 242,
            "product_title": "Product Two",
            "product_sku": "SKU002",
            "product_status": 1,
            "licenses_count": 20,
            "installations_count": 15,
            "versions": "1.2.0",
            "versions_count": 3
        },
    ]
}

Delete Product

URL: /api/admin/products/delete

Method: POST

Description: Deletes a product.

Parameters

Parameter Type Required/Optional Description
product_id Integer Required The ID of the product to be deleted.
api_key_secret String Required The API key secret used for authentication.

Response

{
    "success":true,
    "message":"Product Deleted Successfully",
    "data":1
}

Edit Product

URL: /api/admin/products/edit

Method: POST

Description: Updates product details.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required The API key secret used for authentication.
product_id Integer Required The ID of the product to be updated.
product_title String Required The title of the product.
product_sku String Required The SKU (Stock Keeping Unit) of the product.
product_status Integer Required The status of the product (integer value between 0 and 2).
product_description String Optional A description of the product.
product_url_homepage String Optional The URL of the product homepage.
product_url_download String Optional The URL for downloading the product.
product_version String Optional The version of the product.
product_envato_id Integer Optional The Envato ID of the product (should be an integer if provided).

Response

{
    "success":true,
    "message":"Product Details updated Successfully",
    "data":""
}

Get Product for Editing

URL: /api/admin/product/{product_id}

Method: GET

Description: Fetches product details for editing.

Parameters

Parameter Type Required/Optional Description
product_id Integer Required The ID of the product to retrieve.

Response

{
    "success": true,
    "data": {
        "product": {
            "product_id": 2,
            "product_title": "Product 1",
            "product_description": "",
            "product_sku": "ersys45ys",
            "product_url_homepage": "",
            "product_url_download": "",
            "product_date": "2024-08-19",
            "product_version": "",
            "product_envato_id": null,
            "product_status": 1,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}

View Product Details

URL: /api/admin/productView/{product_id}

Method: GET

Description: Displays detailed information about a product.

Parameters

Parameter Type Required/Optional Description
id Integer Required The ID of the product to retrieve details for.

Response

{
    "success": true,
    "message": "Product details are displayed here",
    "data": {
        "product_id": 242,
        "product_title": "wrwtaergaerg",
        "product_sku": "ersys45ys",
        "product_url_homepage": "",
        "product_url_download": "",
        "product_status": 1,
        "versions": null
    }
}

View Product Installations

URL: /api/admin/productInstallations/{product_id}

Method: GET

Description: Displays the installations associated with a product.

Parameters

Parameter Type Required/Optional Description
id Integer Required The ID of the product to retrieve Product Installations.

Response

{
    "success": true,
    "message": "All product installations are displayed here",
    "data": [
        {
            "installation_id": 10001,
            "product_id": 150,
            "client_id": 2001,
            "license_code": "FAKECODE001",
            "installation_domain": "example.localhost/fakepath/public",
            "installation_ip": "192.168.1.1",
            "installation_date": "2023-09-01",
            "installation_status": 1,
            "client_email": "client1@example.com",
            "clients": {
                "client_name": "John Doe",
                "client_company": "Example Corp"
            },
            "license": {
                "license_id": 3001,
                "license_code": "FAKECODE001"
            }
        },
        {
            "installation_id": 10002,
            "product_id": 150,
            "client_id": 2002,
            "license_code": "FAKECODE002",
            "installation_domain": "demo.localhost/fakedemo/public",
            "installation_ip": "10.0.0.1",
            "installation_date": "2023-08-15",
            "installation_status": 1,
            "client_email": "client2@example.com",
            "clients": {
                "client_name": "Jane Smith",
                "client_company": "Demo LLC"
            },
            "license": {
                "license_id": 3002,
                "license_code": "FAKECODE002"
            }
        },
    ]
}

View Product Licenses

URL: /api/admin/productLicenses/{product_id}

Method: GET

Description: Displays the licenses associated with a product.

Parameters

Parameter Type Required/Optional Description
id Integer Required The ID of the product to retrieve Product Licenses.

Response

{
    "success": true,
    "message": "All product installations are displayed here",
    "data": [
    {
        "license_id": 10001,
        "product_id": 150,
        "client_id": 2001,
        "license_code": "FAKECODE1001",
        "license_order_number": "ORDER12345",
        "license_date": "2024-08-01",
        "license_expire_date": "2025-08-01",
        "license_updates_date": "2025-09-01",
        "license_support_date": "2025-09-01",
        "license_status": 1,
        "client_email": "client1@example.com",
        "installation_counts": 5,
        "latest_call_backs": null,
        "license_order_url": "<a id=\"href_link\" href=\"https://example.com/invoice/orders/license/ORDER12345\">ORDER12345</a>",
        "clients": {
            "client_name": "John Doe",
            "client_company": "Example Corp"
        }
    },
    {
        "license_id": 10002,
        "product_id": 151,
        "client_id": 2002,
        "license_code": "FAKECODE1002",
        "license_order_number": "ORDER67890",
        "license_date": "2024-09-15",
        "license_expire_date": "2025-09-15",
        "license_updates_date": "2025-10-15",
        "license_support_date": "2025-10-15",
        "license_status": 0,
        "client_email": "client2@example.com",
        "installation_counts": 3,
        "latest_call_backs": "2024-09-20",
        "license_order_url": "<a id=\"href_link\" href=\"https://example.com/invoice/orders/license/ORDER67890\">ORDER67890</a>",
        "clients": {
            "client_name": "Jane Smith",
            "client_company": "Demo LLC"
        }
    }
]

}

View Product Versions

URL: /api/admin/productVersions/{product_id}

Method: GET

Description: Displays the versions associated with a product.

Parameters

Parameter Type Required/Optional Description
id Integer Required The ID of the product to retrieve Product Versions.

Response

{
   {
    "success": true,
    "message": "All product versions are displayed here",
    "data": [
            {
                "version_id": 62991,
                "product_id": 90,
                "version_number": "v7.1.6",
                "version_date": "2024-01-10",
                "version_upgrade_count": 0,
                "version_status": 1
            },
            {
                "version_id": 62692,
                "product_id": 90,
                "version_number": "v7.1.5",
                "version_date": "2024-01-04",
                "version_upgrade_count": 0,
                "version_status": 1
            },
    ]

}

Add Afu Product

URL: /api/admin/products/UpdateAdd

Method: POST

Description: Adds a new Afu product.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required The secret key for API authentication.
product_id Integer Optional The ID of the product (used for updates).
product_title String Required The title of the product.
product_sku String Required The SKU (Stock Keeping Unit) of the product.
product_short_description String Optional A short description of the product.
product_full_description String Optional A detailed description of the product.
product_key String Required A key associated with the product.
product_status Integer Required The status of the product. Valid values are 0, 1, or 2.
product_url_homepage String Optional The URL of the product homepage.
product_url_order String Optional The URL where the product can be ordered.
product_price Decimal Optional The price of the product.
product_max_active_versions Integer Optional The maximum number of active versions allowed for the product.

Response

{
    "success": true,
    "message": "Product and the Product's details has been added",
    "data": ""
}

Delete Afu Product

URL: /api/admin/products/UpdateDelete

Method: POST

Description: Deletes or updates a product.

Parameters

Parameter Type Required/Optional Description
product_id Integer Required The ID of the product to be deleted.
api_key_secret String Required The secret key for API authentication.

Response

{
    "success":true,
    "message":"Product Deleted Successfully",
    "data":1
}

Update Afu Product

URL: /api/admin/products/UpdateEdit

Method: POST

Description: Updates an existing product.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required The secret key for API authentication.
product_id Integer Optional The ID of the product (used for updates).
product_title String Required The title of the product.
product_sku String Required The SKU (Stock Keeping Unit) of the product.
product_short_description String Optional A short description of the product.
product_full_description String Optional A detailed description of the product.
product_key String Required A key associated with the product.
product_status Integer Required The status of the product. Valid values are 0, 1, or 2.
product_url_homepage String Optional The URL of the product homepage.
product_url_order String Optional The URL where the product can be ordered.
product_price Decimal Optional The price of the product.
product_max_active_versions Integer Optional The maximum number of active versions allowed for the product.

Response

{
    "success":true,
    "message":"Product Details updated Successfully",
    "data":""
}

Get AFU Products

URL: /api/admin/afuProducts

Method: GET

Description: Retrieves a list of products.

Parameters

This endpoint does not require any parameters.

Response

{
    "success": true,
    "message": "",
    "data": [
        {
                "product_id": 259,
                "product_title": "bhjbvvg",
                "product_sku": "bsygcjhsdbds",
                "product_short_description": "",
                "product_full_description": "",
                "product_url_homepage": "https:\/\/www.demo.com",
                "product_url_order": "",
                "product_price": 0,
                "product_key": "fnmF01hSfDMGwQo",
                "product_max_active_versions": 0,
                "product_date": "2024-08-22",
                "product_status": 1,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            },
            {
                "product_id": 257,
                "product_title": "weyudgudbjadlkj",
                "product_sku": "keykeybdhjsb",
                "product_short_description": "",
                "product_full_description": "",
                "product_url_homepage": "https:\/\/www.demo.com",
                "product_url_order": "",
                "product_price": 0,
                "product_key": "rqrvFdmabdsTPtJi",
                "product_max_active_versions": 0,
                "product_date": "2024-08-22",
                "product_status": 1,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            },
            {
    ]
}

Clone this wiki locally