From a0fca6ea7144351b04e57df79a010eb0026b9335 Mon Sep 17 00:00:00 2001 From: Thomas Brinkmann Date: Wed, 1 Jun 2022 20:14:42 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EGET=20/order/{orderid}=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GET-%2Forder%2F%7Borderid%7D.md | 95 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 GET-%2Forder%2F%7Borderid%7D.md diff --git a/GET-%2Forder%2F%7Borderid%7D.md b/GET-%2Forder%2F%7Borderid%7D.md new file mode 100644 index 0000000..889ed09 --- /dev/null +++ b/GET-%2Forder%2F%7Borderid%7D.md @@ -0,0 +1,95 @@ +## **GET /order/{orderid}** + + +## **Inhalt** +--- +- Parameter +- Optionale Parameter +- Beispiel Anfrage +- Beispiel Antwort +- Mögliche Fehlermeldungen +--- + +### Parameter + +|URL Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|- | -| - + +|Body Parameter | Typ | Beschreibung| +|----------|-----|-------------| +| - | - | - | + + +--- + +### Optionale Parameter + +|Query-String Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|?page | integer | Beschreibt die aktuelle Seitenzahl +|?limit | integer | Beschreibt wieviele Elemente pro Seite angezeigt werden sollen + +--- + +### Beispiel Anfrage + +##### PHP +```php + 'control.local/api/v2/order/1', + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'X-TOKEN: test-token', + 'Content-Type: application/json' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + +##### cURL +```bash +curl --location --request GET 'control.local/api/v2/order/1' \ +--header 'X-TOKEN: test-token' \ +--header 'Content-Type: application/json' +``` + +--- + +### Beispiel Antwort + +```json +{ + "status": "OK", + "id": 1, + "ordernum": 12345678910, + "amount": "0.00", + "date": "2000-00-00 00:00:00", + "paymentmethod": "paypal", + "paymentstatus": "Paid", + "name": "Test User", + "items": [ + { + "type": "product", + "producttype": "Dedicated/VPS Server", + "product": "KVM SSD Premium - KVM SSD Konfigurator Gen5", + "billingcycle": "Monthly", + "amount": "€0.00EUR" + } + ] +} +``` + +### Mögliche Fehlermeldungen + +> :warning: Status Code **403** - Permission denied + +> :warning: Status Code **500** - Oops! \ No newline at end of file