{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-gouv-fr/json-schema/api-gouv-fr-organization-page-schema.json",
  "title": "OrganizationPage",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-gouv-fr-organizations-api-openapi.yml#/components/schemas/OrganizationPage",
  "properties": {
    "data": {
      "description": "The page data",
      "items": {
        "$ref": "#/$defs/Organization__read"
      },
      "type": "array"
    },
    "next_page": {
      "description": "The next page URL if exists",
      "type": "string"
    },
    "page": {
      "description": "The current page",
      "minimum": 1,
      "type": "integer"
    },
    "page_size": {
      "description": "The page size used for pagination",
      "minimum": 0,
      "type": "integer"
    },
    "previous_page": {
      "description": "The previous page URL if exists",
      "type": "string"
    },
    "total": {
      "description": "The total paginated items",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "page",
    "page_size",
    "total"
  ],
  "type": "object",
  "$defs": {
    "Badge__read": {
      "properties": {
        "kind": {
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    },
    "BaseReference": {
      "properties": {
        "class": {
          "description": "The object class",
          "type": "string"
        },
        "id": {
          "description": "The object unique identifier",
          "type": "string"
        }
      },
      "required": [
        "class",
        "id"
      ],
      "type": "object"
    },
    "Member__read": {
      "properties": {
        "label": {
          "readOnly": true,
          "type": "string"
        },
        "role": {
          "enum": [
            "admin",
            "editor",
            "partial_editor"
          ],
          "type": "string"
        },
        "since": {
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "user": {
          "allOf": [
            {
              "$ref": "#/$defs/UserReferenceWithEmail"
            }
          ],
          "readOnly": true
        }
      },
      "required": [
        "since"
      ],
      "type": "object"
    },
    "OrganizationPermissions": {
      "properties": {
        "delete": {
          "type": "boolean"
        },
        "edit": {
          "type": "boolean"
        },
        "harvest": {
          "type": "boolean"
        },
        "members": {
          "type": "boolean"
        },
        "private": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "Organization__read": {
      "properties": {
        "acronym": {
          "maxLength": 128,
          "type": "string"
        },
        "badges": {
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/Badge__read"
              }
            ],
            "readOnly": true
          },
          "readOnly": true,
          "type": "array"
        },
        "banner_color": {
          "description": "Hex color code (e.g. #000091) for the organization page banner",
          "type": "string"
        },
        "banner_image": {
          "description": "The organization page banner image URL",
          "readOnly": true,
          "type": "string"
        },
        "banner_image_position": {
          "description": "Vertical position of the banner image, as a percentage matching CSS background-position-y (0 = top, 50 = centered, 100 = bottom)",
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "business_number_id": {
          "maxLength": 14,
          "type": "string"
        },
        "created_at": {
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "deleted": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "format": "markdown",
          "type": "string"
        },
        "ext": {
          "readOnly": true,
          "type": "object"
        },
        "extras": {
          "type": "object"
        },
        "id": {
          "readOnly": true,
          "type": "string"
        },
        "image_url": {
          "type": "string"
        },
        "last_modified": {
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "logo": {
          "description": "URL of the image",
          "readOnly": true,
          "type": "string"
        },
        "logo_thumbnail": {
          "description": "URL of the cropped and squared image (100x100)",
          "readOnly": true,
          "type": "string"
        },
        "members": {
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/Member__read"
              }
            ],
            "readOnly": true
          },
          "readOnly": true,
          "type": "array"
        },
        "metrics": {
          "readOnly": true,
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "page": {
          "description": "Link to the udata web page for this organization",
          "readOnly": true,
          "type": "string"
        },
        "permissions": {
          "allOf": [
            {
              "$ref": "#/$defs/OrganizationPermissions"
            }
          ],
          "readOnly": true
        },
        "presentation_blocs": {
          "items": {
            "type": "object"
          },
          "type": "array"
        },
        "presentation_blocs_published_at": {
          "description": "Publication date of the organization presentation blocs. Set it to make the blocs publicly visible; leave it empty to keep them hidden (draft). Organization administrators always see the blocs regardless of this date.",
          "format": "date-time",
          "type": "string"
        },
        "slug": {
          "maxLength": 255,
          "readOnly": true,
          "type": "string"
        },
        "teams": {
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/Team__read"
              }
            ],
            "readOnly": true
          },
          "readOnly": true,
          "type": "array"
        },
        "uri": {
          "description": "Link to the API endpoint for this organization",
          "readOnly": true,
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "zone": {
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "created_at",
        "description",
        "id",
        "last_modified",
        "name",
        "slug"
      ],
      "type": "object",
      "x-mask": "{id,created_at,last_modified,badges,metrics,name,acronym,slug,description,url,image_url,logo,logo_thumbnail,banner_color,banner_image,banner_image_position,business_number_id,members,teams,ext,zone,extras,presentation_blocs_published_at,deleted,page,permissions,uri}"
    },
    "Team__read": {
      "properties": {},
      "type": "object"
    },
    "UserReference": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseReference"
        },
        {
          "properties": {
            "avatar": {
              "description": "URL of the image",
              "readOnly": true,
              "type": "string"
            },
            "avatar_thumbnail": {
              "description": "URL of the cropped and squared image (500x500)",
              "readOnly": true,
              "type": "string"
            },
            "deleted": {
              "description": "The date the account was deleted, null for a live account",
              "format": "date-time",
              "readOnly": true,
              "type": "string"
            },
            "first_name": {
              "maxLength": 255,
              "type": "string"
            },
            "last_name": {
              "maxLength": 255,
              "type": "string"
            },
            "page": {
              "description": "Link to the udata web page for this user",
              "readOnly": true,
              "type": "string"
            },
            "slug": {
              "maxLength": 255,
              "readOnly": true,
              "type": "string"
            },
            "uri": {
              "description": "Link to the API endpoint for this user",
              "readOnly": true,
              "type": "string"
            }
          },
          "required": [
            "first_name",
            "last_name",
            "slug"
          ],
          "type": "object"
        }
      ]
    },
    "UserReferenceWithEmail": {
      "allOf": [
        {
          "$ref": "#/$defs/UserReference"
        },
        {
          "properties": {
            "email": {
              "description": "The user email, obfuscated unless the caller may see it",
              "readOnly": true,
              "type": "string"
            },
            "last_login_at": {
              "format": "date-time",
              "readOnly": true,
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    }
  }
}