{
	"$schema": "http://json-schema.org/draft-03/schema#",
	"title": "Accounting Year Periods collection schema",
	"description": "A schema for retrieving the periods of an accounting year.",
	"type": "object",
	"restdocs": "http://restdocs.e-conomic.com/#get-accounting-years-accountingyear-periods",
	"properties": {
		"collection": {
			"type": "array",
			"description": "A collection of the periods.",
			"items": {
				"title": "Period",
				"type": "object",
				"description": "A specific period in the accounting year.",
				"properties": {
					"periodNumber": {
						"type": "integer",
						"minimum": 1,
						"sortable": true,
						"filterable": true,
						"description": "A unique identifier of the period."
					},
					"accountingYear": {
						"type": "object",
						"description": "The accounting year the period is part of.",
						"properties": {
							"year": {
								"type": "string",
								"maxLength": 10,
								"description": "A unique identifier of the accounting year."
							},
							"self": {
								"type": "string",
								"format": "uri",
								"description": "A unique reference to the accounting year resource.",
								"required": true
							}
						}
					},
					"fromDate": {
						"type": "string",
						"format": "full-date",
						"pattern": "\\d{4}-\\d{2}-\\d{2}",
						"sortable": true,
						"filterable": true,
						"defaultsorting": "ascending",
						"description": "The first date in the period formated according to ISO-8601 (YYYY-MM-DD)."
					},
					"toDate": {
						"type": "string",
						"format": "full-date",
						"pattern": "\\d{4}-\\d{2}-\\d{2}",
						"sortable": true,
						"filterable": true,
						"description": "The last date in the period formated according to ISO-8601 (YYYY-MM-DD)."
					},
					"closed": {
						"type": "boolean",
						"description": "If true this indicates that the accounting period is closed for further transactions."
					},
					"entries": {
						"type": "string",
						"format": "uri",
						"description": "A link to a collection of all entries booked in the period."
					},
					"totals": {
						"type": "string",
						"format": "uri",
						"description": "A link to the chart of accounts with the periods total in base currency."
					},
					"self": {
						"type": "string",
						"format": "uri",
						"description": "A unique link reference to the period item.",
						"required": true
					}
				}
			}
		},
		"metaData": {
			"type": "object",
			"description": "Information about possible actions, endpoints and resource paths related to the endpoint."
		},
		"pagination": {
			"type": "object",
			"description": "Information about the pagination."
		},
		"self": {
			"type": "string",
			"format": "uri",
			"description": "A unique reference to the accounting year periods resource.",
			"required": true
		}
	}
}