{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/france-identite/json-schema/france-identite-organisation-schema.json",
  "title": "Organisation",
  "description": "Your organisation. It holds more fields than listed here: identifiers, address, contacts, evidence, version history.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/france-identite-organisation-openapi.yml#/components/schemas/Organisation",
  "type": "object",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "legalName": {
      "type": "string"
    },
    "tradeName": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "entitlements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "isIntermediary": {
      "type": "boolean"
    },
    "accessGroup": {
      "type": [
        "string",
        "null"
      ],
      "description": "The group whose members manage the organisation. Only from `GET /api/organisations/{organisationId}`."
    },
    "hasUnpublishedChanges": {
      "type": "boolean"
    },
    "draft": {
      "type": [
        "object",
        "null"
      ]
    },
    "services": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Service"
      }
    }
  },
  "$defs": {
    "AccessCertificate": {
      "type": "object",
      "required": [
        "sha256",
        "status"
      ],
      "properties": {
        "certificateId": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        },
        "pem": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "validFrom": {
          "type": "string"
        },
        "validTo": {
          "type": "string"
        },
        "keyCustody": {
          "type": "string",
          "enum": [
            "subscriber",
            "sandbox-generated"
          ]
        }
      }
    },
    "CredentialQuery": {
      "type": "object",
      "required": [
        "format",
        "meta",
        "claims"
      ],
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "mso_mdoc",
            "dc+sd-jwt"
          ]
        },
        "meta": {
          "type": "object",
          "description": "`doctype_value` for an mdoc, `vct` for an SD-JWT.",
          "properties": {
            "doctype_value": {
              "type": "string"
            },
            "vct": {
              "type": "string"
            }
          }
        },
        "claims": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "items": {
            "type": "object",
            "required": [
              "path"
            ],
            "properties": {
              "path": {
                "type": "array",
                "minItems": 1,
                "maxItems": 10,
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "IntendedUse": {
      "type": "object",
      "required": [
        "intendedUseIdentifier",
        "status"
      ],
      "properties": {
        "intendedUseIdentifier": {
          "type": "string"
        },
        "purpose": {
          "$ref": "#/$defs/MultiLangText"
        },
        "privacyPolicy": {
          "type": "object",
          "properties": {
            "policyURI": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        },
        "credentials": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CredentialQuery"
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "suspended",
            "withdrawn",
            "pending",
            "refused"
          ],
          "description": "`pending` or `refused` while it waits for protected data."
        },
        "suspendedBy": {
          "$ref": "#/$defs/SuspendedBy"
        }
      }
    },
    "MultiLangText": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "object",
        "required": [
          "lang",
          "content"
        ],
        "properties": {
          "lang": {
            "type": "string",
            "maxLength": 35
          },
          "content": {
            "type": "string",
            "maxLength": 1000
          }
        }
      }
    },
    "RegistrationCertificate": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "intendedUseIdentifier": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "accessCertificateSha256": {
          "type": "string"
        },
        "jws": {
          "type": "string"
        }
      }
    },
    "Service": {
      "type": "object",
      "required": [
        "serviceIdentifier",
        "status"
      ],
      "properties": {
        "serviceIdentifier": {
          "type": "string"
        },
        "serviceTradeName": {
          "type": "string"
        },
        "serviceUrl": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "suspendedBy": {
          "$ref": "#/$defs/SuspendedBy"
        },
        "intendedUses": {
          "type": "array",
          "description": "A verification service's intended uses.",
          "items": {
            "$ref": "#/$defs/IntendedUse"
          }
        },
        "providesAttestations": {
          "type": "array",
          "description": "The attestations an issuance service issues.",
          "items": {
            "type": "object"
          }
        },
        "accessCertificates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccessCertificate"
          }
        },
        "registrationCertificates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RegistrationCertificate"
          }
        }
      }
    },
    "SuspendedBy": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "operator",
        "partner",
        null
      ],
      "description": "Who suspended it. What the register's operator suspended, only the operator resumes."
    }
  }
}