{
  "name": "Необязательное тело: не передано — запрос без тела, пустой объект — {}",
  "description": "disableWebhookEndpoint принимает необязательное тело. Без тела нет и Content-Type; пустой объект кодируется как {} (в PHP — пустой массив верхнего уровня). Ключ мерчанта уже задаёт мерчанта: Loyal-Merchant не отправляется. POST Management API без Idempotency-Key — без ключа.",
  "client": {
    "api": "management",
    "credential": {"merchantKey": "lm_test_c0ffee5h0p01.4hc9xYLN7niA1mYZROcNs3EQZcXjncE7IShJcV5BvvQ"},
    "baseUrl": "https://api.example.com"
  },
  "calls": [
    {
      "operation": "disableWebhookEndpoint",
      "args": {"endpoint": "01929c1e-0080-7080-8080-000000000080"},
      "expect": {
        "result": {
          "id": "01929c1e-0080-7080-8080-000000000080",
          "url": "https://hooks.example.com/loyal",
          "event_types": ["receipt.confirmed", "receipt.returned"],
          "description": "CRM",
          "status": "disabled",
          "disabled_reason": null,
          "created_at": "2026-10-01T09:00:00.000000Z"
        }
      }
    },
    {
      "operation": "disableWebhookEndpoint",
      "args": {"endpoint": "01929c1e-0080-7080-8080-000000000080", "body": {}},
      "expect": {
        "result": {
          "id": "01929c1e-0080-7080-8080-000000000080",
          "url": "https://hooks.example.com/loyal",
          "event_types": ["receipt.confirmed", "receipt.returned"],
          "description": "CRM",
          "status": "disabled",
          "disabled_reason": null,
          "created_at": "2026-10-01T09:00:00.000000Z"
        }
      }
    },
    {
      "operation": "disableWebhookEndpoint",
      "args": {"endpoint": "01929c1e-0080-7080-8080-000000000080", "body": {"reason": "Переезд на новый адрес"}},
      "expect": {
        "result": {
          "id": "01929c1e-0080-7080-8080-000000000080",
          "url": "https://hooks.example.com/loyal",
          "event_types": ["receipt.confirmed", "receipt.returned"],
          "description": "CRM",
          "status": "disabled",
          "disabled_reason": "Переезд на новый адрес",
          "created_at": "2026-10-01T09:00:00.000000Z"
        }
      }
    }
  ],
  "exchanges": [
    {
      "request": {
        "method": "POST",
        "url": "https://api.example.com/api/management/v1/webhook-endpoints/01929c1e-0080-7080-8080-000000000080:disable",
        "headers": {
          "authorization": "Bearer lm_test_c0ffee5h0p01.4hc9xYLN7niA1mYZROcNs3EQZcXjncE7IShJcV5BvvQ",
          "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": {
          "id": "01929c1e-0080-7080-8080-000000000080",
          "url": "https://hooks.example.com/loyal",
          "event_types": ["receipt.confirmed", "receipt.returned"],
          "description": "CRM",
          "status": "disabled",
          "disabled_reason": null,
          "created_at": "2026-10-01T09:00:00.000000Z"
        }
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "https://api.example.com/api/management/v1/webhook-endpoints/01929c1e-0080-7080-8080-000000000080:disable",
        "headers": {
          "authorization": "Bearer lm_test_c0ffee5h0p01.4hc9xYLN7niA1mYZROcNs3EQZcXjncE7IShJcV5BvvQ",
          "accept": "application/json",
          "content-type": "application/json",
          "idempotency-key": null,
          "loyal-merchant": null
        },
        "json": {}
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/json",
          "x-request-id": "01929c20-0002-7000-8000-000000000002",
          "loyal-environment": "sandbox"
        },
        "json": {
          "id": "01929c1e-0080-7080-8080-000000000080",
          "url": "https://hooks.example.com/loyal",
          "event_types": ["receipt.confirmed", "receipt.returned"],
          "description": "CRM",
          "status": "disabled",
          "disabled_reason": null,
          "created_at": "2026-10-01T09:00:00.000000Z"
        }
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "https://api.example.com/api/management/v1/webhook-endpoints/01929c1e-0080-7080-8080-000000000080:disable",
        "headers": {
          "authorization": "Bearer lm_test_c0ffee5h0p01.4hc9xYLN7niA1mYZROcNs3EQZcXjncE7IShJcV5BvvQ",
          "accept": "application/json",
          "content-type": "application/json",
          "idempotency-key": null,
          "loyal-merchant": null
        },
        "json": {"reason": "Переезд на новый адрес"}
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/json",
          "x-request-id": "01929c20-0003-7000-8000-000000000003",
          "loyal-environment": "sandbox"
        },
        "json": {
          "id": "01929c1e-0080-7080-8080-000000000080",
          "url": "https://hooks.example.com/loyal",
          "event_types": ["receipt.confirmed", "receipt.returned"],
          "description": "CRM",
          "status": "disabled",
          "disabled_reason": "Переезд на новый адрес",
          "created_at": "2026-10-01T09:00:00.000000Z"
        }
      }
    }
  ],
  "sleeps": []
}
