FairePlace Countries API

Country reference data (ISO codes, lookups).

GitHub OpenAPI

Operations 3

GET /countries List countries #
GET /countries/{id} Get a country by ID #
GET /countries/code/{code} Get a country by ISO code #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/faireplace-com:faireplace-com-countries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

faireplace-com-countries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FairePlace Property Management Countries API
  description: 'Comprehensive API for managing properties, leases, tenants, and all aspects of real estate management.

    Built with Rust and Actix-web following hexagonal architecture principles.


    ## Authentication

    This API uses API keys for authentication with tenant-based isolation.


    ## Base URL

    - Production: `https://api.faireplace.com/api`'
  version: 1.0.0
  contact:
    name: FairePlace API Support
    email: api-support@faireplace.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://api.faireplace.com/api
  description: Production server
security:
- BearerAuth: []
tags:
- name: Countries
  description: Country reference data (ISO codes, lookups).
paths:
  /countries:
    get:
      operationId: listCountries
      summary: List countries
      description: 'Lists all **active** countries available as reference data.


        Countries are global reference entries used for ISO code lookups,

        rent regulation resolution and address normalization.


        ## Usage Example


        ```bash

        curl -X GET https://api.faireplace.com/api/countries \

        -H "Authorization: Bearer YOUR_API_KEY"

        ```


        **Response**:

        ```json

        [

        {

        "id": "550e8400-e29b-41d4-a716-446655440000",

        "code": "FR",

        "name": "France",

        "is_active": true,

        "created_at": "2026-01-15T09:00:00",

        "updated_at": "2026-01-15T09:00:00"

        }

        ]

        ```'
      tags:
      - Countries
      security:
      - BearerAuth: []
      responses:
        '200':
          description: List of active countries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountryList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /countries/{id}:
    get:
      operationId: getCountryID
      summary: Get a country by ID
      description: 'Retrieves a single country by its UUID.


        ```bash

        curl -X GET https://api.faireplace.com/api/countries/550e8400-e29b-41d4-a716-446655440000 \

        -H "Authorization: Bearer YOUR_API_KEY"

        ```'
      tags:
      - Countries
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The country.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /countries/code/{code}:
    get:
      operationId: getCountryISOCode
      summary: Get a country by ISO code
      description: 'Retrieves a single country by its ISO code (e.g. `FR`).


        ```bash

        curl -X GET https://api.faireplace.com/api/countries/code/FR \

        -H "Authorization: Bearer YOUR_API_KEY"

        ```'
      tags:
      - Countries
      security:
      - BearerAuth: []
      parameters:
      - name: code
        in: path
        required: true
        description: ISO country code (e.g. `FR`, `BE`, `DE`).
        schema:
          type: string
        example: FR
      responses:
        '200':
          description: The country.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Country:
      type: object
      description: 'A country reference entry.


        Countries are global reference data used across the platform (e.g. to resolve

        rent regulation rules, address normalization, and ISO code lookups).

        Field names match the JSON payload exactly (no renaming).

        '
      required:
      - id
      - code
      - name
      - is_active
      - created_at
      - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique country identifier.
          example: 550e8400-e29b-41d4-a716-446655440000
        code:
          type: string
          description: 'ISO country code (typically ISO 3166-1 alpha-2, e.g. `FR`, `BE`, `DE`).

            '
          example: FR
        name:
          type: string
          description: Human-readable country name.
          example: France
        is_active:
          type: boolean
          description: 'Whether the country is active.


            The `GET /countries` list endpoint returns only active countries.

            '
          example: true
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601).
          example: '2026-01-15T09:00:00'
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp (ISO 8601).
          example: '2026-01-15T09:00:00'
    CountryList:
      type: array
      description: List of country reference entries.
      items:
        $ref: '#/components/schemas/Country'
    Error:
      type: object
      description: "The error envelope returned by every authenticated endpoint.\n\nTwo things are worth knowing before you write your error handling:\n\n- **`code` is a symbolic string, not a number.** The numeric HTTP status is\n  in `status`. Branch on `code`: it is stable, and show `message`, which\n  is written for humans and may be reworded without notice.\n- The public guest-signature endpoints use a **different, flatter shape**\n  (`{ \"error_code\": …, \"message\": … }`, no `error` wrapper), because they\n  are consumed by a page that has no session. Their responses document it\n  inline.\n\nThe `X-Request-Id` response header carries the request identifier: quote it\nwhen reporting a problem. It is a header, not a body field.\n"
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - status
          properties:
            code:
              type: string
              description: Stable symbolic code. Branch on this.
              enum:
              - NOT_FOUND
              - UNAUTHORIZED
              - VALIDATION_ERROR
              - DATABASE_ERROR
              - BUSINESS_ERROR
              - STORAGE_ERROR
              - CONFIG_ERROR
              - FORBIDDEN
              - CONFLICT
              - PARSE_ERROR
              - SERIALIZATION_ERROR
              - AUTHENTICATION_ERROR
              - AUTHORIZATION_ERROR
              - EXTERNAL_SERVICE_ERROR
              - RATE_LIMIT_EXCEEDED
              - PAYMENT_REQUIRED
              - PLAN_LIMIT_REACHED
              - GONE
              - BAD_REQUEST
              - INTERNAL_ERROR
              - INTERNAL_SERVER_ERROR
              example: NOT_FOUND
            message:
              type: string
              description: 'Human-readable explanation, most often in French. Safe to display,

                not safe to parse.

                '
              example: Lease not found
            status:
              type: integer
              description: The HTTP status code, repeated in the body.
              example: 404
            details:
              type: object
              additionalProperties: true
              description: 'Extra machine-readable context. Only present on some errors: on

                `RATE_LIMIT_EXCEEDED` it carries `retry_after_seconds`.

                '
              example:
                retry_after_seconds: 12
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key with fp_* prefix, passed as Bearer token
    WorkerApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    WorkerBearer:
      type: http
      scheme: bearer
      bearerFormat: Worker