{
  "name": "Кодирование значений пути и запроса по RFC 3986; пустое значение пути отвергается до отправки",
  "description": "Кодируется всё, кроме A–Z a–z 0–9 - . _ ~ (как rawurlencode в PHP, encodeURIComponent и ещё !'()* в TS): пробел — %20, «+» — %2B, «:» — %3A, кириллица — байты UTF-8. Параметры запроса — в порядке спецификации. Пустое значение пути — ошибка configuration без запроса; строка \"0\" — не пустая.",
  "client": {
    "api": "runtime",
    "credential": {"terminalKey": "lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw"},
    "baseUrl": "https://api.example.com"
  },
  "calls": [
    {
      "operation": "getPointsHistory",
      "args": {
        "member": "id 1:2/3?4#5&6=7+8!9'(0)*~-._й",
        "cursor": "eyJpZCI6Mn0= p+q:r/s?t#u&v!w'x(y)z*~",
        "limit": 10
      },
      "expect": {"result": {"data": [], "next_cursor": null}}
    },
    {"operation": "getBalance", "args": {"member": ""}, "expect": {"error": {"class": "configuration"}}},
    {
      "operation": "getReceipt",
      "args": {"receipt": "0"},
      "expect": {
        "error": {
          "class": "not_found",
          "status": 404,
          "code": "receipt_not_found",
          "requestId": "01929c20-0002-7000-8000-000000000002"
        }
      }
    }
  ],
  "exchanges": [
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/members/id%201%3A2%2F3%3F4%235%266%3D7%2B8%219%27%280%29%2A~-._%D0%B9/history?cursor=eyJpZCI6Mn0%3D%20p%2Bq%3Ar%2Fs%3Ft%23u%26v%21w%27x%28y%29z%2A~&limit=10",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json",
          "X-Request-Id": "01929c20-0001-7000-8000-000000000001",
          "Loyal-Environment": "sandbox"
        },
        "json": {"data": [], "next_cursor": null}
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/0",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 404,
        "headers": {
          "Content-Type": "application/problem+json",
          "X-Request-Id": "01929c20-0002-7000-8000-000000000002",
          "Loyal-Environment": "sandbox"
        },
        "json": {
          "type": "urn:loyal:problem:receipt_not_found",
          "title": "The receipt was not found.",
          "status": 404,
          "code": "receipt_not_found",
          "request_id": "01929c20-0002-7000-8000-000000000002"
        }
      }
    }
  ],
  "sleeps": []
}
