{
  "info": {
    "name": "LeyApp Public API",
    "description": "Search verified immigration lawyers across Spain, check availability, and start bookings. Bookings are never charged via the API: every booking is confirmed and paid by the client on leyapp.es. Anonymous access is allowed at low rate limits; API keys (create one at /dashboard/developer) raise limits and unlock keyed endpoints. Test keys (leyk_test_) run the full validation path but create nothing.\n\nSet the collection variables LEYAPP_API_KEY (leyk_test_… to start) and baseUrl.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://leyapp.es/api/v1"
    },
    {
      "key": "LEYAPP_API_KEY",
      "value": "leyk_test_..."
    }
  ],
  "item": [
    {
      "name": "GET /lawyers/search",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/lawyers/search?city=Barcelona&practice_area=immigration&language=en&min_fee_eur=&max_fee_eur=&sort=&page=&limit=",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "lawyers",
            "search"
          ],
          "query": [
            {
              "key": "city",
              "value": "Barcelona"
            },
            {
              "key": "practice_area",
              "value": "immigration"
            },
            {
              "key": "language",
              "value": "en"
            },
            {
              "key": "min_fee_eur",
              "value": ""
            },
            {
              "key": "max_fee_eur",
              "value": ""
            },
            {
              "key": "sort",
              "value": ""
            },
            {
              "key": "page",
              "value": ""
            },
            {
              "key": "limit",
              "value": ""
            }
          ]
        },
        "description": "Same search engine as leyapp.es. Verified, publicly listed lawyers only. Scope: lawyers:read (anonymous allowed)."
      }
    },
    {
      "name": "GET /lawyers/{lawyerId}",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/lawyers/{lawyerId}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "lawyers",
            "{lawyerId}"
          ]
        },
        "description": "Full public profile incl. bio and bar memberships. Bio is user-generated content wrapped in safety fencing for AI consumers. Scope: lawyers:read (anonymous allowed)."
      }
    },
    {
      "name": "GET /lawyers/{lawyerId}/availability",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/lawyers/{lawyerId}/availability?start_date=&end_date=",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "lawyers",
            "{lawyerId}",
            "availability"
          ],
          "query": [
            {
              "key": "start_date",
              "value": ""
            },
            {
              "key": "end_date",
              "value": ""
            }
          ]
        },
        "description": "Available slots for a date range (max 14 days). Scope: availability:read (anonymous allowed)."
      }
    },
    {
      "name": "GET /lawyers/{lawyerId}/reviews",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/lawyers/{lawyerId}/reviews?limit=",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "lawyers",
            "{lawyerId}",
            "reviews"
          ],
          "query": [
            {
              "key": "limit",
              "value": ""
            }
          ]
        },
        "description": "Recent reviews from verified clients. Comments are UGC with AI-safety fencing. Scope: reviews:read (anonymous allowed)."
      }
    },
    {
      "name": "GET /practice-areas",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/practice-areas",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "practice-areas"
          ]
        },
        "description": "Reference data; cache-friendly (24h). Scope: reference:read (anonymous allowed)."
      }
    },
    {
      "name": "GET /cities",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/cities",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cities"
          ]
        },
        "description": "Reference data; cache-friendly (24h). Scope: reference:read (anonymous allowed)."
      }
    },
    {
      "name": "POST /bookings/initiate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/bookings/initiate",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "bookings",
            "initiate"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"lawyer_id\": \"\",\n  \"date\": \"\",\n  \"start_time\": \"09:00:00\",\n  \"end_time\": \"10:00:00\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Creates a 15-minute booking intent for a free slot. The USER must open confirmation_url on leyapp.es to confirm and pay — the API never charges anyone. Supports Idempotency-Key (Stripe semantics: 24h replay, 422 on body mismatch). Test keys validate fully but create nothing. Scope: bookings:initiate (anonymous allowed at 5/hour)."
      }
    },
    {
      "name": "GET /booking-intents/{intentId}",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{LEYAPP_API_KEY}}"
          }
        ],
        "url": {
          "raw": "https://leyapp.es/api/v1/booking-intents/{intentId}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "booking-intents",
            "{intentId}"
          ]
        },
        "description": "Status of an intent CREATED BY YOUR KEY: pending | confirmed | expired. Requires an API key with bookings:read (not available anonymously)."
      }
    }
  ]
}
