API-Dokumentation Webhosting für alle LWS besuchen

Kaufhistorie abrufen

GET https://api.lws.net/v1/contact/purchase/history

operationIdgetPurchaseHistory

Ruft alle vom Benutzer über die API getätigten Transaktionen ab. Dies umfasst alle Käufe, Verlängerungen und sonstigen Transaktionen. Transaktionen werden ein Jahr lang aufbewahrt.

Antworten

200

Kaufhistorie erfolgreich abgerufen

{
  "code": 200,
  "info": "Purchase history fetched",
  "data": [
    [
      {
        "id": 0,
        "id_revendeur": 547645,
        "price": 35.880000000000003,
        "timestamp": "2023-01-01 12:00:00",
        "request": {
          "action": "POST /hosting",
          "type": "buy",
          "package": "LWS Starter",
          "domain": "mydomain.fr"
        },
        "product": "mydomain.fr"
      }
    ]
  ]
}
Felder der Antwort 3
  • code integer

    Beispiel: 200

  • info string

    Beispiel: Purchase history fetched

  • data object[][]
400

Kaufhistorie konnte nicht abgerufen werden

{
  "code": 400,
  "info": "Could not find the seller's purchase history"
}
Felder der Antwort 2
  • code integer

    Beispiel: 400

  • info string

    Beispiel: Could not find the seller's purchase history

401

Nicht autorisiert - Authentifizierungs-Header fehlen

{
  "code": 401,
  "info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Felder der Antwort 2
  • code integer

    Beispiel: 401

  • info string

    Beispiel: Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed.

429

Anfragelimit überschritten

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Felder der Antwort 2
  • code integer

    Beispiel: 429

  • info string

    Beispiel: Rate limit exceeded. Please try again later.

Codebeispiele und Testkonsole anzeigen
GET /contact/purchase/history
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X GET \  "https://api.lws.net/v1/contact/purchase/history" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS"
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/contact/purchase/history");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.get(    "https://api.lws.net/v1/contact/purchase/history",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/contact/purchase/history", {  method: "GET",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,  },});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"req, _ := http.NewRequest("GET",    "https://api.lws.net/v1/contact/purchase/history", nil)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)resp, err := http.DefaultClient.Do(req)