API documentation Web hosting accessible to everyone Visit LWS

Add credit to your reseller account (Test Environment only)

PUT https://api.lws.net/v1/contact/reseller/credit

operationIdputResellerCredit

Not implemented outside of the Test Environment. Send the X-Test-Mode header to reach the functional implementation of this operation; without it, this endpoint always returns 501.

Request body

  • amount integer

    Amount of credit to add

    optional
Example request
{
  "amount": 0
}

Responses

401

Unauthorized - Missing authentication headers

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

    Example: 401

  • info string

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

429

Rate limit exceeded

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Response fields 2
  • code integer

    Example: 429

  • info string

    Example: Rate limit exceeded. Please try again later.

501

Not implemented outside of the Test Environment

Returned outside the test environment. This operation only runs with X-Test-Mode enabled.

{
  "code": 405,
  "info": "Not implemented. Make sure you are using the Test Environment for this action to work"
}
Response fields 2
  • code integer

    Example: 405

  • info string

    Example: Not implemented. Make sure you are using the Test Environment for this action to work

Show the code examples and the test console
PUT /contact/reseller/credit
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X PUT \  "https://api.lws.net/v1/contact/reseller/credit" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS" \  -H "Content-Type: application/json" \  -d '{"amount":0}'
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/contact/reseller/credit");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,    "Content-Type: application/json",]);curl_setopt($ch, CURLOPT_POSTFIELDS, '{"amount":0}');$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.put(    "https://api.lws.net/v1/contact/reseller/credit",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },    json={"amount": 0},)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/contact/reseller/credit", {  method: "PUT",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,    "Content-Type": "application/json",  },  body: JSON.stringify({"amount":0}),});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"body := strings.NewReader(`{"amount":0}`)req, _ := http.NewRequest("PUT",    "https://api.lws.net/v1/contact/reseller/credit", body)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)req.Header.Set("Content-Type", "application/json")resp, err := http.DefaultClient.Do(req)