# Bestellungen

> LocalSERP Proxy API: Tarife und Preise, einen Tarif mit dem Guthaben kaufen und Bestellverlauf. Parameter, Beispielantworten sowie Code für curl, Python und Node.js.

- URL: https://localserpproxy.com/de/docs/api/orders/
- Zuletzt aktualisiert: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Rufe die Tarife und ihre Preise ab, kaufe einen Tarif mit deinem Guthaben (neuer Dienst, mehr Traffic oder Verlängerung eines Ports) und sieh dir deine bisherigen Bestellungen an.

**Endpunkte auf dieser Seite**

- `GET /v1/catalog/products`: Produkte, Tarife und Preise
- `POST /v1/orders`: Einen Tarif mit dem Guthaben kaufen (neuer Dienst, mehr Traffic oder Verlängerung des Ports)
- `GET /v1/orders`: Bestellungen auflisten
- `GET /v1/orders/{orderId}`: Eine Bestellung abrufen

Basis-URL `https://localserpproxy.com/api/v1`. Authentifizierung, Fehler und Limits: siehe [API-Übersicht](https://localserpproxy.com/de/docs/api/).

## Produkte, Tarife und Preise

`GET /v1/catalog/products`

Alle Produkte mit ihren Tarifen und Preisen, genau wie bei der Bestellung berechnet.

Öffentlich: kein API-Schlüssel erforderlich.

**Antwort** `200 OK`

```json
{
  "data": [
    {
      "id": "residential",
      "name": "Residential proxies",
      "description": "Residential traffic for manual local search, advertising, price and application checks in US cities. State, city and ZIP selection, subject to available exits; no promise of GPS position or rankings.",
      "unit": "GB",
      "plans": [
        {
          "id": "res-10",
          "productId": "residential",
          "name": "Local team",
          "quantity": 10,
          "unit": "GB",
          "durationDays": null,
          "price": "7.50",
          "pricePerUnit": "0.75",
          "popular": false,
          "features": [
            "US city selection, subject to availability",
            "Traffic stays until used",
            "Rotating or sticky sessions"
          ],
          "available": true,
          "countries": null
        }
      ]
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/products"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/products", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/catalog/products`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Einen Tarif mit dem Guthaben kaufen (neuer Service, mehr Traffic oder Port-Verlängerung)

`POST /v1/orders`

Die Zahlung erfolgt immer über das Prepaid-Guthaben: Der Preis wird von der API berechnet (Katalogpreis × `quantity`), das Guthaben wird abgebucht, der Service wird erstellt oder verlängert und die Bestellung wird mit ihrem `fulfillment` als `completed` zurückgegeben. Die Proxy-Zugangsdaten sind sofort verfügbar.

- **Neuer Residential-Traffic**: `{ "planId": "res-10" }`.
- **Neuer rotierender 4G/5G-Traffic (pro GB)**: `{ "planId": "mgb-10" }` (ein Traffic-Abo mit `productId: "mobile-gb"`, bereitgestellt in `fulfillment.residentialSubscriptionId`).
- **Traffic zu einem bestehenden Abo hinzufügen**: `{ "planId": "res-10", "options": { "subscriptionId": "res_9x2m4k" } }`: Der Tarif muss zum Produkt des Abos gehören.
- **Neue mobile Ports**: `{ "planId": "mob-us-30d", "quantity": 1, "options": { "country": "US" } }`, optional mit `carrier` (siehe die Mobilfunkanbieter eines Landes unter [Mobile Ports](https://localserpproxy.com/de/docs/api/mobile/)). Zonentarife gelten nur für Länder in ihrer Zone (`422` auf `options.country` andernfalls).
- **Einen mobilen Port verlängern**: `{ "planId": "mob-us-7d", "options": { "portId": "mob_2v8k1q" } }` addiert die Laufzeit des Tarifs zu `expiresAt`.

**Guthaben zu niedrig → `402 insufficient_balance`**, mit dem fehlenden Betrag und einem vorgeschlagenen Aufladebetrag in `error.details` (`missing`, `suggestedTopUp`). Bei einem Fehler wird nichts abgebucht. Um den Differenzbetrag zu bezahlen, starte eine Aufladung mit derselben Anfrage in `purchase` (`POST /v1/topups`): Der Tarif wird gekauft, sobald die Aufladung gutgeschrieben wurde.

Authentifizierung: API-Schlüssel im Header `Authorization: Bearer API_KEY`.

**Parameter**

| Name | In | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | Nein | Eindeutiger Schlüssel (z. B. eine UUID) für sichere POST-Wiederholungen. 24 h gültig. — max. 128 Zeichen |

**Anfragetext**

| Feld | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `planId` | string | Ja | — |
| `quantity` | integer | Nein | 1–100, Standard `1` |
| `options` | object | Nein | — |

*Beispiel: Residential*

```json
{
  "planId": "res-10"
}
```

*Beispiel: Mobile Ports*

```json
{
  "planId": "mob-us-30d",
  "quantity": 1,
  "options": {
    "country": "US",
    "carrier": "verizon",
    "autoRenew": true
  }
}
```

*Beispiel: Port verlängern*

```json
{
  "planId": "mob-us-7d",
  "options": {
    "portId": "mob_2v8k1q"
  }
}
```

*Beispiel: Mobiler Traffic*

```json
{
  "planId": "mgb-10"
}
```

*Beispiel: Zonen-Port*

```json
{
  "planId": "mob-us-30d",
  "options": {
    "country": "US",
    "carrier": "verizon"
  }
}
```

**Antwort** `201 Created`

```json
{
  "id": "ord_4f8k2m9q",
  "status": "completed",
  "productId": "residential",
  "planId": "res-10",
  "planName": "Local team",
  "quantity": 1,
  "unitPrice": "7.50",
  "subtotal": "7.50",
  "discount": "0.00",
  "total": "7.50",
  "promoCode": null,
  "currency": "USD",
  "topUpId": null,
  "options": {},
  "fulfillment": {
    "residentialSubscriptionId": "res_9x2m4k",
    "mobilePortIds": []
  },
  "createdAt": "2026-10-05T14:03:11Z",
  "paidAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/orders" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"planId":"res-10"}'
```

*Python*

```python
import os, uuid
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}

r = requests.post(f"{API}/orders", headers=HEADERS, json={"planId": "res-10"}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
import { randomUUID } from 'node:crypto';

const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/orders`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Idempotency-Key': randomUUID(), 'Content-Type': 'application/json' },
  body: JSON.stringify({ planId: 'res-10' }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Bestellungen auflisten

`GET /v1/orders`

Authentifizierung: API-Schlüssel im Header `Authorization: Bearer API_KEY`.

**Parameter**

| Name | In | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- | --- |
| `page` | query | integer | Nein | ≥ 1, Standardwert `1` |
| `perPage` | query | integer | Nein | 1–100, Standardwert `20` |
| `status` | query | `completed` · `cancelled` | Nein | Bestellungen werden bereits bezahlt erstellt (das Guthaben wird abgebucht). `completed` — bezahlt und bereitgestellt (Zugangsdaten sofort verfügbar). |
| `productId` | query | string | Nein | Produkt-ID aus dem Katalog. Werte für LocalSERP Proxy: `residential` (GB), `mobile` (dedizierte 4G/5G-Ports) und `mobile-gb` (rotierender 4G/5G-Traffic pro GB). Clients müssen unbekannte Werte unterstützen. |

**Antwort** `200 OK`

```json
{
  "data": [
    {
      "id": "ord_4f8k2m9q",
      "status": "completed",
      "productId": "residential",
      "planId": "res-10",
      "planName": "Local team",
      "quantity": 1,
      "unitPrice": "7.50",
      "subtotal": "7.50",
      "discount": "0.00",
      "total": "7.50",
      "promoCode": null,
      "currency": "USD",
      "topUpId": null,
      "options": {},
      "fulfillment": {
        "residentialSubscriptionId": "res_9x2m4k",
        "mobilePortIds": []
      },
      "createdAt": "2026-10-05T14:03:11Z",
      "paidAt": "2026-10-05T14:03:11Z"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 1,
    "totalPages": 1
  }
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/orders" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/orders", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/orders`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Eine Bestellung abrufen

`GET /v1/orders/{orderId}`

Authentifizierung: API-Schlüssel im Header `Authorization: Bearer API_KEY`.

**Parameter**

| Name | In | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | Ja | — |

**Antwort** `200 OK`

```json
{
  "id": "ord_4f8k2m9q",
  "status": "completed",
  "productId": "residential",
  "planId": "res-10",
  "planName": "Local team",
  "quantity": 1,
  "unitPrice": "7.50",
  "subtotal": "7.50",
  "discount": "0.00",
  "total": "7.50",
  "promoCode": null,
  "currency": "USD",
  "topUpId": null,
  "options": {},
  "fulfillment": {
    "residentialSubscriptionId": "res_9x2m4k",
    "mobilePortIds": []
  },
  "createdAt": "2026-10-05T14:03:11Z",
  "paidAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/orders/ord_4f8k2m9q" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/orders/ord_4f8k2m9q", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/orders/ord_4f8k2m9q`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

---

LocalSERP Proxy: LocalSERP Proxy ist ein US-Residential-Proxy-Dienst zur stadtweisen Prüfung lokaler Suchergebnisse, Anzeigen und Preise, mit Kryptozahlung und ohne Hochladen eines Ausweisdokuments.
