POST /order
Inhalt
- Parameter
- Optionale Parameter
- Beispiel Anfrage
- Beispiel Antwort
- Mögliche Fehlermeldungen
Parameter
URL Parameter |
Typ |
Beschreibung |
paymentmethod |
string |
Die Zahlungsmethode für diese Bestellung (Kann in der Rechnung trotzdem frei verändert werden!) |
pid |
array |
Ein integer array mit den Produkt IDs die man bestellen möchte |
billingcycle |
array |
Ein string array mit den Billing Cycles der Produkte (monthly, quarterly, semiannually, annually) |
hostname |
array |
Ein string array mit den Hostnamen der Produkte |
rootpw |
array |
Ein string array mit den Passwörtern für die Produkte |
Body Parameter |
Typ |
Beschreibung |
- |
- |
- |
Optionale Parameter
Query-String Parameter |
Typ |
Beschreibung |
- |
- |
- |
Beispiel Anfrage
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.dsh.gg/api/v2/order',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"paymentmethod": "paypal",
"pid": [1,2],
"billingcycle": ["monthly", "monthly"],
"hostname": ["a.server.de", "b.server.de"],
"rootpw": ["passwort-server-a", "password-server-b"]
}',
CURLOPT_HTTPHEADER => array(
'X-TOKEN: test-token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
cURL
curl --location --request GET 'https://api.dsh.gg/api/v2/order' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"paymentmethod": "paypal",
"pid": [1,2],
"billingcycle": ["monthly", "monthly"],
"hostname": ["a.server.de", "b.server.de"],
"rootpw": ["passwort-server-a", "password-server-b"]
}'
Beispiel Antwort
{
"status": "OK",
"orderid": "12345678910",
"serviceids": "1,2"
}
Mögliche Fehlermeldungen
⚠️ Status Code 403 - Permission denied
⚠️ Status Code 500 - Order could not be placed