parent
0870c8cee1
commit
a0fca6ea71
1 changed files with 95 additions and 0 deletions
@ -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 |
||||
<?php |
||||
|
||||
$curl = curl_init(); |
||||
|
||||
curl_setopt_array($curl, array( |
||||
CURLOPT_URL => '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! |
Loading…
Reference in new issue