{
  "name": "Сеанс, который поставщик дал в прошлом вызове, тоже заменяется на 401",
  "description": "Первый вызов заменяет отвергнутый сеанс клиента сеансом поставщика. Во втором вызове этот сеанс получен не этим вызовом: на 401 клиент снова берёт сеанс у поставщика и повторяет ту же попытку без паузы.",
  "client": {
    "api": "member",
    "credential": {
      "memberSession": "lms_test_d0f3364baf26.4OuDuCo1m7vWf_OongPoB6orwvXEHwM1vFYHST6ieao",
      "sessionProvider": [
        "lms_test_44fcc049028e.YX6uB4Uy9bSplk5J3N4vxOonenmkJ6GYMB-zwIwDSfs",
        "lms_test_c5603a48a6f4.M6YGDTb54sJm9vWqA-NCCF3qsFrOKz3MmZji6tBQT94"
      ]
    },
    "origin": "https://shop.example.com",
    "baseUrl": "https://api.example.com"
  },
  "calls": [
    {
      "operation": "getProfile",
      "args": {},
      "expect": {
        "result": {
          "id": "01929c1e-0030-7030-8030-000000000030",
          "status": "active",
          "masked_phone": "+7 *** ***-45-67",
          "first_name": "Анна",
          "registered_at": "2026-09-01T10:00:00Z",
          "referral_code": "ANNA7Q2",
          "balance": {
            "point_type_id": "01929c1e-0031-7031-8031-000000000031",
            "precision": 0,
            "available": 1250,
            "pending": 0,
            "held": 0,
            "spendable": 1250,
            "next_expiration": null
          },
          "tier": null,
          "stamps": []
        }
      }
    },
    {
      "operation": "getPointsHistory",
      "args": {"limit": 1},
      "expect": {
        "result": {
          "data": [
            {
              "transaction_id": "01929c1e-0040-7040-8040-000000000043",
              "type": "accrual",
              "amount": 50,
              "member_delta": 50,
              "effective_at": "2026-10-12T15:30:00Z",
              "created_at": "2026-10-12T15:30:00Z",
              "reference_type": "receipt",
              "reference_id": "01929c1e-0050-7050-8050-000000000053",
              "reason_code": null
            }
          ],
          "next_cursor": null
        },
        "meta": {"operationId": "getPointsHistory", "status": 200, "requestId": "01929c20-0404-7000-8000-000000000404"}
      }
    }
  ],
  "exchanges": [
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/member/v1/me",
        "headers": {
          "authorization": "Bearer lms_test_d0f3364baf26.4OuDuCo1m7vWf_OongPoB6orwvXEHwM1vFYHST6ieao",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null,
          "origin": "https://shop.example.com"
        }
      },
      "response": {
        "status": 401,
        "headers": {"Content-Type": "application/problem+json", "X-Request-Id": "01929c20-0401-7000-8000-000000000401"},
        "json": {
          "type": "urn:loyal:problem:unauthenticated",
          "title": "A valid API key is required.",
          "status": 401,
          "code": "unauthenticated",
          "request_id": "01929c20-0401-7000-8000-000000000401"
        }
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/member/v1/me",
        "headers": {
          "authorization": "Bearer lms_test_44fcc049028e.YX6uB4Uy9bSplk5J3N4vxOonenmkJ6GYMB-zwIwDSfs",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null,
          "origin": "https://shop.example.com"
        }
      },
      "response": {
        "status": 200,
        "headers": {"Content-Type": "application/json", "X-Request-Id": "01929c20-0402-7000-8000-000000000402"},
        "json": {
          "id": "01929c1e-0030-7030-8030-000000000030",
          "status": "active",
          "masked_phone": "+7 *** ***-45-67",
          "first_name": "Анна",
          "registered_at": "2026-09-01T10:00:00Z",
          "referral_code": "ANNA7Q2",
          "balance": {
            "point_type_id": "01929c1e-0031-7031-8031-000000000031",
            "precision": 0,
            "available": 1250,
            "pending": 0,
            "held": 0,
            "spendable": 1250,
            "next_expiration": null
          },
          "tier": null,
          "stamps": []
        }
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/member/v1/me/history?limit=1",
        "headers": {
          "authorization": "Bearer lms_test_44fcc049028e.YX6uB4Uy9bSplk5J3N4vxOonenmkJ6GYMB-zwIwDSfs",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null,
          "origin": "https://shop.example.com"
        }
      },
      "response": {
        "status": 401,
        "headers": {"Content-Type": "application/problem+json", "X-Request-Id": "01929c20-0403-7000-8000-000000000403"},
        "json": {
          "type": "urn:loyal:problem:unauthenticated",
          "title": "A valid API key is required.",
          "status": 401,
          "code": "unauthenticated",
          "request_id": "01929c20-0403-7000-8000-000000000403"
        }
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/member/v1/me/history?limit=1",
        "headers": {
          "authorization": "Bearer lms_test_c5603a48a6f4.M6YGDTb54sJm9vWqA-NCCF3qsFrOKz3MmZji6tBQT94",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null,
          "origin": "https://shop.example.com"
        }
      },
      "response": {
        "status": 200,
        "headers": {"Content-Type": "application/json", "X-Request-Id": "01929c20-0404-7000-8000-000000000404"},
        "json": {
          "data": [
            {
              "transaction_id": "01929c1e-0040-7040-8040-000000000043",
              "type": "accrual",
              "amount": 50,
              "member_delta": 50,
              "effective_at": "2026-10-12T15:30:00Z",
              "created_at": "2026-10-12T15:30:00Z",
              "reference_type": "receipt",
              "reference_id": "01929c1e-0050-7050-8050-000000000053",
              "reason_code": null
            }
          ],
          "next_cursor": null
        }
      }
    }
  ],
  "sleeps": []
}
