Documentation generated
at 04.02.2023 23:29:05

Virtual Cart

public/virtual-cart/term-discount
GET public/virtual-cart/term-discount
curl -X GET \
-G 'https://api.pph.sh/public/virtual-cart/term-discount' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
{
    "data": {
        "monthly": 0,
        "quarterly": 5,
        "semiannually": 10,
        "annually": 20
    }
}
Calculate virtual cart
POST public/virtual-cart/calculate

Returns a summary of products and domains in a virtual cart.

At least one product or one domain has to be given.

Body-Parameter

Feld Datentyp Beschreibung
promocode string A promotion code to apply to this virtual cart. Default to null. optional
products object[] Products in the virtual cart.
products[].pid int The product id. Example: 269 required
products[].configoptions array[] The config options, if the product is configurable.
Key = config option ID.
Value = value ID.
Example: {"293": "889"}
products[].billingcycle string The billing cycle. Defaults to monthly. Example: monthly
domains object[] Domains in the virtual cart.
domains[].name string The domain name. Example: domain.com required
domains[].authcode string The authcode in case of transfer. Example: vK4wM5uE
curl -X POST \
-G 'https://api.pph.sh/public/virtual-cart/calculate' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
public/virtual-cart/save
POST public/virtual-cart/save
curl -X POST \
-G 'https://api.pph.sh/public/virtual-cart/save' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
public/virtual-cart/update/{uuid}
POST public/virtual-cart/update/:uuid
curl -X POST \
-G 'https://api.pph.sh/public/virtual-cart/update/<uuid>' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
public/virtual-cart/restore/{uuid}
GET public/virtual-cart/restore/:uuid
curl -X GET \
-G 'https://api.pph.sh/public/virtual-cart/restore/<uuid>' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
{
    "data": {
        "error": true,
        "type": "*",
        "uuid": [
            "The cart with the given uuid does not exist."
        ],
        "url": "https:\/\/fsn-01.api.pph.sh\/public\/virtual-cart\/restore\/aliquam"
    }
}
Product summary
POST public/virtual-cart/product-price-details

Returns the price container of a single product.

Body-Parameter

Feld Datentyp Beschreibung
promocode string A promotion code to apply to this virtual cart. Default to null. optional
pid int The product id. Example: 269 required
configoptions array[] The config options, if the hosting is configurable.
Key = config option ID.
Value = value ID.
Example: {"293": 889}
billingcycle string The billing cycle. Defaults to monthly. Example: monthly
curl -X POST \
-G 'https://api.pph.sh/public/virtual-cart/product-price-details' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
{
    "data": {
        "label": "KVM Konfigurierbar (SSD)",
        "items": [
            {
                "label": "Betriebssystem: Linux",
                "price": 0,
                "meta": []
            },
            {
                "label": "Prozessor: 8 Kerne",
                "price": 15.85,
                "meta": []
            },
            {
                "label": "RAM: 4GB RAM",
                "price": 3,
                "meta": []
            },
            {
                "label": "NVMe SSD Speicher: 50GB SSD",
                "price": 1,
                "meta": []
            },
            {
                "label": "Netzwerkgeschwindigkeit: bis zu 200 MBit\/s",
                "price": 0,
                "meta": []
            },
            {
                "label": "Gameserver Manager (Linux): Gameserver Cloud",
                "price": 0,
                "meta": []
            }
        ],
        "sum": 19.85
    }
}