schemas/popolo/membership.json
{
"$schema": "http://json-schema.org/draft-03/schema#",
"id": "http://www.popoloproject.com/schemas/membership.json#",
"title": "Membership",
"description": "A relationship between a member and an organization",
"type": "object",
"properties": {
"id": {
"description": "The membership's unique identifier",
"type": ["string", "null"]
},
"label": {
"description": "A label describing the membership",
"type": ["string", "null"]
},
"role": {
"description": "The role that the member fulfills in the organization",
"type": ["string", "null"]
},
"member": {
"description": "The person or organization that is a member of the organization",
"type": ["object", "null"]
},
"person_id": {
"description": "The ID of the person who is a member of the organization",
"type": ["string", "null"]
},
"person": {
"description": "The person who is a member of the organization",
"$ref": "http://www.popoloproject.com/schemas/person.json#"
},
"organization_id": {
"description": "The ID of the organization in which the person or organization is a member",
"type": ["string", "null"]
},
"organization": {
"description": "The organization in which the person or organization is a member",
"$ref": "http://www.popoloproject.com/schemas/organization.json#"
},
"post_id": {
"description": "The ID of the post held by the member in the organization through this membership",
"type": ["string", "null"]
},
"post": {
"description": "The post held by the member in the organization through this membership",
"$ref": "http://www.popoloproject.com/schemas/post.json#"
},
"on_behalf_of_id": {
"description": "The ID of the organization on whose behalf the person is a member of the organization",
"type": ["string", "null"]
},
"on_behalf_of": {
"description": "The organization on whose behalf the person is a member of the organization",
"$ref": "http://www.popoloproject.com/schemas/organization.json#"
},
"area_id": {
"description": "The ID of the geographic area to which this membership is related",
"type": ["string", "null"]
},
"area": {
"description": "The geographic area to which this membership is related",
"$ref": "http://www.popoloproject.com/schemas/area.json#"
},
"start_date": {
"description": "The date on which the relationship began",
"type": ["string", "null"],
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
},
"end_date": {
"description": "The date on which the relationship ended",
"type": ["string", "null"],
"pattern": "^[0-9]{4}(-[0-9]{2}){0,2}$"
},
"contact_details": {
"description": "Means of contacting the member of the organization",
"type": "array",
"items": {
"$ref": "http://www.popoloproject.com/schemas/contact_detail.json#"
}
},
"links": {
"description": "URLs to documents about the membership",
"type": "array",
"items": {
"$ref": "http://www.popoloproject.com/schemas/link.json#"
}
},
"created_at": {
"description": "The time at which the resource was created",
"type": ["string", "null"],
"format": "date-time"
},
"updated_at": {
"description": "The time at which the resource was last modified",
"type": ["string", "null"],
"format": "date-time"
},
"sources": {
"description": "URLs to documents from which the membership is derived",
"type": "array",
"items": {
"$ref": "http://www.popoloproject.com/schemas/link.json#"
}
}
}
}