{
  "$id": "https://idhub.pangea.org/vc_schemas/federation-membership.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Federation membership",
  "description": "The federation membership specifies participation of a NGO into a NGO federation, as proposed by Lafede.cat",
  "name": [
    {
      "value": "NGO federation membership",
      "lang": "en"
    },
    {
      "value": "Membre de federació ONGs",
      "lang": "ca_ES"
    },
    {
      "value": "Miembro de federación de ONGs",
      "lang": "es"
    }
  ],
  "type": "object",
  "allOf": [
    {
      "$ref": "https://idhub.pangea.org/vc_schemas/ebsi/attestation.json"
    },
    {
      "properties": {
        "credentialSubject": {
          "description": "Defines additional properties on credentialSubject",
          "type": "object",
          "properties": {
            "id": {
              "description": "Defines a unique identifier of the credential subject",
              "type": "string"
            },
            "federation": {
              "description": "Federation the credential subject is affiliated with",
              "type": "string"
            },
            "legalName": {
              "description": "Legal name of the affiliated organisation",
              "type": "string"
            },
            "shortName": {
              "description": "Short name of the organisation of the affiliated organisation",
              "type": "string"
            },
            "registrationIdentifier": {
              "description": "Registration identifier of the affiliated organisation",
              "type": ["number", "string"]
            },
            "publicRegistry": {
              "description": "Registry where the affiliated organisation is registered: 'Generalitat de Catalunya', 'Ministerio del interior de España'",
              "type": "string"
            },
            "streetAddress": {
              "description": "Postal address of the member organisation: legal address",
              "type": "string"
            },
            "postCode": {
              "description": "Postal code of the member organisation",
              "type": ["number", "string"]
            },
            "city": {
              "description": "City of the member organisation",
              "type": "string"
            },
            "taxReference": {
              "description": "Tax reference as VAT registration of the member organisation",
              "type": ["number", "string"]
            },
            "membershipType": {
              "description": "Type of membership: full / observer",
              "type": "string"
            },
            "membershipStatus": {
              "description": "Type of membership: active / suspended, etc.",
              "type": "string"
            },
            "membershipId": {
              "description": "Membership identifier: an internal unique number or code",
              "type": ["number", "string"]
            },
            "membershipSince": {
              "type": "string",
              "format": "date"
            },
            "email": {
              "type": "string",
              "format": "email"
            },
            "phone": {
              "type": ["number", "string"]
            },
            "website": {
              "type": "string",
              "format": "uri"
            },
            "evidence": {
              "description": "Type of evidence used for attestation",
              "type": "string"
            },
            "certificationDate": {
              "type": "string",
              "format": "date"
            }
          },
          "required": [
            "id",
            "legalName",
            "postCode",
            "city",
            "membershipType",
            "membershipStatus",
            "federation",
            "membershipSince",
            "email",
            "certificationDate"
          ]
        }
      }
    }
  ]
}