# API: Remove Order Draft discount

# removeOrderDraftDiscount

Removes discount applied to order draft

# Required parameters

Parameter Description
id Draft ID

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=removeOrderDraftDiscount&id=ID

# PHP Samples

# Response

{
    "success": true,
    "draft": {
        "services": {
            "2": {
                "product_id": "7063",
                "cycle": "Once",
                "parent_id": 0,
                "category_id": "73",
                "domain": "",
                "billingtype": "PrePay",
                "customdata": [],
                "qty": 1,
                "config": [],
                "domainoptions": {
                    "register": "0",
                    "subdomain": "",
                    "owndomain": false,
                    "owndomainwithus": false,
                    "allowownoutside": false,
                    "hostname": false
                },
                "p_options": 0,
                "contract_id": "0",
                "id": "7063",
                "name": "Softaculous NOC - webuzo",
                "_name": "Softaculous NOC - webuzo",
                "category_name": "Software Licenses",
                "_category_name": "Software Licenses",
                "prorata_amount": false,
                "prorata_date": false,
                "order_date": "2021-09-27 05:00:39",
                "price": 1,
                "price_today": 1,
                "recurring": "once",
                "setup": 0,
                "tax": "0",
                "tax_group_id": "1",
                "full_month": 0,
                "period": {
                    "from": "0000-00-00",
                    "to": "0000-00-00"
                },
                "product": {
                    "id": "7063",
                    "category_id": "73",
                    "type": "5",
                    "name": "Softaculous NOC - webuzo",
                    "description": "",
                    "visible": "1",
                    "domain_options": "0",
                    "stock": "0",
                    "qty": "1",
                    "autosetup": "0",
                    "subdomain": "",
                    "owndomain": "0",
                    "owndomainwithus": "0",
                    "tax": "0",
                    "tax_group_id": "1",
                    "upgrades": "",
                    "sort_order": "6",
                    "client_limit": "0",
                    "hostname": "0",
                    "autohostname": "",
                    "username_generation": "",
                    "p_options": "0",
                    "code": "",
                    "contract_id": "0",
                    "layout": "left",
                    "metadata": [],
                    "hash": "160c965e5f629837dd05aa703f427a5d",
                    "rel": "Product",
                    "paytype": "Once",
                    "m_setup": 0,
                    "q_setup": 0,
                    "s_setup": 0,
                    "a_setup": 0,
                    "b_setup": 0,
                    "t_setup": 0,
                    "p4_setup": 0,
                    "p5_setup": 0,
                    "d_setup": 0,
                    "w_setup": 0,
                    "h_setup": 0,
                    "m": 1,
                    "q": 0,
                    "s": 0,
                    "a": 0,
                    "b": 0,
                    "t": 0,
                    "p4": 0,
                    "p5": 0,
                    "d": 0,
                    "w": 0,
                    "h": 0,
                    "m_enabled": "0",
                    "q_enabled": "0",
                    "s_enabled": "0",
                    "a_enabled": "0",
                    "b_enabled": "0",
                    "t_enabled": "0",
                    "p4_enabled": "0",
                    "p5_enabled": "0",
                    "d_enabled": "0",
                    "w_enabled": "0",
                    "h_enabled": "0",
                    "ptype": "Other",
                    "product_id": "7063",
                    "tag_name": "Softaculous NOC - webuzo",
                    "tag_description": "",
                    "category_name": "Software Licenses",
                    "template": "cart_vps",
                    "ctype": "wizard",
                    "slug": "software-licenses",
                    "module": "328",
                    "main": "1",
                    "server": {
                        "536": "536"
                    },
                    "options": {
                        "Product": "Webuzo",
                        "Server IP": "",
                        "The period to renew": "1 month",
                        "Server type": "Dedicated",
                        "E-mail": "",
                        "Auto renew": "Yes",
                        "Virtualizor: Number of VPS": "",
                        "Virtualizor: Type of license": "Premium",
                        "Webuzo: Type of license": "mini_c",
                        "Softaculous: Buy_sitepad": "0"
                    },
                    "modname": "Softaculous NOC",
                    "filename": "class.softaculousnoc.php",
                    "domain_op": [],
                    "free_domain": "0",
                    "emails": {
                        "AfterModuleTerminate": "0",
                        "after_accountinsert": "0",
                        "ClientAfterPackageChangeSuccess": "0",
                        "ProductAccountCreated": "0",
                        "remindNextDueDate": "0",
                        "StaffAfterPackageChangeFailed": "0",
                        "StaffAfterPackageChangeSuccess": "0",
                        "SuspendAccount": "0",
                        "UnsuspendAccount": "0"
                    },
                    "tags": [],
                    "metrics": [],
                    "out_of_stock": false,
                    "service_type": "Hosting",
                    "prices": [
                        {
                            "id": 47439,
                            "rel": "Product",
                            "rel_id": "7063",
                            "type": "m",
                            "price": "1.00"
                        },
                        {
                            "id": 47440,
                            "rel": "Product",
                            "rel_id": "7063",
                            "type": "m_setup",
                            "price": "0.00"
                        },
                        {
                            "id": 47441,
                            "rel": "Product",
                            "rel_id": "7063",
                            "type": "m_upgrade",
                            "price": "0.00"
                        }
                    ],
                    "billingtype": "PrePay",
                    "currency_checked": true
                },
                "category": {
                    "id": "73",
                    "parent_id": "0",
                    "contains": "products",
                    "module": "0",
                    "name": "Software Licenses",
                    "description": "",
                    "visible": "0",
                    "sort_order": "61",
                    "template": "cart_vps",
                    "ctype": "wizard",
                    "ptype": "5",
                    "slug": "software-licenses",
                    "opconfig": [],
                    "scenario_id": "1",
                    "tag_name": "Software Licenses",
                    "tag_description": ""
                },
                "addons": [],
                "customizations": {
                    "2253": {
                        "id": "2253",
                        "type": "input",
                        "required": 0,
                        "name": "Server IP",
                        "key": "",
                        "variable": "serverip",
                        "description": "",
                        "category": "",
                        "product_id": "7063",
                        "copy_of": "2253",
                        "options": 2,
                        "config": {
                            "hidden": false
                        },
                        "sort_order": "1",
                        "group_id": "0",
                        "admin_access": "",
                        "admin_team_access": "",
                        "admin_description": "",
                        "ftype": "input",
                        "configtemplates": {
                            "adminlist": "\/var\/www\/public\/includes\/libs\/configoptions\/adminlist.tpl",
                            "cart": "\/var\/www\/public\/includes\/libs\/configoptions\/input\/cart.tpl",
                            "accounts": "\/var\/www\/public\/includes\/libs\/configoptions\/input\/accounts.tpl",
                            "clientarea": "\/var\/www\/public\/includes\/libs\/configoptions\/input\/clientarea.tpl",
                            "upgrades": "\/var\/www\/public\/includes\/libs\/configoptions\/input\/upgrades.tpl",
                            "clientedit": "\/var\/www\/public\/includes\/libs\/configoptions\/input\/clientedit.tpl"
                        },
                        "_name": "Server IP",
                        "_description": "",
                        "hasQty": false,
                        "typeconf": {
                            "group": "input",
                            "type": "input",
                            "langid": "inputfield",
                            "description": "inputfield-description",
                            "options": [
                                "showcart"
                            ],
                            "info": {
                                "pricing": false,
                                "subitems": false,
                                "data": true,
                                "json": true,
                                "clientedit": true,
                                "searchable": true,
                                "adminaccess": true,
                                "encrypt": false,
                                "multiitems": false,
                                "validation": false,
                                "setval": false
                            },
                            "templates": {
                                "Input Settings": "\/var\/www\/public\/includes\/libs\/configoptions\/input\/settings.tpl"
                            }
                        },
                        "items": {
                            "10793": {
                                "id": "10793",
                                "category_id": "2253",
                                "name": "Server IP",
                                "variable_id": "",
                                "sort_order": "1",
                                "options": 2,
                                "group_id": "0",
                                "copy_of": "10793",
                                "description": "",
                                "rel": "",
                                "paytype": "",
                                "m_setup": "",
                                "q_setup": "",
                                "s_setup": "",
                                "a_setup": "",
                                "b_setup": "",
                                "t_setup": "",
                                "p4_setup": "",
                                "p5_setup": "",
                                "d_setup": "",
                                "w_setup": "",
                                "h_setup": "",
                                "m": "",
                                "q": "",
                                "s": "",
                                "a": "",
                                "b": "",
                                "t": "",
                                "p4": "",
                                "p5": "",
                                "d": "",
                                "w": "",
                                "h": "",
                                "m_enabled": "",
                                "q_enabled": "",
                                "s_enabled": "",
                                "a_enabled": "",
                                "b_enabled": "",
                                "t_enabled": "",
                                "p4_enabled": "",
                                "p5_enabled": "",
                                "d_enabled": "",
                                "w_enabled": "",
                                "h_enabled": "",
                                "_name": "Server IP",
                                "_description": "",
                                "recurring": "free",
                                "price": 0,
                                "setup": 0,
                                "fee": 0,
                                "upgrade_fee": 0,
                                "unit_price": 0,
                                "_price": 0,
                                "_fee": 0,
                                "_setup": 0,
                                "_unit_price": 0,
                                "cycle": "once",
                                "currency_checked": true,
                                "qty": 1,
                                "related_item": 2,
                                "total": 0,
                                "price_today": 0,
                                "prorata_amount": false,
                                "prorata_date": false,
                                "fullname": "Server IP: ",
                                "_fullname": "Server IP: ",
                                "unitprice": 0,
                                "billingtype": "PrePay",
                                "type": "input",
                                "old": [],
                                "full_month": 0
                            }
                        },
                        "currency_checked": true,
                        "qty": 1,
                        "data": {
                            "10793": "1.2.3.4"
                        },
                        "values": {
                            "10793": 1
                        },
                        "price": 0,
                        "recurring": [],
                        "total": "0.00",
                        "discount": "0.00",
                        "cost": "0.00"
                    }
                },
                "total": {
                    "total": 1,
                    "recurring": [],
                    "discount": "0.00",
                    "recurring_discount": [],
                    "discount_details": [],
                    "cost": "1.00",
                    "setup": 0
                }
            }
        },
        "addons": [],
        "domains": [],
        "customizations": {
            "2": {
                "2253": {
                    "10793": {
                        "val": "1.2.3.4",
                        "qty": 1,
                        "variable": "serverip",
                        "type": "input",
                        "customdata": []
                    }
                }
            }
        },
        "dom_customizations": [],
        "id": 251,
        "client_id": 239,
        "module": 0,
        "date": "2021-09-27 05:00:39",
        "discount": "",
        "scenario_id": 0,
        "staff_member_id": 0,
        "contract_id": "0",
        "commitment_date": "",
        "affiliate_id": 0,
        "metadata": {
            "recipients": ""
        },
        "estimate_id": "0",
        "options": {
            "confirm_email": true,
            "generate_invoice": true,
            "send_invoice": true,
            "override_recipients": false
        },
        "available_recipients": [
            {
                "id": "239",
                "group_id": "0",
                "email": "[email protected]",
                "password": "e4153b2e4e054459e4a220d9d8d23b9c",
                "lastlogin": "2022-07-12 04:50:43",
                "ip": "172.20.0.1",
                "host": "172.20.0.1",
                "status": "Active",
                "loginattempts": "0",
                "mfamodule": "0",
                "brand_id": "1",
                "browser": [],
                "parent_id": "0",
                "firstname": "John",
                "lastname": "Doe",
                "companyname": "",
                "address1": "",
                "address2": "",
                "city": "",
                "state": "Alabama",
                "postcode": "",
                "country": "US",
                "phonenumber": "",
                "datecreated": "2021-06-22",
                "notes": "",
                "language": "english",
                "company": "0",
                "credit": "0.00",
                "taxexempt": "0",
                "latefeeoveride": 0,
                "overideautosusp": "0",
                "taxrateoverride": "0",
                "taxrate": "0",
                "cardtype": "Visa",
                "cardnum": "",
                "expdate": "",
                "overideduenotices": false,
                "disableemails": "0",
                "client_id": "239",
                "currency_id": "0",
                "affiliate_id": "",
                "group_name": "None",
                "group_color": "#000000",
                "billing_contact_id": "0",
                "cardcreated": "2021-08-06 09:43:26",
                "cardupdated": "2021-08-26 07:33:00",
                "brand": "Default",
                "mobilephone": "",
                "countryname": "United States",
                "assigned_affiliate": false
            }
        ],
        "price": {
            "total": "1.00",
            "recurring": [],
            "discount": "0.00",
            "recurring_discount": [],
            "discount_details": [],
            "cost": "1.00",
            "setup": 0,
            "total_cost": 1
        },
        "currency": {
            "code": "USD",
            "iso": "USD",
            "sign": "$",
            "format": "1,234.56",
            "decimal": "2",
            "rounding": "2",
            "rounding_mode": "HALF_UP",
            "id": 0,
            "rate": 1
        }
    },
    "call": "removeOrderDraftDiscount",
    "server_time": 1737627077
}
Last Updated: 1/27/2025, 4:41:21 PM